2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/update/render-tasks/scene-graph-camera.h>
25 #include <dali/integration-api/debug.h>
26 #include <dali/internal/common/matrix-utils.h>
27 #include <dali/internal/common/memory-pool-object-allocator.h>
28 #include <dali/internal/update/nodes/node.h>
29 #include <dali/public-api/common/dali-common.h>
30 #include <dali/public-api/math/math-utils.h>
32 namespace // unnamed namespace
34 const uint32_t UPDATE_COUNT = 2u; // Update projection or view matrix this many frames after a change
35 const uint32_t COPY_PREVIOUS_MATRIX = 1u; // Copy view or projection matrix from previous frame
37 //For reflection and clipping plane
38 const float REFLECTION_NORMALIZED_DEVICE_COORDINATE_PARAMETER_A = 2.0f;
39 const float REFLECTION_NORMALIZED_DEVICE_COORDINATE_PARAMETER_D = 1.0f;
50 //Memory pool used to allocate new camera. Memory used by this pool will be released when shutting down DALi
51 MemoryPoolObjectAllocator<Camera> gCameraMemoryPool;
56 return T(T(0) < value) - T(value < T(0));
59 void LookAt(Matrix& result, const Vector3& eye, const Vector3& target, const Vector3& up)
61 Vector3 vZ = target - eye;
64 Vector3 vX = up.Cross(vZ);
67 Vector3 vY = vZ.Cross(vX);
70 result.SetInverseTransformComponents(vX, vY, vZ, eye);
73 void Frustum(Matrix& result, float left, float right, float bottom, float top, float near, float far, bool invertYAxis)
75 float deltaZ = far - near;
76 if((near <= 0.0f) || (far <= 0.0f) || Equals(right, left) || Equals(bottom, top) || (deltaZ <= 0.0f))
78 DALI_LOG_ERROR("Invalid parameters passed into Frustum!\n");
79 DALI_ASSERT_DEBUG("Invalid parameters passed into Frustum!");
83 float deltaX = right - left;
84 float deltaY = invertYAxis ? bottom - top : top - bottom;
88 float* m = result.AsFloat();
89 m[0] = -2.0f * near / deltaX;
90 m[1] = m[2] = m[3] = 0.0f;
92 m[5] = -2.0f * near / deltaY;
93 m[4] = m[6] = m[7] = 0.0f;
95 m[8] = (right + left) / deltaX;
96 m[9] = (top + bottom) / deltaY;
97 m[10] = (near + far) / deltaZ;
100 m[14] = -2.0f * near * far / deltaZ;
101 m[12] = m[13] = m[15] = 0.0f;
104 void Perspective(Matrix& result, Dali::DevelCameraActor::ProjectionDirection fovDir, float fov, float aspect, float near, float far, bool invertYAxis)
108 if(fovDir == Dali::DevelCameraActor::ProjectionDirection::VERTICAL)
110 frustumH = tanf(fov * 0.5f) * near;
111 frustumW = frustumH * aspect;
115 frustumW = tanf(fov * 0.5f) * near;
116 frustumH = frustumW / aspect;
119 Frustum(result, -frustumW, frustumW, -frustumH, frustumH, near, far, invertYAxis);
122 void Orthographic(Matrix& result, float left, float right, float bottom, float top, float near, float far, bool invertYAxis)
124 if(Equals(right, left) || Equals(top, bottom) || Equals(far, near))
126 DALI_LOG_ERROR("Cannot create orthographic projection matrix with a zero dimension.\n");
127 DALI_ASSERT_DEBUG("Cannot create orthographic projection matrix with a zero dimension.");
131 float deltaX = right - left;
132 float deltaY = invertYAxis ? bottom - top : top - bottom;
133 float deltaZ = far - near;
135 float* m = result.AsFloat();
136 m[0] = -2.0f / deltaX;
142 m[5] = -2.0f / deltaY;
148 m[10] = 2.0f / deltaZ;
150 m[12] = -(right + left) / deltaX;
151 m[13] = -(top + bottom) / deltaY;
152 m[14] = -(near + far) / deltaZ;
156 } // unnamed namespace
158 const Dali::Camera::Type Camera::DEFAULT_TYPE(Dali::Camera::FREE_LOOK);
159 const Dali::Camera::ProjectionMode Camera::DEFAULT_MODE(Dali::Camera::PERSPECTIVE_PROJECTION);
160 const Dali::DevelCameraActor::ProjectionDirection Camera::DEFAULT_PROJECTION_DIRECTION(Dali::DevelCameraActor::VERTICAL);
161 const bool Camera::DEFAULT_INVERT_Y_AXIS(false);
162 const float Camera::DEFAULT_FIELD_OF_VIEW(45.0f * (Math::PI / 180.0f));
163 const float Camera::DEFAULT_ASPECT_RATIO(800.0f / 480.0f);
164 const float Camera::DEFAULT_LEFT_CLIPPING_PLANE(-240.0f);
165 const float Camera::DEFAULT_RIGHT_CLIPPING_PLANE(240.0f);
166 const float Camera::DEFAULT_TOP_CLIPPING_PLANE(-400.0f);
167 const float Camera::DEFAULT_BOTTOM_CLIPPING_PLANE(400.0f);
168 const float Camera::DEFAULT_NEAR_CLIPPING_PLANE(800.0f); // default height of the screen
169 const float Camera::DEFAULT_FAR_CLIPPING_PLANE(DEFAULT_NEAR_CLIPPING_PLANE + 2.f * DEFAULT_NEAR_CLIPPING_PLANE);
170 const Vector3 Camera::DEFAULT_TARGET_POSITION(0.0f, 0.0f, 0.0f);
174 mUpdateViewFlag(UPDATE_COUNT),
175 mUpdateProjectionFlag(UPDATE_COUNT),
176 mProjectionRotation(0),
178 mProjectionMode(DEFAULT_MODE),
179 mProjectionDirection(DEFAULT_PROJECTION_DIRECTION),
180 mInvertYAxis(DEFAULT_INVERT_Y_AXIS),
181 mFieldOfView(DEFAULT_FIELD_OF_VIEW),
182 mAspectRatio(DEFAULT_ASPECT_RATIO),
183 mLeftClippingPlane(DEFAULT_LEFT_CLIPPING_PLANE),
184 mRightClippingPlane(DEFAULT_RIGHT_CLIPPING_PLANE),
185 mTopClippingPlane(DEFAULT_TOP_CLIPPING_PLANE),
186 mBottomClippingPlane(DEFAULT_BOTTOM_CLIPPING_PLANE),
187 mNearClippingPlane(DEFAULT_NEAR_CLIPPING_PLANE),
188 mFarClippingPlane(DEFAULT_FAR_CLIPPING_PLANE),
189 mTargetPosition(DEFAULT_TARGET_POSITION),
192 mInverseViewProjection(Matrix::IDENTITY),
193 mFinalProjection(Matrix::IDENTITY)
195 // set a flag the node to say this is a camera
199 Camera* Camera::New()
201 return new(gCameraMemoryPool.AllocateRawThreadSafe()) Camera();
204 Camera::~Camera() = default;
206 void Camera::operator delete(void* ptr)
208 gCameraMemoryPool.FreeThreadSafe(static_cast<Camera*>(ptr));
211 void Camera::SetType(Dali::Camera::Type type)
216 void Camera::SetProjectionMode(Dali::Camera::ProjectionMode mode)
218 mProjectionMode = mode;
219 mUpdateProjectionFlag = UPDATE_COUNT;
222 void Camera::SetProjectionDirection(Dali::DevelCameraActor::ProjectionDirection direction)
224 mProjectionDirection = direction;
225 mUpdateProjectionFlag = UPDATE_COUNT;
228 void Camera::SetInvertYAxis(bool invertYAxis)
230 mInvertYAxis = invertYAxis;
231 mUpdateProjectionFlag = UPDATE_COUNT;
234 void Camera::BakeFieldOfView(BufferIndex updateBufferIndex, float fieldOfView)
236 mFieldOfView.Bake(updateBufferIndex, fieldOfView);
237 mUpdateProjectionFlag = UPDATE_COUNT;
240 void Camera::SetAspectRatio(float aspectRatio)
242 mAspectRatio = aspectRatio;
243 mUpdateProjectionFlag = UPDATE_COUNT;
246 void Camera::SetLeftClippingPlane(float leftClippingPlane)
248 mLeftClippingPlane = leftClippingPlane;
249 mUpdateProjectionFlag = UPDATE_COUNT;
252 void Camera::SetRightClippingPlane(float rightClippingPlane)
254 mRightClippingPlane = rightClippingPlane;
255 mUpdateProjectionFlag = UPDATE_COUNT;
258 void Camera::SetTopClippingPlane(float topClippingPlane)
260 mTopClippingPlane = topClippingPlane;
261 mUpdateProjectionFlag = UPDATE_COUNT;
264 void Camera::SetBottomClippingPlane(float bottomClippingPlane)
266 mBottomClippingPlane = bottomClippingPlane;
267 mUpdateProjectionFlag = UPDATE_COUNT;
270 void Camera::SetNearClippingPlane(float nearClippingPlane)
272 mNearClippingPlane = nearClippingPlane;
273 mUpdateProjectionFlag = UPDATE_COUNT;
276 void Camera::SetFarClippingPlane(float farClippingPlane)
278 mFarClippingPlane = farClippingPlane;
279 mUpdateProjectionFlag = UPDATE_COUNT;
282 void Camera::SetTargetPosition(const Vector3& targetPosition)
284 mTargetPosition = targetPosition;
285 mUpdateViewFlag = UPDATE_COUNT;
288 void VectorReflectedByPlane(Vector4& out, Vector4& in, Vector4& plane)
290 float d = float(2.0) * plane.Dot(in);
291 out.x = static_cast<float>(in.x - plane.x * d);
292 out.y = static_cast<float>(in.y - plane.y * d);
293 out.z = static_cast<float>(in.z - plane.z * d);
294 out.w = static_cast<float>(in.w - plane.w * d);
297 void Camera::AdjustNearPlaneForPerspective(Matrix& perspective, const Vector4& clipPlane)
300 float* v = perspective.AsFloat();
302 q.x = (Sign(clipPlane.x) + v[8]) / v[0];
303 q.y = (Sign(clipPlane.y) + v[9]) / v[5];
305 q.w = (1.0f + v[10]) / v[14];
307 // Calculate the scaled plane vector
308 Vector4 c = clipPlane * (REFLECTION_NORMALIZED_DEVICE_COORDINATE_PARAMETER_A / q.Dot(clipPlane));
310 // Replace the third row of the projection v
313 v[10] = c.z + REFLECTION_NORMALIZED_DEVICE_COORDINATE_PARAMETER_D;
317 void Camera::SetReflectByPlane(const Vector4& plane)
319 float* v = mReflectionMtx.AsFloat();
320 float _2ab = -2.0f * plane.x * plane.y;
321 float _2ac = -2.0f * plane.x * plane.z;
322 float _2bc = -2.0f * plane.y * plane.z;
324 v[0] = 1.0f - 2.0f * plane.x * plane.x;
330 v[5] = 1.0f - 2.0f * plane.y * plane.y;
336 v[10] = 1.0f - 2.0f * plane.z * plane.z;
339 v[12] = -2 * plane.x * plane.w;
340 v[13] = -2 * plane.y * plane.w;
341 v[14] = -2 * plane.z * plane.w;
344 mUseReflection = true;
345 mReflectionPlane = plane;
346 mUpdateViewFlag = UPDATE_COUNT;
349 void Camera::RotateProjection(int rotationAngle)
351 mProjectionRotation = rotationAngle;
352 mUpdateProjectionFlag = UPDATE_COUNT;
355 const Matrix& Camera::GetProjectionMatrix(BufferIndex bufferIndex) const
357 return mProjectionMatrix[bufferIndex];
360 const Matrix& Camera::GetViewMatrix(BufferIndex bufferIndex) const
362 return mViewMatrix[bufferIndex];
365 const Matrix& Camera::GetInverseViewProjectionMatrix(BufferIndex bufferIndex) const
367 return mInverseViewProjection[bufferIndex];
370 const Matrix& Camera::GetFinalProjectionMatrix(BufferIndex bufferIndex) const
372 return mFinalProjection[bufferIndex];
375 const PropertyBase* Camera::GetFieldOfView() const
377 return &mFieldOfView;
380 const PropertyInputImpl* Camera::GetProjectionMatrix() const
382 return &mProjectionMatrix;
385 const PropertyInputImpl* Camera::GetViewMatrix() const
390 void Camera::Update(BufferIndex updateBufferIndex)
392 // if this has changes in world position we need to update camera for next 2 frames
393 if(IsLocalMatrixDirty())
395 mUpdateViewFlag = UPDATE_COUNT;
397 if(GetDirtyFlags() & NodePropertyFlags::VISIBLE)
399 // If the visibility changes, the projection matrix needs to be re-calculated.
400 // It may happen the first time an actor is rendered it's rendered only once and becomes invisible,
401 // in the following update the node will be skipped leaving the projection matrix (double buffered)
402 // with the Identity.
403 mUpdateProjectionFlag = UPDATE_COUNT;
406 // If projection matrix relative properties are animated now, flag change.
407 if(IsProjectionMatrixAnimated())
409 mUpdateProjectionFlag = UPDATE_COUNT;
412 // if either matrix changed, we need to recalculate the inverse matrix for hit testing to work
413 uint32_t viewUpdateCount = UpdateViewMatrix(updateBufferIndex);
414 uint32_t projectionUpdateCount = UpdateProjection(updateBufferIndex);
416 // if model or view matrix changed we need to either recalculate the inverse VP or copy previous
417 if(viewUpdateCount > COPY_PREVIOUS_MATRIX || projectionUpdateCount > COPY_PREVIOUS_MATRIX)
419 // either has actually changed so recalculate
420 MatrixUtils::Multiply(mInverseViewProjection[updateBufferIndex], mViewMatrix[updateBufferIndex], mProjectionMatrix[updateBufferIndex]);
421 UpdateFrustum(updateBufferIndex);
423 // ignore the error, if the view projection is incorrect (non inversible) then you will have tough times anyways
424 static_cast<void>(mInverseViewProjection[updateBufferIndex].Invert());
426 else if(viewUpdateCount == COPY_PREVIOUS_MATRIX || projectionUpdateCount == COPY_PREVIOUS_MATRIX)
428 // neither has actually changed, but we might copied previous frames value so need to
429 // copy the previous inverse and frustum as well
430 mInverseViewProjection[updateBufferIndex] = mInverseViewProjection[updateBufferIndex ? 0 : 1];
431 mFrustum[updateBufferIndex] = mFrustum[updateBufferIndex ? 0 : 1];
435 bool Camera::ViewMatrixUpdated() const
437 return 0u != mUpdateViewFlag;
440 bool Camera::IsProjectionMatrixAnimated() const
442 return !mFieldOfView.IsClean();
445 uint32_t Camera::UpdateViewMatrix(BufferIndex updateBufferIndex)
447 uint32_t retval(mUpdateViewFlag);
448 if(0u != mUpdateViewFlag)
450 if(COPY_PREVIOUS_MATRIX == mUpdateViewFlag)
452 // The projection matrix was updated in the previous frame; copy it
453 mViewMatrix.CopyPrevious(updateBufferIndex);
455 else // UPDATE_COUNT == mUpdateViewFlag
459 // camera orientation taken from node - i.e. look in abitrary, unconstrained direction
460 case Dali::Camera::FREE_LOOK:
462 Matrix& viewMatrix = mViewMatrix.Get(updateBufferIndex);
463 viewMatrix = GetWorldMatrix(updateBufferIndex);
467 const Matrix& owningNodeMatrix(GetWorldMatrix(updateBufferIndex));
468 Vector3 position{}, scale{};
469 Quaternion orientation{};
470 owningNodeMatrix.GetTransformComponents(position, orientation, scale);
471 mReflectionEye = position;
472 mUseReflectionClip = true;
474 Matrix& viewMatrix = mViewMatrix.Get(updateBufferIndex);
475 Matrix oldViewMatrix(viewMatrix);
476 MatrixUtils::Multiply(viewMatrix, oldViewMatrix, mReflectionMtx);
480 mViewMatrix.SetDirty(updateBufferIndex);
484 // camera orientation constrained to look at a target
485 case Dali::Camera::LOOK_AT_TARGET:
487 const Matrix& owningNodeMatrix(GetWorldMatrix(updateBufferIndex));
488 Vector3 position, scale;
489 Quaternion orientation;
490 owningNodeMatrix.GetTransformComponents(position, orientation, scale);
491 Matrix& viewMatrix = mViewMatrix.Get(updateBufferIndex);
495 Vector3 up = orientation.Rotate(Vector3::YAXIS);
496 Vector4 position4 = Vector4(position);
497 Vector4 target4 = Vector4(mTargetPosition);
498 Vector4 up4 = Vector4(up);
502 Vector3 positionNew3;
503 Vector3 targetNewVector3;
507 VectorReflectedByPlane(positionNew, position4, mReflectionPlane);
508 VectorReflectedByPlane(targetNew, target4, mReflectionPlane);
509 VectorReflectedByPlane(upNew, up4, mReflectionPlane);
511 positionNew3 = Vector3(positionNew);
512 targetNewVector3 = Vector3(targetNew);
513 upNew3 = Vector3(upNew);
514 LookAt(viewMatrix, positionNew3, targetNewVector3, upNew3);
516 Matrix oldViewMatrix(viewMatrix);
518 tmp.SetIdentityAndScale(Vector3(-1.0, 1.0, 1.0));
519 MatrixUtils::Multiply(viewMatrix, oldViewMatrix, tmp);
521 mReflectionEye = positionNew;
522 mUseReflectionClip = true;
526 LookAt(viewMatrix, position, mTargetPosition, orientation.Rotate(Vector3::YAXIS));
528 mViewMatrix.SetDirty(updateBufferIndex);
538 void Camera::UpdateFrustum(BufferIndex updateBufferIndex, bool normalize)
540 // Extract the clip matrix planes
542 MatrixUtils::Multiply(clipMatrix, mViewMatrix[updateBufferIndex], mProjectionMatrix[updateBufferIndex]);
544 const float* cm = clipMatrix.AsFloat();
545 FrustumPlanes& planes = mFrustum[updateBufferIndex];
548 planes.mPlanes[0].mNormal.x = cm[3] + cm[0]; // column 4 + column 1
549 planes.mPlanes[0].mNormal.y = cm[7] + cm[4];
550 planes.mPlanes[0].mNormal.z = cm[11] + cm[8];
551 planes.mPlanes[0].mDistance = cm[15] + cm[12];
554 planes.mPlanes[1].mNormal.x = cm[3] - cm[0]; // column 4 - column 1
555 planes.mPlanes[1].mNormal.y = cm[7] - cm[4];
556 planes.mPlanes[1].mNormal.z = cm[11] - cm[8];
557 planes.mPlanes[1].mDistance = cm[15] - cm[12];
560 planes.mPlanes[2].mNormal.x = cm[3] + cm[1]; // column 4 + column 2
561 planes.mPlanes[2].mNormal.y = cm[7] + cm[5];
562 planes.mPlanes[2].mNormal.z = cm[11] + cm[9];
563 planes.mPlanes[2].mDistance = cm[15] + cm[13];
566 planes.mPlanes[3].mNormal.x = cm[3] - cm[1]; // column 4 - column 2
567 planes.mPlanes[3].mNormal.y = cm[7] - cm[5];
568 planes.mPlanes[3].mNormal.z = cm[11] - cm[9];
569 planes.mPlanes[3].mDistance = cm[15] - cm[13];
572 planes.mPlanes[4].mNormal.x = cm[3] + cm[2]; // column 4 + column 3
573 planes.mPlanes[4].mNormal.y = cm[7] + cm[6];
574 planes.mPlanes[4].mNormal.z = cm[11] + cm[10];
575 planes.mPlanes[4].mDistance = cm[15] + cm[14];
578 planes.mPlanes[5].mNormal.x = cm[3] - cm[2]; // column 4 - column 3
579 planes.mPlanes[5].mNormal.y = cm[7] - cm[6];
580 planes.mPlanes[5].mNormal.z = cm[11] - cm[10];
581 planes.mPlanes[5].mDistance = cm[15] - cm[14];
585 for(uint32_t i = 0; i < 6; ++i)
587 // Normalize planes to ensure correct bounding distance checking
588 Plane& plane = planes.mPlanes[i];
589 float l = 1.0f / plane.mNormal.Length();
591 plane.mDistance *= l;
593 planes.mSign[i] = Vector3(Sign(plane.mNormal.x), Sign(plane.mNormal.y), Sign(plane.mNormal.z));
598 for(uint32_t i = 0; i < 6; ++i)
600 planes.mSign[i] = Vector3(Sign(planes.mPlanes[i].mNormal.x), Sign(planes.mPlanes[i].mNormal.y), Sign(planes.mPlanes[i].mNormal.z));
603 mFrustum[updateBufferIndex ? 0 : 1] = planes;
606 bool Camera::CheckSphereInFrustum(BufferIndex bufferIndex, const Vector3& origin, float radius) const
608 const FrustumPlanes& planes = mFrustum[bufferIndex];
609 for(uint32_t i = 0; i < 6; ++i)
611 if((planes.mPlanes[i].mDistance + planes.mPlanes[i].mNormal.Dot(origin)) < -radius)
619 bool Camera::CheckAABBInFrustum(BufferIndex bufferIndex, const Vector3& origin, const Vector3& halfExtents) const
621 const FrustumPlanes& planes = mFrustum[bufferIndex];
622 for(uint32_t i = 0; i < 6; ++i)
624 if(planes.mPlanes[i].mNormal.Dot(origin + (halfExtents * planes.mSign[i])) > -(planes.mPlanes[i].mDistance))
634 uint32_t Camera::UpdateProjection(BufferIndex updateBufferIndex)
636 uint32_t retval(mUpdateProjectionFlag);
637 // Early-exit if no update required
638 if(0u != mUpdateProjectionFlag)
640 Matrix& finalProjection = mFinalProjection[updateBufferIndex];
641 finalProjection.SetIdentity();
643 if(COPY_PREVIOUS_MATRIX == mUpdateProjectionFlag)
645 // The projection matrix was updated in the previous frame; copy it
646 mProjectionMatrix.CopyPrevious(updateBufferIndex);
648 finalProjection = mFinalProjection[updateBufferIndex ? 0 : 1];
650 else // UPDATE_COUNT == mUpdateProjectionFlag
652 switch(mProjectionMode)
654 case Dali::Camera::PERSPECTIVE_PROJECTION:
656 Matrix& projectionMatrix = mProjectionMatrix.Get(updateBufferIndex);
657 Perspective(projectionMatrix,
658 mProjectionDirection,
659 mFieldOfView[updateBufferIndex],
665 //need to apply custom clipping plane
666 if(mUseReflectionClip)
668 Matrix& viewMatrix = mViewMatrix.Get(updateBufferIndex);
669 Matrix viewInv = viewMatrix;
673 Dali::Vector4 adjReflectPlane = mReflectionPlane;
674 float d = mReflectionPlane.Dot(mReflectionEye);
677 adjReflectPlane.w = -adjReflectPlane.w;
680 Vector4 customClipping = viewInv * adjReflectPlane;
681 AdjustNearPlaneForPerspective(projectionMatrix, customClipping);
686 float* vZ = matZ.AsFloat();
688 MatrixUtils::Multiply(projectionMatrix, projectionMatrix, matZ);
692 case Dali::Camera::ORTHOGRAPHIC_PROJECTION:
694 Matrix& projectionMatrix = mProjectionMatrix.Get(updateBufferIndex);
695 Orthographic(projectionMatrix,
698 mBottomClippingPlane,
707 mProjectionMatrix.SetDirty(updateBufferIndex);
709 Quaternion rotationAngle;
710 switch(mProjectionRotation)
714 rotationAngle = Quaternion(Dali::ANGLE_90, Vector3::ZAXIS);
719 rotationAngle = Quaternion(Dali::ANGLE_180, Vector3::ZAXIS);
724 rotationAngle = Quaternion(Dali::ANGLE_270, Vector3::ZAXIS);
728 rotationAngle = Quaternion(Dali::ANGLE_0, Vector3::ZAXIS);
733 rotation.SetIdentity();
734 rotation.SetTransformComponents(Vector3(1.0f, 1.0f, 1.0f), rotationAngle, Vector3(0.0f, 0.0f, 0.0f));
736 MatrixUtils::Multiply(finalProjection, mProjectionMatrix.Get(updateBufferIndex), rotation);
738 --mUpdateProjectionFlag;
743 } // namespace SceneGraph
745 } // namespace Internal