2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
18 #include <dali/internal/event/actors/camera-actor-impl.h>
21 #include <dali/public-api/common/stage.h>
22 #include <dali/public-api/object/type-registry.h>
23 #include <dali/internal/event/actor-attachments/camera-attachment-impl.h>
24 #include <dali/internal/event/common/property-index-ranges.h>
25 #include <dali/internal/event/common/stage-impl.h>
26 #include <dali/internal/event/render-tasks/render-task-impl.h>
27 #include <dali/internal/event/render-tasks/render-task-list-impl.h>
28 #include <dali/internal/event/common/projection.h>
29 #include <dali/integration-api/debug.h>
34 const Property::Index CameraActor::TYPE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
35 const Property::Index CameraActor::PROJECTION_MODE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 1;
36 const Property::Index CameraActor::FIELD_OF_VIEW = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 2;
37 const Property::Index CameraActor::ASPECT_RATIO = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 3;
38 const Property::Index CameraActor::NEAR_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 4;
39 const Property::Index CameraActor::FAR_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 5;
40 const Property::Index CameraActor::LEFT_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 6;
41 const Property::Index CameraActor::RIGHT_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 7;
42 const Property::Index CameraActor::TOP_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 8;
43 const Property::Index CameraActor::BOTTOM_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 9;
44 const Property::Index CameraActor::TARGET_POSITION = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 10;
45 const Property::Index CameraActor::PROJECTION_MATRIX = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 11;
46 const Property::Index CameraActor::VIEW_MATRIX = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 12;
47 const Property::Index CameraActor::INVERT_Y_AXIS = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 13;
51 bool CameraActor::mFirstInstance = true;
52 Actor::DefaultPropertyLookup* CameraActor::mDefaultCameraActorPropertyLookup = NULL;
57 // calculate the far plane distance for a 16bit depth buffer with 4 bits per unit precision
58 void CalculateClippingAndZ( float width, float height, float& nearClippingPlane, float& farClippingPlane, float& cameraZ )
60 nearClippingPlane = std::max( width, height );
61 farClippingPlane = nearClippingPlane + static_cast<float>( 0xFFFF >> 4 );
62 cameraZ = 2.0f * nearClippingPlane;
67 return Dali::CameraActor::New();
70 TypeRegistration mType( typeid(Dali::CameraActor), typeid(Dali::Actor), Create );
72 const std::string DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[] =
78 "near-plane-distance",
80 "left-plane-distance",
81 "right-plane-distance",
83 "bottom-plane-distance",
89 const int DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT = sizeof( DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES ) / sizeof( std::string );
91 const Property::Type DEFAULT_CAMERA_ACTOR_PROPERTY_TYPES[DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT] =
93 Property::STRING, // "type",
94 Property::STRING, // "projection-mode",
95 Property::FLOAT, // "field-of-view",
96 Property::FLOAT, // "aspect-ratio",
97 Property::FLOAT, // "near-plane-distance",
98 Property::FLOAT, // "far-plane-distance",
99 Property::FLOAT, // "left-plane-distance",
100 Property::FLOAT, // "right-plane-distance",
101 Property::FLOAT, // "top-plane-distance",
102 Property::FLOAT, // "bottom-plane-distance",
103 Property::VECTOR3, // "target-position",
104 Property::MATRIX, // "projection-matrix",
105 Property::MATRIX, // "view-matrix",
106 Property::BOOLEAN, // "invert-y-axis",
110 * Builds the picking ray in the world reference system from an orthographic camera
111 * The ray origin is the screen coordinate in the near plane translated to a parallel
112 * plane at the camera origin. The ray direction is the direction the camera is facing
113 * (i.e. Z=-1 in view space).
115 void BuildOrthoPickingRay( const Matrix& viewMatrix,
116 const Matrix& projectionMatrix,
117 const Viewport& viewport,
122 float nearPlaneDistance )
124 // inv( modelMatrix ) inv( viewMatrix ) inv( projectionMatrix ) normalize
125 // <----------------- <----------------- <-------------- <-------------
126 // Local World Camera Normalized Screen
127 // reference reference reference clip coordinates
128 // system system system coordinates
129 // -----------------> -----------------> --------------> ------------->
130 // modelMatrix viewMatrix projectionMatrix viewport
132 // Transforms the touch point from the screen reference system to the world reference system.
133 Matrix invViewProjection( false ); // Don't initialize.
134 Matrix::Multiply( invViewProjection, viewMatrix, projectionMatrix );
135 if( !invViewProjection.Invert() )
137 DALI_ASSERT_DEBUG( false );
140 Vector4 near( screenX - viewport.x, viewport.height - (screenY - viewport.y), 0.f, 1.f );
141 if( !Unproject( near, invViewProjection, viewport.width, viewport.height, rayOrigin ) )
143 DALI_ASSERT_DEBUG( false );
146 Matrix invView = viewMatrix;
147 if( !invView.Invert() )
149 DALI_ASSERT_DEBUG( false );
152 Vector4 cameraOrigin = invView * Vector4( 0.f, 0.f, 0.f, 1.f );
153 Vector4 nearPlaneOrigin = invView * Vector4( 0.0f, 0.0f, -nearPlaneDistance, 1.0f);
155 // Vector pointing from the camera to the near plane
156 rayDir = cameraOrigin - nearPlaneOrigin;
164 CameraActorPtr CameraActor::New( const Size& size )
166 CameraActorPtr actor(new CameraActor());
168 // Second-phase construction
172 actor->SetName("DefaultCamera");
174 // Create the attachment
175 actor->mCameraAttachment = CameraAttachment::New( *actor->mNode );
177 actor->Attach(*actor->mCameraAttachment);
179 actor->SetPerspectiveProjection( size );
184 void CameraActor::OnInitialize()
186 if(CameraActor::mFirstInstance)
188 mDefaultCameraActorPropertyLookup = new DefaultPropertyLookup();
189 const int start = DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
190 for ( int i = 0; i < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT; ++i )
192 (*mDefaultCameraActorPropertyLookup)[DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[i]] = i + start;
194 CameraActor::mFirstInstance = false;
198 CameraActor::CameraActor()
199 : Actor( Actor::BASIC )
203 CameraActor::~CameraActor()
207 void CameraActor::SetType( Dali::Camera::Type type )
209 mCameraAttachment->SetType(type);
212 Dali::Camera::Type CameraActor::GetType() const
214 return mCameraAttachment->GetType();
217 void CameraActor::SetProjectionMode( Dali::Camera::ProjectionMode mode )
219 mCameraAttachment->SetProjectionMode(mode);
222 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
224 return mCameraAttachment->GetProjectionMode();
227 void CameraActor::SetFieldOfView( float fieldOfView )
229 mCameraAttachment->SetFieldOfView(fieldOfView);
232 float CameraActor::GetFieldOfView( ) const
234 return mCameraAttachment->GetFieldOfView();
237 void CameraActor::SetAspectRatio( float aspectRatio )
239 mCameraAttachment->SetAspectRatio(aspectRatio);
242 float CameraActor::GetAspectRatio( ) const
244 return mCameraAttachment->GetAspectRatio();
247 void CameraActor::SetNearClippingPlane( float nearClippingPlane )
249 mCameraAttachment->SetNearClippingPlane(nearClippingPlane);
252 float CameraActor::GetNearClippingPlane( ) const
254 return mCameraAttachment->GetNearClippingPlane();
257 void CameraActor::SetFarClippingPlane( float farClippingPlane )
259 mCameraAttachment->SetFarClippingPlane(farClippingPlane);
262 float CameraActor::GetFarClippingPlane( ) const
264 return mCameraAttachment->GetFarClippingPlane();
267 void CameraActor::SetTargetPosition(const Vector3& target)
269 mCameraAttachment->SetTargetPosition(target);
272 Vector3 CameraActor::GetTargetPosition() const
274 return mCameraAttachment->GetTargetPosition();
277 void CameraActor::SetInvertYAxis(bool invertYAxis)
279 mCameraAttachment->SetInvertYAxis(invertYAxis);
282 bool CameraActor::GetInvertYAxis() const
284 return mCameraAttachment->GetInvertYAxis();
287 void CameraActor::SetPerspectiveProjection( const Size& size, float stereoBias /* = 0.0f */ )
289 float width = size.width;
290 float height = size.height;
292 if( Size::ZERO == size )
294 if( Stage::IsInstalled() )
296 const Size& stageSize = mStage->GetSize();
298 width = stageSize.width;
299 height = stageSize.height;
303 if( ( width < Math::MACHINE_EPSILON_1000 ) || ( height < Math::MACHINE_EPSILON_1000 ) )
305 // On the stage initialization this method is called but the size has not been set.
306 // There is no point to set any value if width or height is zero.
310 float nearClippingPlane;
311 float farClippingPlane;
313 CalculateClippingAndZ( width, height, nearClippingPlane, farClippingPlane, cameraZ );
315 // calculate the position of the camera to have the desired aspect ratio
316 const float fieldOfView = 2.0f * std::atan( height * 0.5f / cameraZ );
318 // unless it is too small, we want at least as much space to the back as we have torwards the front
319 const float minClippingFarPlane = 2.f * nearClippingPlane;
320 if ( farClippingPlane < minClippingFarPlane )
322 farClippingPlane = minClippingFarPlane;
325 const float aspectRatio = width / height;
327 SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
328 SetFieldOfView( fieldOfView );
329 SetNearClippingPlane( nearClippingPlane );
330 SetFarClippingPlane( farClippingPlane );
331 SetAspectRatio( aspectRatio );
332 mCameraAttachment->SetStereoBias( stereoBias );
337 void CameraActor::SetOrthographicProjection( const Vector2& size )
339 // Choose near, far and Z parameters to match the SetPerspectiveProjection above.
340 float nearClippingPlane;
341 float farClippingPlane;
343 CalculateClippingAndZ( size.width, size.height, nearClippingPlane, farClippingPlane, cameraZ );
344 SetOrthographicProjection( -size.x*0.5f, size.x*0.5f, size.y*0.5f, -size.y*0.5f,
345 nearClippingPlane, farClippingPlane );
349 void CameraActor::SetOrthographicProjection( float left, float right, float top, float bottom, float near, float far )
351 mCameraAttachment->SetLeftClippingPlane(left);
352 mCameraAttachment->SetRightClippingPlane(right);
353 mCameraAttachment->SetTopClippingPlane(top);
354 mCameraAttachment->SetBottomClippingPlane(bottom);
355 SetNearClippingPlane( near );
356 SetFarClippingPlane( far );
357 SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
360 bool CameraActor::BuildPickingRay( const Vector2& screenCoordinates,
361 const Viewport& viewport,
363 Vector4& rayDirection )
366 if( GetProjectionMode() == Dali::Camera::PERSPECTIVE_PROJECTION )
368 // Build a picking ray in the world reference system.
369 // ray starts from the camera world position
370 rayOrigin = mNode->GetWorldPosition( mStage->GetEventBufferIndex() );
373 // Transform the touch point from the screen coordinate system to the world coordinates system.
374 Vector4 near( screenCoordinates.x - viewport.x, viewport.height - (screenCoordinates.y - viewport.y), 0.f, 1.f );
375 if( !Unproject( near, mCameraAttachment->GetInverseViewProjectionMatrix(), viewport.width, viewport.height, near ) )
377 // unproject failed so no picking ray possible
381 // Compute the ray's director vector.
382 rayDirection.x = near.x - rayOrigin.x;
383 rayDirection.y = near.y - rayOrigin.y;
384 rayDirection.z = near.z - rayOrigin.z;
385 rayDirection.Normalize();
386 rayDirection.w = 1.f;
390 float nearPlaneDistance = GetNearClippingPlane();
391 BuildOrthoPickingRay( GetViewMatrix(),
392 GetProjectionMatrix(),
393 viewport, screenCoordinates.x,
403 const Matrix& CameraActor::GetViewMatrix() const
407 return mCameraAttachment->GetViewMatrix();
411 return Matrix::IDENTITY;
415 const Matrix& CameraActor::GetProjectionMatrix() const
419 return mCameraAttachment->GetProjectionMatrix();
423 return Matrix::IDENTITY;
427 unsigned int CameraActor::GetDefaultPropertyCount() const
429 return Actor::GetDefaultPropertyCount() + DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT;
432 void CameraActor::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
434 Actor::GetDefaultPropertyIndices( indices ); // Actor class properties
436 indices.reserve( indices.size() + DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT );
438 int index = DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
439 for ( int i = 0; i < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT; ++i, ++index )
441 indices.push_back( index );
445 bool CameraActor::IsDefaultPropertyWritable( Property::Index index ) const
447 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
449 return Actor::IsDefaultPropertyWritable(index);
453 if( Dali::CameraActor::PROJECTION_MATRIX == index || Dali::CameraActor::VIEW_MATRIX == index )
464 bool CameraActor::IsDefaultPropertyAnimatable( Property::Index index ) const
466 bool animatable = false; // Our properties are not animatable.
468 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
470 animatable = Actor::IsDefaultPropertyAnimatable(index);
475 bool CameraActor::IsDefaultPropertyAConstraintInput( Property::Index index ) const
477 bool animatable = true; // Our properties can be used as inputs to constraints.
479 if( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
481 animatable = Actor::IsDefaultPropertyAConstraintInput(index);
486 Property::Type CameraActor::GetDefaultPropertyType( Property::Index index ) const
488 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
490 return Actor::GetDefaultPropertyType(index);
494 index -= DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
496 if ( ( index >= 0 ) && ( index < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT ) )
498 return DEFAULT_CAMERA_ACTOR_PROPERTY_TYPES[index];
502 // index out-of-bounds
503 return Property::NONE;
508 const std::string& CameraActor::GetDefaultPropertyName( Property::Index index ) const
510 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
512 return Actor::GetDefaultPropertyName(index);
516 index -= DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
518 if ( ( index >= 0 ) && ( index < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT ) )
520 return DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[index];
524 // index out-of-bounds
525 static const std::string INVALID_PROPERTY_NAME;
526 return INVALID_PROPERTY_NAME;
531 Property::Index CameraActor::GetDefaultPropertyIndex(const std::string& name) const
533 Property::Index index = Property::INVALID_INDEX;
535 DALI_ASSERT_DEBUG( NULL != mDefaultCameraActorPropertyLookup );
537 // Look for name in current class' default properties
538 DefaultPropertyLookup::const_iterator result = mDefaultCameraActorPropertyLookup->find( name );
539 if ( mDefaultCameraActorPropertyLookup->end() != result )
541 index = result->second;
545 // If not found, check in base class
546 index = Actor::GetDefaultPropertyIndex( name );
552 void CameraActor::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
554 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
556 Actor::SetDefaultProperty(index, propertyValue);
560 DALI_ASSERT_DEBUG(mCameraAttachment && "where is the camera?");
563 case Dali::CameraActor::TYPE:
565 std::string s(propertyValue.Get<std::string>());
566 if(s == "LOOK_AT_TARGET")
568 mCameraAttachment->SetType(Dali::Camera::LOOK_AT_TARGET);
570 else if(s == "FREE_LOOK")
572 mCameraAttachment->SetType(Dali::Camera::FREE_LOOK);
576 DALI_LOG_WARNING("Unknown camera type\n");
580 case Dali::CameraActor::PROJECTION_MODE:
582 std::string s(propertyValue.Get<std::string>());
583 if(s == "PERSPECTIVE_PROJECTION")
585 mCameraAttachment->SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
587 else if(s == "ORTHOGRAPHIC_PROJECTION")
589 mCameraAttachment->SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
593 DALI_LOG_WARNING("Unknown projection mode\n");
597 case Dali::CameraActor::FIELD_OF_VIEW:
599 mCameraAttachment->SetFieldOfView(propertyValue.Get<float>());
602 case Dali::CameraActor::ASPECT_RATIO:
604 mCameraAttachment->SetAspectRatio(propertyValue.Get<float>());
607 case Dali::CameraActor::LEFT_PLANE_DISTANCE:
609 mCameraAttachment->SetLeftClippingPlane(propertyValue.Get<float>());
612 case Dali::CameraActor::RIGHT_PLANE_DISTANCE:
614 mCameraAttachment->SetRightClippingPlane(propertyValue.Get<float>());
617 case Dali::CameraActor::TOP_PLANE_DISTANCE:
619 mCameraAttachment->SetTopClippingPlane(propertyValue.Get<float>());
622 case Dali::CameraActor::BOTTOM_PLANE_DISTANCE:
624 mCameraAttachment->SetBottomClippingPlane(propertyValue.Get<float>());
627 case Dali::CameraActor::NEAR_PLANE_DISTANCE:
629 mCameraAttachment->SetNearClippingPlane(propertyValue.Get<float>());
632 case Dali::CameraActor::FAR_PLANE_DISTANCE:
634 mCameraAttachment->SetFarClippingPlane(propertyValue.Get<float>());
637 case Dali::CameraActor::TARGET_POSITION:
639 mCameraAttachment->SetTargetPosition(propertyValue.Get<Vector3>());
642 case Dali::CameraActor::PROJECTION_MATRIX:
644 DALI_LOG_WARNING("projection-matrix property is not animatable \n");
647 case Dali::CameraActor::VIEW_MATRIX:
649 DALI_LOG_WARNING("view-matrix property is not animatable \n");
652 case Dali::CameraActor::INVERT_Y_AXIS:
654 mCameraAttachment->SetInvertYAxis(propertyValue.Get<bool>());
659 DALI_LOG_WARNING("Unknown property (%d)\n", index);
667 Property::Value CameraActor::GetDefaultProperty( Property::Index index ) const
670 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
672 ret = Actor::GetDefaultProperty(index);
676 DALI_ASSERT_DEBUG(mCameraAttachment && "where is the camera?");
680 case Dali::CameraActor::TYPE:
682 if(mCameraAttachment->GetType() == Dali::Camera::LOOK_AT_TARGET)
684 ret = "LOOK_AT_TARGET";
686 else if(mCameraAttachment->GetType() == Dali::Camera::FREE_LOOK)
693 DALI_ASSERT_DEBUG("Unknown camera type\n");
699 case Dali::CameraActor::PROJECTION_MODE:
701 if(mCameraAttachment->GetProjectionMode() == Dali::Camera::PERSPECTIVE_PROJECTION)
703 ret = "PERSPECTIVE_PROJECTION";
705 else if(mCameraAttachment->GetProjectionMode() == Dali::Camera::ORTHOGRAPHIC_PROJECTION)
707 ret = "ORTHOGRAPHIC_PROJECTION";
712 DALI_ASSERT_DEBUG("Unknown projection mode\n");
716 case Dali::CameraActor::FIELD_OF_VIEW:
718 ret = mCameraAttachment->GetFieldOfView();
721 case Dali::CameraActor::ASPECT_RATIO:
723 ret = mCameraAttachment->GetAspectRatio();
726 case Dali::CameraActor::LEFT_PLANE_DISTANCE:
728 ret = mCameraAttachment->GetLeftClippingPlane();
731 case Dali::CameraActor::RIGHT_PLANE_DISTANCE:
733 ret = mCameraAttachment->GetRightClippingPlane();
736 case Dali::CameraActor::TOP_PLANE_DISTANCE:
738 ret = mCameraAttachment->GetTopClippingPlane();
741 case Dali::CameraActor::BOTTOM_PLANE_DISTANCE:
743 ret = mCameraAttachment->GetBottomClippingPlane();
746 case Dali::CameraActor::NEAR_PLANE_DISTANCE:
748 ret = mCameraAttachment->GetNearClippingPlane();
751 case Dali::CameraActor::FAR_PLANE_DISTANCE:
753 ret = mCameraAttachment->GetFarClippingPlane();
756 case Dali::CameraActor::TARGET_POSITION:
758 ret = mCameraAttachment->GetTargetPosition();
761 case Dali::CameraActor::PROJECTION_MATRIX:
763 ret = mCameraAttachment->GetProjectionMatrix();
766 case Dali::CameraActor::VIEW_MATRIX:
768 ret = mCameraAttachment->GetViewMatrix();
771 case Dali::CameraActor::INVERT_Y_AXIS:
773 ret = mCameraAttachment->GetInvertYAxis();
778 DALI_LOG_WARNING("Unknown property (%d)\n", index);
787 const SceneGraph::PropertyBase* CameraActor::GetSceneObjectAnimatableProperty( Property::Index index ) const
789 DALI_ASSERT_ALWAYS( IsPropertyAnimatable(index) && "Property is not animatable" );
791 const SceneGraph::PropertyBase* property( NULL );
793 // This method should only return a property of an object connected to the scene-graph
799 // let actor handle animatable properties, we have no animatable properties
800 if( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
802 property = Actor::GetSceneObjectAnimatableProperty(index);
808 const PropertyInputImpl* CameraActor::GetSceneObjectInputProperty( Property::Index index ) const
810 const PropertyInputImpl* property( NULL );
812 // This method should only return a property of an object connected to the scene-graph
818 // if its an actor default property or a custom property (actor already handles custom properties)
819 if( ( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT ) || ( index >= DEFAULT_PROPERTY_MAX_COUNT ) )
821 property = Actor::GetSceneObjectInputProperty(index);
827 case Dali::CameraActor::PROJECTION_MATRIX:
829 property = mCameraAttachment->GetProjectionMatrixProperty();
832 case Dali::CameraActor::VIEW_MATRIX:
834 property = mCameraAttachment->GetViewMatrixProperty();
838 DALI_LOG_WARNING("Not an input property (%d)\n", index);
847 } // namespace Internal