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/event/actors/camera-actor-impl.h>
23 #include <cstring> // for strcmp
26 #include <dali/devel-api/actors/camera-actor-devel.h>
27 #include <dali/internal/event/common/projection.h>
28 #include <dali/internal/event/common/property-helper.h>
29 #include <dali/internal/event/common/thread-local-storage.h>
30 #include <dali/public-api/object/type-registry.h>
32 #include <dali/internal/update/manager/update-manager.h>
43 * We want to discourage the use of property strings (minimize string comparisons),
44 * particularly for the default properties.
45 * Name Type writable animatable constraint-input enum for index-checking
48 DALI_PROPERTY_TABLE_BEGIN
49 DALI_PROPERTY( "type", INTEGER, true, false, true, Dali::CameraActor::Property::TYPE )
50 DALI_PROPERTY( "projectionMode", INTEGER, true, false, true, Dali::CameraActor::Property::PROJECTION_MODE )
51 DALI_PROPERTY( "fieldOfView", FLOAT, true, false, true, Dali::CameraActor::Property::FIELD_OF_VIEW )
52 DALI_PROPERTY( "aspectRatio", FLOAT, true, false, true, Dali::CameraActor::Property::ASPECT_RATIO )
53 DALI_PROPERTY( "nearPlaneDistance", FLOAT, true, false, true, Dali::CameraActor::Property::NEAR_PLANE_DISTANCE )
54 DALI_PROPERTY( "farPlaneDistance", FLOAT, true, false, true, Dali::CameraActor::Property::FAR_PLANE_DISTANCE )
55 DALI_PROPERTY( "leftPlaneDistance", FLOAT, true, false, true, Dali::CameraActor::Property::LEFT_PLANE_DISTANCE )
56 DALI_PROPERTY( "rightPlaneDistance", FLOAT, true, false, true, Dali::CameraActor::Property::RIGHT_PLANE_DISTANCE )
57 DALI_PROPERTY( "topPlaneDistance", FLOAT, true, false, true, Dali::CameraActor::Property::TOP_PLANE_DISTANCE )
58 DALI_PROPERTY( "bottomPlaneDistance", FLOAT, true, false, true, Dali::CameraActor::Property::BOTTOM_PLANE_DISTANCE )
59 DALI_PROPERTY( "targetPosition", VECTOR3, true, false, true, Dali::CameraActor::Property::TARGET_POSITION )
60 DALI_PROPERTY( "projectionMatrix", MATRIX, false, false, true, Dali::CameraActor::Property::PROJECTION_MATRIX )
61 DALI_PROPERTY( "viewMatrix", MATRIX, false, false, true, Dali::CameraActor::Property::VIEW_MATRIX )
62 DALI_PROPERTY( "invertYAxis", BOOLEAN, true, false, true, Dali::CameraActor::Property::INVERT_Y_AXIS )
63 DALI_PROPERTY_TABLE_END( DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX, CameraDefaultProperties )
66 // calculate the far plane distance for a 16bit depth buffer with 4 bits per unit precision
67 void CalculateClippingAndZ(float width, float height, float& nearClippingPlane, float& farClippingPlane, float& cameraZ)
69 nearClippingPlane = std::max(width, height);
70 farClippingPlane = nearClippingPlane + static_cast<float>(0xFFFF >> 4);
71 cameraZ = 2.0f * nearClippingPlane;
76 return Dali::CameraActor::New();
79 TypeRegistration mType(typeid(Dali::CameraActor), typeid(Dali::Actor), Create, CameraDefaultProperties);
82 * Builds the picking ray in the world reference system from an orthographic camera
83 * The ray origin is the screen coordinate in the near plane translated to a parallel
84 * plane at the camera origin. The ray direction is the direction the camera is facing
85 * (i.e. Z=-1 in view space).
87 void BuildOrthoPickingRay(const Matrix& viewMatrix,
88 const Matrix& projectionMatrix,
89 const Viewport& viewport,
94 float nearPlaneDistance)
96 // inv( modelMatrix ) inv( viewMatrix ) inv( projectionMatrix ) normalize
97 // <----------------- <----------------- <-------------- <-------------
98 // Local World Camera Normalized Screen
99 // reference reference reference clip coordinates
100 // system system system coordinates
101 // -----------------> -----------------> --------------> ------------->
102 // modelMatrix viewMatrix projectionMatrix viewport
104 // Transforms the touch point from the screen reference system to the world reference system.
105 Matrix invViewProjection(false); // Don't initialize.
106 Matrix::Multiply(invViewProjection, viewMatrix, projectionMatrix);
107 if(!invViewProjection.Invert())
109 DALI_ASSERT_DEBUG(false);
112 Vector4 near(screenX - static_cast<float>(viewport.x),
113 static_cast<float>(viewport.height) - (screenY - static_cast<float>(viewport.y)),
116 if(!Unproject(near, invViewProjection, static_cast<float>(viewport.width), static_cast<float>(viewport.height), rayOrigin))
118 DALI_ASSERT_DEBUG(false);
121 Matrix invView = viewMatrix;
122 if(!invView.Invert())
124 DALI_ASSERT_DEBUG(false);
127 Vector4 cameraOrigin = invView * Vector4(0.f, 0.f, 0.f, 1.f);
128 Vector4 nearPlaneOrigin = invView * Vector4(0.0f, 0.0f, -nearPlaneDistance, 1.0f);
130 // Vector pointing from the camera to the near plane
131 rayDir = cameraOrigin - nearPlaneOrigin;
139 CameraActorPtr CameraActor::New(const Size& size)
141 CameraActorPtr actor(new CameraActor(*CreateNode()));
143 // Second-phase construction
146 actor->SetName("DefaultCamera");
147 actor->SetPerspectiveProjection(size);
149 // By default Actors face in the positive Z direction in world space
150 // CameraActors should face in the negative Z direction, towards the other actors
151 actor->SetOrientation(Quaternion(Dali::ANGLE_180, Vector3::YAXIS));
156 CameraActor::CameraActor(const SceneGraph::Node& node)
157 : Actor(Actor::BASIC, node),
158 mSceneObject(nullptr),
159 mTarget(SceneGraph::Camera::DEFAULT_TARGET_POSITION),
160 mType(SceneGraph::Camera::DEFAULT_TYPE),
161 mProjectionMode(SceneGraph::Camera::DEFAULT_MODE),
162 mFieldOfView(SceneGraph::Camera::DEFAULT_FIELD_OF_VIEW),
163 mAspectRatio(SceneGraph::Camera::DEFAULT_ASPECT_RATIO),
164 mNearClippingPlane(SceneGraph::Camera::DEFAULT_NEAR_CLIPPING_PLANE),
165 mFarClippingPlane(SceneGraph::Camera::DEFAULT_FAR_CLIPPING_PLANE),
166 mLeftClippingPlane(SceneGraph::Camera::DEFAULT_LEFT_CLIPPING_PLANE),
167 mRightClippingPlane(SceneGraph::Camera::DEFAULT_RIGHT_CLIPPING_PLANE),
168 mTopClippingPlane(SceneGraph::Camera::DEFAULT_TOP_CLIPPING_PLANE),
169 mBottomClippingPlane(SceneGraph::Camera::DEFAULT_BOTTOM_CLIPPING_PLANE),
170 mInvertYAxis(SceneGraph::Camera::DEFAULT_INVERT_Y_AXIS),
171 mPropertyChanged(false)
175 CameraActor::~CameraActor()
177 if(EventThreadServices::IsCoreRunning())
179 // Create scene-object and transfer ownership through message
180 RemoveCameraMessage(GetEventThreadServices().GetUpdateManager(), mSceneObject);
184 void CameraActor::OnInitialize()
186 // Create scene-object and keep raw pointer for message passing.
187 SceneGraph::Camera* sceneGraphCamera = SceneGraph::Camera::New();
189 // Store a pointer to this camera node inside the scene-graph camera.
190 sceneGraphCamera->SetNode(&GetNode());
192 mSceneObject = sceneGraphCamera;
193 OwnerPointer<SceneGraph::Camera> sceneGraphCameraOwner(sceneGraphCamera);
195 // Send message to inform update of this camera (and move ownership).
196 AddCameraMessage(GetEventThreadServices().GetUpdateManager(), sceneGraphCameraOwner);
199 void CameraActor::OnSceneConnectionInternal()
201 // If the canvas size has not been set, then use the size of the scene to which we've been added
202 // in order to set up the current projection
203 if(!mPropertyChanged && ((mCanvasSize.width < Math::MACHINE_EPSILON_1000) || (mCanvasSize.height < Math::MACHINE_EPSILON_1000)))
205 if(mProjectionMode == Dali::Camera::ORTHOGRAPHIC_PROJECTION)
207 SetOrthographicProjection(GetScene().GetSize());
209 else //if(mProjectionMode == Dali::Camera::PERSPECTIVE_PROJECTION)
211 SetPerspectiveProjection(GetScene().GetSize());
216 void CameraActor::SetReflectByPlane(const Vector4& plane)
220 SetReflectByPlaneMessage(GetEventThreadServices(), *mSceneObject, plane);
224 void CameraActor::SetTarget(const Vector3& target)
226 mPropertyChanged = true;
227 if(target != mTarget) // using range epsilon
231 SetTargetPositionMessage(GetEventThreadServices(), *mSceneObject, mTarget);
235 Vector3 CameraActor::GetTarget() const
240 void CameraActor::SetType(Dali::Camera::Type type)
246 // sceneObject is being used in a separate thread; queue a message to set
247 SetTypeMessage(GetEventThreadServices(), *mSceneObject, mType);
251 Dali::Camera::Type CameraActor::GetType() const
256 void CameraActor::SetProjectionMode(Dali::Camera::ProjectionMode mode)
258 if(mode != mProjectionMode)
260 mProjectionMode = mode;
262 // sceneObject is being used in a separate thread; queue a message to set
263 SetProjectionModeMessage(GetEventThreadServices(), *mSceneObject, mProjectionMode);
267 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
269 return mProjectionMode;
272 void CameraActor::SetFieldOfView(float fieldOfView)
274 mPropertyChanged = true;
275 if(!Equals(fieldOfView, mFieldOfView))
277 mFieldOfView = fieldOfView;
279 // sceneObject is being used in a separate thread; queue a message to set
280 SetFieldOfViewMessage(GetEventThreadServices(), *mSceneObject, mFieldOfView);
284 float CameraActor::GetFieldOfView() const
289 void CameraActor::SetAspectRatio(float aspectRatio)
291 mPropertyChanged = true;
292 if(!Equals(aspectRatio, mAspectRatio))
294 mAspectRatio = aspectRatio;
296 // sceneObject is being used in a separate thread; queue a message to set
297 SetAspectRatioMessage(GetEventThreadServices(), *mSceneObject, mAspectRatio);
301 float CameraActor::GetAspectRatio() const
306 void CameraActor::SetNearClippingPlane(float nearClippingPlane)
308 mPropertyChanged = true;
309 if(!Equals(nearClippingPlane, mNearClippingPlane))
311 mNearClippingPlane = nearClippingPlane;
313 // sceneObject is being used in a separate thread; queue a message to set
314 SetNearClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mNearClippingPlane);
318 float CameraActor::GetNearClippingPlane() const
320 return mNearClippingPlane;
323 void CameraActor::SetFarClippingPlane(float farClippingPlane)
325 mPropertyChanged = true;
326 if(!Equals(farClippingPlane, mFarClippingPlane))
328 mFarClippingPlane = farClippingPlane;
330 // sceneObject is being used in a separate thread; queue a message to set
331 SetFarClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mFarClippingPlane);
335 float CameraActor::GetFarClippingPlane() const
337 return mFarClippingPlane;
340 void CameraActor::SetLeftClippingPlane(float leftClippingPlane)
342 mPropertyChanged = true;
343 if(!Equals(leftClippingPlane, mLeftClippingPlane))
345 mLeftClippingPlane = leftClippingPlane;
347 // sceneObject is being used in a separate thread; queue a message to set
348 SetLeftClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mLeftClippingPlane);
352 void CameraActor::SetRightClippingPlane(float rightClippingPlane)
354 mPropertyChanged = true;
355 if(!Equals(rightClippingPlane, mRightClippingPlane))
357 mRightClippingPlane = rightClippingPlane;
359 // sceneObject is being used in a separate thread; queue a message to set
360 SetRightClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mRightClippingPlane);
364 void CameraActor::SetTopClippingPlane(float topClippingPlane)
366 mPropertyChanged = true;
367 if(!Equals(topClippingPlane, mTopClippingPlane))
369 mTopClippingPlane = topClippingPlane;
371 // sceneObject is being used in a separate thread; queue a message to set
372 SetTopClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mTopClippingPlane);
376 void CameraActor::SetBottomClippingPlane(float bottomClippingPlane)
378 mPropertyChanged = true;
379 if(!Equals(bottomClippingPlane, mBottomClippingPlane))
381 mBottomClippingPlane = bottomClippingPlane;
383 // sceneObject is being used in a separate thread; queue a message to set
384 SetBottomClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mBottomClippingPlane);
388 void CameraActor::SetInvertYAxis(bool invertYAxis)
390 if(invertYAxis != mInvertYAxis)
392 mInvertYAxis = invertYAxis;
394 // sceneObject is being used in a separate thread; queue a message to set
395 SetInvertYAxisMessage(GetEventThreadServices(), *mSceneObject, mInvertYAxis);
399 bool CameraActor::GetInvertYAxis() const
404 void CameraActor::SetPerspectiveProjection(const Size& size)
406 SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
409 if((size.width < Math::MACHINE_EPSILON_1000) || (size.height < Math::MACHINE_EPSILON_1000))
411 // If the size given is invalid, i.e. ZERO, then check if we've been added to a scene
414 // We've been added to a scene already, set the canvas size to the scene's size
415 mCanvasSize = GetScene().GetSize();
419 // We've not been added to a scene yet, so just return.
420 // We'll set the canvas size when we get added to a scene later
425 float width = mCanvasSize.width;
426 float height = mCanvasSize.height;
428 float nearClippingPlane;
429 float farClippingPlane;
431 CalculateClippingAndZ(width, height, nearClippingPlane, farClippingPlane, cameraZ);
433 // calculate the position of the camera to have the desired aspect ratio
434 const float fieldOfView = 2.0f * std::atan(height * 0.5f / cameraZ);
436 // unless it is too small, we want at least as much space to the back as we have torwards the front
437 const float minClippingFarPlane = 2.f * nearClippingPlane;
438 if(farClippingPlane < minClippingFarPlane)
440 farClippingPlane = minClippingFarPlane;
443 const float aspectRatio = width / height;
445 // sceneObject is being used in a separate thread; queue a message to set
446 SetFieldOfView(fieldOfView);
447 SetNearClippingPlane(nearClippingPlane);
448 SetFarClippingPlane(farClippingPlane);
449 SetLeftClippingPlane(width * -0.5f);
450 SetRightClippingPlane(width * 0.5f);
451 SetTopClippingPlane(height * 0.5f); // Top is +ve to keep consistency with orthographic values
452 SetBottomClippingPlane(height * -0.5f); // Bottom is -ve to keep consistency with orthographic values
453 SetAspectRatio(aspectRatio);
457 void CameraActor::SetOrthographicProjection(const Vector2& size)
459 SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
462 if((size.width < Math::MACHINE_EPSILON_1000) || (size.height < Math::MACHINE_EPSILON_1000))
464 // If the size given is invalid, i.e. ZERO, then check if we've been added to a scene
467 // We've been added to a scene already, set the canvas size to the scene's size
468 mCanvasSize = GetScene().GetSize();
472 // We've not been added to a scene yet, so just return.
473 // We'll set the canvas size when we get added to a scene later
478 // Choose near, far and Z parameters to match the SetPerspectiveProjection above.
479 float nearClippingPlane;
480 float farClippingPlane;
482 CalculateClippingAndZ(size.width, size.height, nearClippingPlane, farClippingPlane, cameraZ);
483 SetOrthographicProjection(-size.x * 0.5f, size.x * 0.5f, size.y * 0.5f, size.y * -0.5f, nearClippingPlane, farClippingPlane);
487 void CameraActor::SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far)
489 SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
490 SetLeftClippingPlane(left);
491 SetRightClippingPlane(right);
492 SetTopClippingPlane(top);
493 SetBottomClippingPlane(bottom);
494 SetNearClippingPlane(near);
495 SetFarClippingPlane(far);
498 bool CameraActor::BuildPickingRay(const Vector2& screenCoordinates,
499 const Viewport& viewport,
501 Vector4& rayDirection)
504 if(mProjectionMode == Dali::Camera::PERSPECTIVE_PROJECTION)
506 // Build a picking ray in the world reference system.
507 // ray starts from the camera world position
508 rayOrigin = GetNode().GetWorldMatrix(0).GetTranslation();
511 // Transform the touch point from the screen coordinate system to the world coordinates system.
512 Vector4 near(screenCoordinates.x - static_cast<float>(viewport.x),
513 static_cast<float>(viewport.height) - (screenCoordinates.y - static_cast<float>(viewport.y)),
516 const Matrix& inverseViewProjection = mSceneObject->GetInverseViewProjectionMatrix(GetEventThreadServices().GetEventBufferIndex());
517 success = Unproject(near, inverseViewProjection, static_cast<float>(viewport.width), static_cast<float>(viewport.height), near);
519 // Compute the ray's director vector.
520 rayDirection.x = near.x - rayOrigin.x;
521 rayDirection.y = near.y - rayOrigin.y;
522 rayDirection.z = near.z - rayOrigin.z;
523 rayDirection.Normalize();
524 rayDirection.w = 1.f;
528 float nearPlaneDistance = GetNearClippingPlane();
529 BuildOrthoPickingRay(GetViewMatrix(),
530 GetProjectionMatrix(),
542 const Matrix& CameraActor::GetViewMatrix() const
546 return mSceneObject->GetViewMatrix(GetEventThreadServices().GetEventBufferIndex());
550 return Matrix::IDENTITY;
554 const Matrix& CameraActor::GetProjectionMatrix() const
558 return mSceneObject->GetProjectionMatrix(GetEventThreadServices().GetEventBufferIndex());
562 return Matrix::IDENTITY;
565 const SceneGraph::Camera* CameraActor::GetCamera() const
570 void CameraActor::RotateProjection(int rotationAngle)
572 // sceneObject is being used in a separate thread; queue a message to set
573 RotateProjectionMessage(GetEventThreadServices(), *mSceneObject, rotationAngle);
576 void CameraActor::SetDefaultProperty(Property::Index index, const Property::Value& propertyValue)
578 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
580 Actor::SetDefaultProperty(index, propertyValue);
586 case Dali::CameraActor::Property::TYPE:
588 Dali::Camera::Type cameraType = Dali::Camera::Type(propertyValue.Get<int>());
592 case Dali::CameraActor::Property::PROJECTION_MODE:
594 Dali::Camera::ProjectionMode projectionMode = Dali::Camera::ProjectionMode(propertyValue.Get<int>());
595 SetProjectionMode(projectionMode);
598 case Dali::CameraActor::Property::FIELD_OF_VIEW:
600 SetFieldOfView(propertyValue.Get<float>()); // set to 0 in case property is not float
603 case Dali::CameraActor::Property::ASPECT_RATIO:
605 SetAspectRatio(propertyValue.Get<float>()); // set to 0 in case property is not float
608 case Dali::CameraActor::Property::NEAR_PLANE_DISTANCE:
610 SetNearClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
613 case Dali::CameraActor::Property::FAR_PLANE_DISTANCE:
615 SetFarClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
618 case Dali::CameraActor::Property::LEFT_PLANE_DISTANCE:
620 SetLeftClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
623 case Dali::CameraActor::Property::RIGHT_PLANE_DISTANCE:
625 SetRightClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
628 case Dali::CameraActor::Property::TOP_PLANE_DISTANCE:
630 SetTopClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
633 case Dali::CameraActor::Property::BOTTOM_PLANE_DISTANCE:
635 SetBottomClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
638 case Dali::CameraActor::Property::TARGET_POSITION:
640 SetTarget(propertyValue.Get<Vector3>()); // set to 0 in case property is not Vector3
643 case Dali::CameraActor::Property::PROJECTION_MATRIX:
645 DALI_LOG_WARNING("projection-matrix is read-only\n");
648 case Dali::CameraActor::Property::VIEW_MATRIX:
650 DALI_LOG_WARNING("view-matrix is read-only\n");
653 case Dali::CameraActor::Property::INVERT_Y_AXIS:
655 SetInvertYAxis(propertyValue.Get<bool>()); // set to false in case property is not bool
658 case Dali::DevelCameraActor::Property::REFLECTION_PLANE:
660 SetReflectByPlane(propertyValue.Get<Vector4>());
666 DALI_LOG_WARNING("Unknown property (%d)\n", index);
674 Property::Value CameraActor::GetDefaultProperty(Property::Index index) const
677 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
679 ret = Actor::GetDefaultProperty(index);
685 case Dali::CameraActor::Property::TYPE:
690 case Dali::CameraActor::Property::PROJECTION_MODE:
692 ret = mProjectionMode;
695 case Dali::CameraActor::Property::FIELD_OF_VIEW:
700 case Dali::CameraActor::Property::ASPECT_RATIO:
705 case Dali::CameraActor::Property::NEAR_PLANE_DISTANCE:
707 ret = mNearClippingPlane;
710 case Dali::CameraActor::Property::FAR_PLANE_DISTANCE:
712 ret = mFarClippingPlane;
715 case Dali::CameraActor::Property::LEFT_PLANE_DISTANCE:
717 ret = mLeftClippingPlane;
720 case Dali::CameraActor::Property::RIGHT_PLANE_DISTANCE:
722 ret = mRightClippingPlane;
725 case Dali::CameraActor::Property::TOP_PLANE_DISTANCE:
727 ret = mTopClippingPlane;
730 case Dali::CameraActor::Property::BOTTOM_PLANE_DISTANCE:
732 ret = mBottomClippingPlane;
735 case Dali::CameraActor::Property::TARGET_POSITION:
740 case Dali::CameraActor::Property::PROJECTION_MATRIX:
742 ret = GetProjectionMatrix(); // Only on scene-graph
745 case Dali::CameraActor::Property::VIEW_MATRIX:
747 ret = GetViewMatrix(); // Only on scene-graph
750 case Dali::CameraActor::Property::INVERT_Y_AXIS:
761 Property::Value CameraActor::GetDefaultPropertyCurrentValue(Property::Index index) const
764 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
766 ret = Actor::GetDefaultPropertyCurrentValue(index);
770 ret = GetDefaultProperty(index); // Most are event-side properties, the scene-graph properties are only on the scene-graph
776 const PropertyInputImpl* CameraActor::GetSceneObjectInputProperty(Property::Index index) const
778 const PropertyInputImpl* property(nullptr);
782 case Dali::CameraActor::Property::PROJECTION_MATRIX:
784 property = mSceneObject->GetProjectionMatrix();
787 case Dali::CameraActor::Property::VIEW_MATRIX:
789 property = mSceneObject->GetViewMatrix();
792 // no default on purpose as we chain method up to actor
796 property = Actor::GetSceneObjectInputProperty(index);
802 void CameraActor::OnPropertySet(Property::Index index, const Property::Value& propertyValue)
804 // If Position or Orientation are explicitly set, make mPropertyChanged flag true.
805 if(index == Dali::Actor::Property::POSITION ||
806 index == Dali::Actor::Property::POSITION_X ||
807 index == Dali::Actor::Property::POSITION_Y ||
808 index == Dali::Actor::Property::POSITION_Z ||
809 index == Dali::Actor::Property::ORIENTATION)
811 mPropertyChanged = true;
815 } // namespace Internal