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", STRING, true, false, true, Dali::CameraActor::Property::TYPE )
50 DALI_PROPERTY( "projectionMode", STRING, 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)
174 CameraActor::~CameraActor()
176 if(EventThreadServices::IsCoreRunning())
178 // Create scene-object and transfer ownership through message
179 RemoveCameraMessage(GetEventThreadServices().GetUpdateManager(), mSceneObject);
183 void CameraActor::OnInitialize()
185 // Create scene-object and keep raw pointer for message passing.
186 SceneGraph::Camera* sceneGraphCamera = SceneGraph::Camera::New();
188 // Store a pointer to this camera node inside the scene-graph camera.
189 sceneGraphCamera->SetNode(&GetNode());
191 mSceneObject = sceneGraphCamera;
192 OwnerPointer<SceneGraph::Camera> sceneGraphCameraOwner(sceneGraphCamera);
194 // Send message to inform update of this camera (and move ownership).
195 AddCameraMessage(GetEventThreadServices().GetUpdateManager(), sceneGraphCameraOwner);
198 void CameraActor::OnSceneConnectionInternal()
200 // If the canvas size has not been set, then use the size of the scene to which we've been added
201 // in order to set up the current projection
202 if((mCanvasSize.width < Math::MACHINE_EPSILON_1000) || (mCanvasSize.height < Math::MACHINE_EPSILON_1000))
204 if(mProjectionMode == Dali::Camera::ORTHOGRAPHIC_PROJECTION)
206 SetOrthographicProjection(GetScene().GetSize());
208 else //if(mProjectionMode == Dali::Camera::PERSPECTIVE_PROJECTION)
210 SetPerspectiveProjection(GetScene().GetSize());
215 void CameraActor::SetReflectByPlane(const Vector4& plane)
219 SetReflectByPlaneMessage(GetEventThreadServices(), *mSceneObject, plane);
223 void CameraActor::SetTarget(const Vector3& target)
225 if(target != mTarget) // using range epsilon
229 SetTargetPositionMessage(GetEventThreadServices(), *mSceneObject, mTarget);
233 Vector3 CameraActor::GetTarget() const
238 void CameraActor::SetType(Dali::Camera::Type type)
244 // sceneObject is being used in a separate thread; queue a message to set
245 SetTypeMessage(GetEventThreadServices(), *mSceneObject, mType);
249 Dali::Camera::Type CameraActor::GetType() const
254 void CameraActor::SetProjectionMode(Dali::Camera::ProjectionMode mode)
256 if(mode != mProjectionMode)
258 mProjectionMode = mode;
260 // sceneObject is being used in a separate thread; queue a message to set
261 SetProjectionModeMessage(GetEventThreadServices(), *mSceneObject, mProjectionMode);
265 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
267 return mProjectionMode;
270 void CameraActor::SetFieldOfView(float fieldOfView)
272 if(!Equals(fieldOfView, mFieldOfView))
274 mFieldOfView = fieldOfView;
276 // sceneObject is being used in a separate thread; queue a message to set
277 SetFieldOfViewMessage(GetEventThreadServices(), *mSceneObject, mFieldOfView);
281 float CameraActor::GetFieldOfView() const
286 void CameraActor::SetAspectRatio(float aspectRatio)
288 if(!Equals(aspectRatio, mAspectRatio))
290 mAspectRatio = aspectRatio;
292 // sceneObject is being used in a separate thread; queue a message to set
293 SetAspectRatioMessage(GetEventThreadServices(), *mSceneObject, mAspectRatio);
297 float CameraActor::GetAspectRatio() const
302 void CameraActor::SetNearClippingPlane(float nearClippingPlane)
304 if(!Equals(nearClippingPlane, mNearClippingPlane))
306 mNearClippingPlane = nearClippingPlane;
308 // sceneObject is being used in a separate thread; queue a message to set
309 SetNearClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mNearClippingPlane);
313 float CameraActor::GetNearClippingPlane() const
315 return mNearClippingPlane;
318 void CameraActor::SetFarClippingPlane(float farClippingPlane)
320 if(!Equals(farClippingPlane, mFarClippingPlane))
322 mFarClippingPlane = farClippingPlane;
324 // sceneObject is being used in a separate thread; queue a message to set
325 SetFarClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mFarClippingPlane);
329 float CameraActor::GetFarClippingPlane() const
331 return mFarClippingPlane;
334 void CameraActor::SetLeftClippingPlane(float leftClippingPlane)
336 if(!Equals(leftClippingPlane, mLeftClippingPlane))
338 mLeftClippingPlane = leftClippingPlane;
340 // sceneObject is being used in a separate thread; queue a message to set
341 SetLeftClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mLeftClippingPlane);
345 void CameraActor::SetRightClippingPlane(float rightClippingPlane)
347 if(!Equals(rightClippingPlane, mRightClippingPlane))
349 mRightClippingPlane = rightClippingPlane;
351 // sceneObject is being used in a separate thread; queue a message to set
352 SetRightClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mRightClippingPlane);
356 void CameraActor::SetTopClippingPlane(float topClippingPlane)
358 if(!Equals(topClippingPlane, mTopClippingPlane))
360 mTopClippingPlane = topClippingPlane;
362 // sceneObject is being used in a separate thread; queue a message to set
363 SetTopClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mTopClippingPlane);
367 void CameraActor::SetBottomClippingPlane(float bottomClippingPlane)
369 if(!Equals(bottomClippingPlane, mBottomClippingPlane))
371 mBottomClippingPlane = bottomClippingPlane;
373 // sceneObject is being used in a separate thread; queue a message to set
374 SetBottomClippingPlaneMessage(GetEventThreadServices(), *mSceneObject, mBottomClippingPlane);
378 void CameraActor::SetInvertYAxis(bool invertYAxis)
380 if(invertYAxis != mInvertYAxis)
382 mInvertYAxis = invertYAxis;
384 // sceneObject is being used in a separate thread; queue a message to set
385 SetInvertYAxisMessage(GetEventThreadServices(), *mSceneObject, mInvertYAxis);
389 bool CameraActor::GetInvertYAxis() const
394 void CameraActor::SetPerspectiveProjection(const Size& size)
396 SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
399 if((size.width < Math::MACHINE_EPSILON_1000) || (size.height < Math::MACHINE_EPSILON_1000))
401 // If the size given is invalid, i.e. ZERO, then check if we've been added to a scene
404 // We've been added to a scene already, set the canvas size to the scene's size
405 mCanvasSize = GetScene().GetSize();
409 // We've not been added to a scene yet, so just return.
410 // We'll set the canvas size when we get added to a scene later
415 float width = mCanvasSize.width;
416 float height = mCanvasSize.height;
418 float nearClippingPlane;
419 float farClippingPlane;
421 CalculateClippingAndZ(width, height, nearClippingPlane, farClippingPlane, cameraZ);
423 // calculate the position of the camera to have the desired aspect ratio
424 const float fieldOfView = 2.0f * std::atan(height * 0.5f / cameraZ);
426 // unless it is too small, we want at least as much space to the back as we have torwards the front
427 const float minClippingFarPlane = 2.f * nearClippingPlane;
428 if(farClippingPlane < minClippingFarPlane)
430 farClippingPlane = minClippingFarPlane;
433 const float aspectRatio = width / height;
435 // sceneObject is being used in a separate thread; queue a message to set
436 SetFieldOfView(fieldOfView);
437 SetNearClippingPlane(nearClippingPlane);
438 SetFarClippingPlane(farClippingPlane);
439 SetLeftClippingPlane(width * -0.5f);
440 SetRightClippingPlane(width * 0.5f);
441 SetTopClippingPlane(height * 0.5f); // Top is +ve to keep consistency with orthographic values
442 SetBottomClippingPlane(height * -0.5f); // Bottom is -ve to keep consistency with orthographic values
443 SetAspectRatio(aspectRatio);
447 void CameraActor::SetOrthographicProjection(const Vector2& size)
449 SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
452 if((size.width < Math::MACHINE_EPSILON_1000) || (size.height < Math::MACHINE_EPSILON_1000))
454 // If the size given is invalid, i.e. ZERO, then check if we've been added to a scene
457 // We've been added to a scene already, set the canvas size to the scene's size
458 mCanvasSize = GetScene().GetSize();
462 // We've not been added to a scene yet, so just return.
463 // We'll set the canvas size when we get added to a scene later
468 // Choose near, far and Z parameters to match the SetPerspectiveProjection above.
469 float nearClippingPlane;
470 float farClippingPlane;
472 CalculateClippingAndZ(size.width, size.height, nearClippingPlane, farClippingPlane, cameraZ);
473 SetOrthographicProjection(-size.x * 0.5f, size.x * 0.5f, size.y * 0.5f, size.y * -0.5f, nearClippingPlane, farClippingPlane);
477 void CameraActor::SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far)
479 SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
480 SetLeftClippingPlane(left);
481 SetRightClippingPlane(right);
482 SetTopClippingPlane(top);
483 SetBottomClippingPlane(bottom);
484 SetNearClippingPlane(near);
485 SetFarClippingPlane(far);
488 bool CameraActor::BuildPickingRay(const Vector2& screenCoordinates,
489 const Viewport& viewport,
491 Vector4& rayDirection)
494 if(mProjectionMode == Dali::Camera::PERSPECTIVE_PROJECTION)
496 // Build a picking ray in the world reference system.
497 // ray starts from the camera world position
498 rayOrigin = GetNode().GetWorldMatrix(0).GetTranslation();
501 // Transform the touch point from the screen coordinate system to the world coordinates system.
502 Vector4 near(screenCoordinates.x - static_cast<float>(viewport.x),
503 static_cast<float>(viewport.height) - (screenCoordinates.y - static_cast<float>(viewport.y)),
506 const Matrix& inverseViewProjection = mSceneObject->GetInverseViewProjectionMatrix(GetEventThreadServices().GetEventBufferIndex());
507 success = Unproject(near, inverseViewProjection, static_cast<float>(viewport.width), static_cast<float>(viewport.height), near);
509 // Compute the ray's director vector.
510 rayDirection.x = near.x - rayOrigin.x;
511 rayDirection.y = near.y - rayOrigin.y;
512 rayDirection.z = near.z - rayOrigin.z;
513 rayDirection.Normalize();
514 rayDirection.w = 1.f;
518 float nearPlaneDistance = GetNearClippingPlane();
519 BuildOrthoPickingRay(GetViewMatrix(),
520 GetProjectionMatrix(),
532 const Matrix& CameraActor::GetViewMatrix() const
536 return mSceneObject->GetViewMatrix(GetEventThreadServices().GetEventBufferIndex());
540 return Matrix::IDENTITY;
544 const Matrix& CameraActor::GetProjectionMatrix() const
548 return mSceneObject->GetProjectionMatrix(GetEventThreadServices().GetEventBufferIndex());
552 return Matrix::IDENTITY;
555 const SceneGraph::Camera* CameraActor::GetCamera() const
560 void CameraActor::RotateProjection(int rotationAngle)
562 // sceneObject is being used in a separate thread; queue a message to set
563 RotateProjectionMessage(GetEventThreadServices(), *mSceneObject, rotationAngle);
566 void CameraActor::SetDefaultProperty(Property::Index index, const Property::Value& propertyValue)
568 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
570 Actor::SetDefaultProperty(index, propertyValue);
576 case Dali::CameraActor::Property::TYPE:
578 std::string s(propertyValue.Get<std::string>());
579 if(s == "LOOK_AT_TARGET")
581 SetType(Dali::Camera::LOOK_AT_TARGET);
583 else if(s == "FREE_LOOK")
585 SetType(Dali::Camera::FREE_LOOK);
589 case Dali::CameraActor::Property::PROJECTION_MODE:
591 std::string s(propertyValue.Get<std::string>());
592 if(s == "PERSPECTIVE_PROJECTION")
594 SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
596 else if(s == "ORTHOGRAPHIC_PROJECTION")
598 SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
602 case Dali::CameraActor::Property::FIELD_OF_VIEW:
604 SetFieldOfView(propertyValue.Get<float>()); // set to 0 in case property is not float
607 case Dali::CameraActor::Property::ASPECT_RATIO:
609 SetAspectRatio(propertyValue.Get<float>()); // set to 0 in case property is not float
612 case Dali::CameraActor::Property::NEAR_PLANE_DISTANCE:
614 SetNearClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
617 case Dali::CameraActor::Property::FAR_PLANE_DISTANCE:
619 SetFarClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
622 case Dali::CameraActor::Property::LEFT_PLANE_DISTANCE:
624 SetLeftClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
627 case Dali::CameraActor::Property::RIGHT_PLANE_DISTANCE:
629 SetRightClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
632 case Dali::CameraActor::Property::TOP_PLANE_DISTANCE:
634 SetTopClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
637 case Dali::CameraActor::Property::BOTTOM_PLANE_DISTANCE:
639 SetBottomClippingPlane(propertyValue.Get<float>()); // set to 0 in case property is not float
642 case Dali::CameraActor::Property::TARGET_POSITION:
644 SetTarget(propertyValue.Get<Vector3>()); // set to 0 in case property is not Vector3
647 case Dali::CameraActor::Property::PROJECTION_MATRIX:
649 DALI_LOG_WARNING("projection-matrix is read-only\n");
652 case Dali::CameraActor::Property::VIEW_MATRIX:
654 DALI_LOG_WARNING("view-matrix is read-only\n");
657 case Dali::CameraActor::Property::INVERT_Y_AXIS:
659 SetInvertYAxis(propertyValue.Get<bool>()); // set to false in case property is not bool
662 case Dali::DevelCameraActor::Property::REFLECTION_PLANE:
664 SetReflectByPlane(propertyValue.Get<Vector4>());
670 DALI_LOG_WARNING("Unknown property (%d)\n", index);
678 Property::Value CameraActor::GetDefaultProperty(Property::Index index) const
681 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
683 ret = Actor::GetDefaultProperty(index);
689 case Dali::CameraActor::Property::TYPE:
691 if(Dali::Camera::LOOK_AT_TARGET == mType)
693 ret = "LOOK_AT_TARGET";
695 else if(Dali::Camera::FREE_LOOK == mType)
701 case Dali::CameraActor::Property::PROJECTION_MODE:
703 if(Dali::Camera::PERSPECTIVE_PROJECTION == mProjectionMode)
705 ret = "PERSPECTIVE_PROJECTION";
707 else if(Dali::Camera::ORTHOGRAPHIC_PROJECTION == mProjectionMode)
709 ret = "ORTHOGRAPHIC_PROJECTION";
713 case Dali::CameraActor::Property::FIELD_OF_VIEW:
718 case Dali::CameraActor::Property::ASPECT_RATIO:
723 case Dali::CameraActor::Property::NEAR_PLANE_DISTANCE:
725 ret = mNearClippingPlane;
728 case Dali::CameraActor::Property::FAR_PLANE_DISTANCE:
730 ret = mFarClippingPlane;
733 case Dali::CameraActor::Property::LEFT_PLANE_DISTANCE:
735 ret = mLeftClippingPlane;
738 case Dali::CameraActor::Property::RIGHT_PLANE_DISTANCE:
740 ret = mRightClippingPlane;
743 case Dali::CameraActor::Property::TOP_PLANE_DISTANCE:
745 ret = mTopClippingPlane;
748 case Dali::CameraActor::Property::BOTTOM_PLANE_DISTANCE:
750 ret = mBottomClippingPlane;
753 case Dali::CameraActor::Property::TARGET_POSITION:
758 case Dali::CameraActor::Property::PROJECTION_MATRIX:
760 ret = GetProjectionMatrix(); // Only on scene-graph
763 case Dali::CameraActor::Property::VIEW_MATRIX:
765 ret = GetViewMatrix(); // Only on scene-graph
768 case Dali::CameraActor::Property::INVERT_Y_AXIS:
779 Property::Value CameraActor::GetDefaultPropertyCurrentValue(Property::Index index) const
782 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
784 ret = Actor::GetDefaultPropertyCurrentValue(index);
788 ret = GetDefaultProperty(index); // Most are event-side properties, the scene-graph properties are only on the scene-graph
794 const PropertyInputImpl* CameraActor::GetSceneObjectInputProperty(Property::Index index) const
796 const PropertyInputImpl* property(nullptr);
800 case Dali::CameraActor::Property::PROJECTION_MATRIX:
802 property = mSceneObject->GetProjectionMatrix();
805 case Dali::CameraActor::Property::VIEW_MATRIX:
807 property = mSceneObject->GetViewMatrix();
810 // no default on purpose as we chain method up to actor
814 property = Actor::GetSceneObjectInputProperty(index);
820 } // namespace Internal