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>
24 #include <dali/public-api/common/stage.h>
25 #include <dali/public-api/object/type-registry.h>
26 #include <dali/internal/event/actor-attachments/camera-attachment-impl.h>
27 #include <dali/internal/event/common/property-index-ranges.h>
28 #include <dali/internal/event/common/stage-impl.h>
29 #include <dali/internal/event/render-tasks/render-task-impl.h>
30 #include <dali/internal/event/render-tasks/render-task-list-impl.h>
31 #include <dali/internal/event/common/projection.h>
32 #include <dali/integration-api/debug.h>
37 const Property::Index CameraActor::TYPE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
38 const Property::Index CameraActor::PROJECTION_MODE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 1;
39 const Property::Index CameraActor::FIELD_OF_VIEW = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 2;
40 const Property::Index CameraActor::ASPECT_RATIO = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 3;
41 const Property::Index CameraActor::NEAR_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 4;
42 const Property::Index CameraActor::FAR_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 5;
43 const Property::Index CameraActor::LEFT_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 6;
44 const Property::Index CameraActor::RIGHT_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 7;
45 const Property::Index CameraActor::TOP_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 8;
46 const Property::Index CameraActor::BOTTOM_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 9;
47 const Property::Index CameraActor::TARGET_POSITION = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 10;
48 const Property::Index CameraActor::PROJECTION_MATRIX = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 11;
49 const Property::Index CameraActor::VIEW_MATRIX = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 12;
50 const Property::Index CameraActor::INVERT_Y_AXIS = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 13;
54 bool CameraActor::mFirstInstance = true;
55 Actor::DefaultPropertyLookup* CameraActor::mDefaultCameraActorPropertyLookup = NULL;
60 // calculate the far plane distance for a 16bit depth buffer with 4 bits per unit precision
61 void CalculateClippingAndZ( float width, float height, float& nearClippingPlane, float& farClippingPlane, float& cameraZ )
63 nearClippingPlane = std::max( width, height );
64 farClippingPlane = nearClippingPlane + static_cast<float>( 0xFFFF >> 4 );
65 cameraZ = 2.0f * nearClippingPlane;
70 return Dali::CameraActor::New();
73 TypeRegistration mType( typeid(Dali::CameraActor), typeid(Dali::Actor), Create );
75 const std::string DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[] =
81 "near-plane-distance",
83 "left-plane-distance",
84 "right-plane-distance",
86 "bottom-plane-distance",
92 const int DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT = sizeof( DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES ) / sizeof( std::string );
94 const Property::Type DEFAULT_CAMERA_ACTOR_PROPERTY_TYPES[DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT] =
96 Property::STRING, // "type",
97 Property::STRING, // "projection-mode",
98 Property::FLOAT, // "field-of-view",
99 Property::FLOAT, // "aspect-ratio",
100 Property::FLOAT, // "near-plane-distance",
101 Property::FLOAT, // "far-plane-distance",
102 Property::FLOAT, // "left-plane-distance",
103 Property::FLOAT, // "right-plane-distance",
104 Property::FLOAT, // "top-plane-distance",
105 Property::FLOAT, // "bottom-plane-distance",
106 Property::VECTOR3, // "target-position",
107 Property::MATRIX, // "projection-matrix",
108 Property::MATRIX, // "view-matrix",
109 Property::BOOLEAN, // "invert-y-axis",
113 * Builds the picking ray in the world reference system from an orthographic camera
114 * The ray origin is the screen coordinate in the near plane translated to a parallel
115 * plane at the camera origin. The ray direction is the direction the camera is facing
116 * (i.e. Z=-1 in view space).
118 void BuildOrthoPickingRay( const Matrix& viewMatrix,
119 const Matrix& projectionMatrix,
120 const Viewport& viewport,
125 float nearPlaneDistance )
127 // inv( modelMatrix ) inv( viewMatrix ) inv( projectionMatrix ) normalize
128 // <----------------- <----------------- <-------------- <-------------
129 // Local World Camera Normalized Screen
130 // reference reference reference clip coordinates
131 // system system system coordinates
132 // -----------------> -----------------> --------------> ------------->
133 // modelMatrix viewMatrix projectionMatrix viewport
135 // Transforms the touch point from the screen reference system to the world reference system.
136 Matrix invViewProjection( false ); // Don't initialize.
137 Matrix::Multiply( invViewProjection, viewMatrix, projectionMatrix );
138 if( !invViewProjection.Invert() )
140 DALI_ASSERT_DEBUG( false );
143 Vector4 near( screenX - viewport.x, viewport.height - (screenY - viewport.y), 0.f, 1.f );
144 if( !Unproject( near, invViewProjection, viewport.width, viewport.height, rayOrigin ) )
146 DALI_ASSERT_DEBUG( false );
149 Matrix invView = viewMatrix;
150 if( !invView.Invert() )
152 DALI_ASSERT_DEBUG( false );
155 Vector4 cameraOrigin = invView * Vector4( 0.f, 0.f, 0.f, 1.f );
156 Vector4 nearPlaneOrigin = invView * Vector4( 0.0f, 0.0f, -nearPlaneDistance, 1.0f);
158 // Vector pointing from the camera to the near plane
159 rayDir = cameraOrigin - nearPlaneOrigin;
167 CameraActorPtr CameraActor::New( const Size& size )
169 CameraActorPtr actor(new CameraActor());
171 // Second-phase construction
175 actor->SetName("DefaultCamera");
177 // Create the attachment
178 actor->mCameraAttachment = CameraAttachment::New( *actor->mNode );
180 actor->Attach(*actor->mCameraAttachment);
182 actor->SetPerspectiveProjection( size );
187 void CameraActor::OnInitialize()
189 if(CameraActor::mFirstInstance)
191 mDefaultCameraActorPropertyLookup = new DefaultPropertyLookup();
192 const int start = DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
193 for ( int i = 0; i < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT; ++i )
195 (*mDefaultCameraActorPropertyLookup)[DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[i]] = i + start;
197 CameraActor::mFirstInstance = false;
201 CameraActor::CameraActor()
202 : Actor( Actor::BASIC )
206 CameraActor::~CameraActor()
210 void CameraActor::SetType( Dali::Camera::Type type )
212 mCameraAttachment->SetType(type);
215 Dali::Camera::Type CameraActor::GetType() const
217 return mCameraAttachment->GetType();
220 void CameraActor::SetProjectionMode( Dali::Camera::ProjectionMode mode )
222 mCameraAttachment->SetProjectionMode(mode);
225 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
227 return mCameraAttachment->GetProjectionMode();
230 void CameraActor::SetFieldOfView( float fieldOfView )
232 mCameraAttachment->SetFieldOfView(fieldOfView);
235 float CameraActor::GetFieldOfView( ) const
237 return mCameraAttachment->GetFieldOfView();
240 void CameraActor::SetAspectRatio( float aspectRatio )
242 mCameraAttachment->SetAspectRatio(aspectRatio);
245 float CameraActor::GetAspectRatio( ) const
247 return mCameraAttachment->GetAspectRatio();
250 void CameraActor::SetNearClippingPlane( float nearClippingPlane )
252 mCameraAttachment->SetNearClippingPlane(nearClippingPlane);
255 float CameraActor::GetNearClippingPlane( ) const
257 return mCameraAttachment->GetNearClippingPlane();
260 void CameraActor::SetFarClippingPlane( float farClippingPlane )
262 mCameraAttachment->SetFarClippingPlane(farClippingPlane);
265 float CameraActor::GetFarClippingPlane( ) const
267 return mCameraAttachment->GetFarClippingPlane();
270 void CameraActor::SetTargetPosition(const Vector3& target)
272 mCameraAttachment->SetTargetPosition(target);
275 Vector3 CameraActor::GetTargetPosition() const
277 return mCameraAttachment->GetTargetPosition();
280 void CameraActor::SetInvertYAxis(bool invertYAxis)
282 mCameraAttachment->SetInvertYAxis(invertYAxis);
285 bool CameraActor::GetInvertYAxis() const
287 return mCameraAttachment->GetInvertYAxis();
290 void CameraActor::SetPerspectiveProjection( const Size& size, float stereoBias /* = 0.0f */ )
292 float width = size.width;
293 float height = size.height;
295 if( Size::ZERO == size )
297 if( Stage::IsInstalled() )
299 const Size& stageSize = mStage->GetSize();
301 width = stageSize.width;
302 height = stageSize.height;
306 if( ( width < Math::MACHINE_EPSILON_1000 ) || ( height < Math::MACHINE_EPSILON_1000 ) )
308 // On the stage initialization this method is called but the size has not been set.
309 // There is no point to set any value if width or height is zero.
313 float nearClippingPlane;
314 float farClippingPlane;
316 CalculateClippingAndZ( width, height, nearClippingPlane, farClippingPlane, cameraZ );
318 // calculate the position of the camera to have the desired aspect ratio
319 const float fieldOfView = 2.0f * std::atan( height * 0.5f / cameraZ );
321 // unless it is too small, we want at least as much space to the back as we have torwards the front
322 const float minClippingFarPlane = 2.f * nearClippingPlane;
323 if ( farClippingPlane < minClippingFarPlane )
325 farClippingPlane = minClippingFarPlane;
328 const float aspectRatio = width / height;
330 SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
331 SetFieldOfView( fieldOfView );
332 SetNearClippingPlane( nearClippingPlane );
333 SetFarClippingPlane( farClippingPlane );
334 SetAspectRatio( aspectRatio );
335 mCameraAttachment->SetStereoBias( stereoBias );
340 void CameraActor::SetOrthographicProjection( const Vector2& size )
342 // Choose near, far and Z parameters to match the SetPerspectiveProjection above.
343 float nearClippingPlane;
344 float farClippingPlane;
346 CalculateClippingAndZ( size.width, size.height, nearClippingPlane, farClippingPlane, cameraZ );
347 SetOrthographicProjection( -size.x*0.5f, size.x*0.5f, size.y*0.5f, -size.y*0.5f,
348 nearClippingPlane, farClippingPlane );
352 void CameraActor::SetOrthographicProjection( float left, float right, float top, float bottom, float near, float far )
354 mCameraAttachment->SetLeftClippingPlane(left);
355 mCameraAttachment->SetRightClippingPlane(right);
356 mCameraAttachment->SetTopClippingPlane(top);
357 mCameraAttachment->SetBottomClippingPlane(bottom);
358 SetNearClippingPlane( near );
359 SetFarClippingPlane( far );
360 SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
363 bool CameraActor::BuildPickingRay( const Vector2& screenCoordinates,
364 const Viewport& viewport,
366 Vector4& rayDirection )
369 if( GetProjectionMode() == Dali::Camera::PERSPECTIVE_PROJECTION )
371 // Build a picking ray in the world reference system.
372 // ray starts from the camera world position
373 rayOrigin = mNode->GetWorldPosition( mStage->GetEventBufferIndex() );
376 // Transform the touch point from the screen coordinate system to the world coordinates system.
377 Vector4 near( screenCoordinates.x - viewport.x, viewport.height - (screenCoordinates.y - viewport.y), 0.f, 1.f );
378 if( !Unproject( near, mCameraAttachment->GetInverseViewProjectionMatrix(), viewport.width, viewport.height, near ) )
380 // unproject failed so no picking ray possible
384 // Compute the ray's director vector.
385 rayDirection.x = near.x - rayOrigin.x;
386 rayDirection.y = near.y - rayOrigin.y;
387 rayDirection.z = near.z - rayOrigin.z;
388 rayDirection.Normalize();
389 rayDirection.w = 1.f;
393 float nearPlaneDistance = GetNearClippingPlane();
394 BuildOrthoPickingRay( GetViewMatrix(),
395 GetProjectionMatrix(),
396 viewport, screenCoordinates.x,
406 const Matrix& CameraActor::GetViewMatrix() const
410 return mCameraAttachment->GetViewMatrix();
414 return Matrix::IDENTITY;
418 const Matrix& CameraActor::GetProjectionMatrix() const
422 return mCameraAttachment->GetProjectionMatrix();
426 return Matrix::IDENTITY;
430 unsigned int CameraActor::GetDefaultPropertyCount() const
432 return Actor::GetDefaultPropertyCount() + DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT;
435 void CameraActor::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
437 Actor::GetDefaultPropertyIndices( indices ); // Actor class properties
439 indices.reserve( indices.size() + DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT );
441 int index = DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
442 for ( int i = 0; i < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT; ++i, ++index )
444 indices.push_back( index );
448 bool CameraActor::IsDefaultPropertyWritable( Property::Index index ) const
450 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
452 return Actor::IsDefaultPropertyWritable(index);
456 if( Dali::CameraActor::PROJECTION_MATRIX == index || Dali::CameraActor::VIEW_MATRIX == index )
467 bool CameraActor::IsDefaultPropertyAnimatable( Property::Index index ) const
469 bool animatable = false; // Our properties are not animatable.
471 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
473 animatable = Actor::IsDefaultPropertyAnimatable(index);
478 bool CameraActor::IsDefaultPropertyAConstraintInput( Property::Index index ) const
480 bool animatable = true; // Our properties can be used as inputs to constraints.
482 if( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
484 animatable = Actor::IsDefaultPropertyAConstraintInput(index);
489 Property::Type CameraActor::GetDefaultPropertyType( Property::Index index ) const
491 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
493 return Actor::GetDefaultPropertyType(index);
497 index -= DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
499 if ( ( index >= 0 ) && ( index < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT ) )
501 return DEFAULT_CAMERA_ACTOR_PROPERTY_TYPES[index];
505 // index out-of-bounds
506 return Property::NONE;
511 const std::string& CameraActor::GetDefaultPropertyName( Property::Index index ) const
513 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
515 return Actor::GetDefaultPropertyName(index);
519 index -= DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
521 if ( ( index >= 0 ) && ( index < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT ) )
523 return DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[index];
527 // index out-of-bounds
528 static const std::string INVALID_PROPERTY_NAME;
529 return INVALID_PROPERTY_NAME;
534 Property::Index CameraActor::GetDefaultPropertyIndex(const std::string& name) const
536 Property::Index index = Property::INVALID_INDEX;
538 DALI_ASSERT_DEBUG( NULL != mDefaultCameraActorPropertyLookup );
540 // Look for name in current class' default properties
541 DefaultPropertyLookup::const_iterator result = mDefaultCameraActorPropertyLookup->find( name );
542 if ( mDefaultCameraActorPropertyLookup->end() != result )
544 index = result->second;
548 // If not found, check in base class
549 index = Actor::GetDefaultPropertyIndex( name );
555 void CameraActor::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
557 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
559 Actor::SetDefaultProperty(index, propertyValue);
563 DALI_ASSERT_DEBUG(mCameraAttachment && "where is the camera?");
566 case Dali::CameraActor::TYPE:
568 std::string s(propertyValue.Get<std::string>());
569 if(s == "LOOK_AT_TARGET")
571 mCameraAttachment->SetType(Dali::Camera::LOOK_AT_TARGET);
573 else if(s == "FREE_LOOK")
575 mCameraAttachment->SetType(Dali::Camera::FREE_LOOK);
579 DALI_LOG_WARNING("Unknown camera type\n");
583 case Dali::CameraActor::PROJECTION_MODE:
585 std::string s(propertyValue.Get<std::string>());
586 if(s == "PERSPECTIVE_PROJECTION")
588 mCameraAttachment->SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
590 else if(s == "ORTHOGRAPHIC_PROJECTION")
592 mCameraAttachment->SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
596 DALI_LOG_WARNING("Unknown projection mode\n");
600 case Dali::CameraActor::FIELD_OF_VIEW:
602 mCameraAttachment->SetFieldOfView(propertyValue.Get<float>());
605 case Dali::CameraActor::ASPECT_RATIO:
607 mCameraAttachment->SetAspectRatio(propertyValue.Get<float>());
610 case Dali::CameraActor::LEFT_PLANE_DISTANCE:
612 mCameraAttachment->SetLeftClippingPlane(propertyValue.Get<float>());
615 case Dali::CameraActor::RIGHT_PLANE_DISTANCE:
617 mCameraAttachment->SetRightClippingPlane(propertyValue.Get<float>());
620 case Dali::CameraActor::TOP_PLANE_DISTANCE:
622 mCameraAttachment->SetTopClippingPlane(propertyValue.Get<float>());
625 case Dali::CameraActor::BOTTOM_PLANE_DISTANCE:
627 mCameraAttachment->SetBottomClippingPlane(propertyValue.Get<float>());
630 case Dali::CameraActor::NEAR_PLANE_DISTANCE:
632 mCameraAttachment->SetNearClippingPlane(propertyValue.Get<float>());
635 case Dali::CameraActor::FAR_PLANE_DISTANCE:
637 mCameraAttachment->SetFarClippingPlane(propertyValue.Get<float>());
640 case Dali::CameraActor::TARGET_POSITION:
642 mCameraAttachment->SetTargetPosition(propertyValue.Get<Vector3>());
645 case Dali::CameraActor::PROJECTION_MATRIX:
647 DALI_LOG_WARNING("projection-matrix property is not animatable \n");
650 case Dali::CameraActor::VIEW_MATRIX:
652 DALI_LOG_WARNING("view-matrix property is not animatable \n");
655 case Dali::CameraActor::INVERT_Y_AXIS:
657 mCameraAttachment->SetInvertYAxis(propertyValue.Get<bool>());
662 DALI_LOG_WARNING("Unknown property (%d)\n", index);
670 Property::Value CameraActor::GetDefaultProperty( Property::Index index ) const
673 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
675 ret = Actor::GetDefaultProperty(index);
679 DALI_ASSERT_DEBUG(mCameraAttachment && "where is the camera?");
683 case Dali::CameraActor::TYPE:
685 if(mCameraAttachment->GetType() == Dali::Camera::LOOK_AT_TARGET)
687 ret = "LOOK_AT_TARGET";
689 else if(mCameraAttachment->GetType() == Dali::Camera::FREE_LOOK)
696 DALI_ASSERT_DEBUG("Unknown camera type\n");
702 case Dali::CameraActor::PROJECTION_MODE:
704 if(mCameraAttachment->GetProjectionMode() == Dali::Camera::PERSPECTIVE_PROJECTION)
706 ret = "PERSPECTIVE_PROJECTION";
708 else if(mCameraAttachment->GetProjectionMode() == Dali::Camera::ORTHOGRAPHIC_PROJECTION)
710 ret = "ORTHOGRAPHIC_PROJECTION";
715 DALI_ASSERT_DEBUG("Unknown projection mode\n");
719 case Dali::CameraActor::FIELD_OF_VIEW:
721 ret = mCameraAttachment->GetFieldOfView();
724 case Dali::CameraActor::ASPECT_RATIO:
726 ret = mCameraAttachment->GetAspectRatio();
729 case Dali::CameraActor::LEFT_PLANE_DISTANCE:
731 ret = mCameraAttachment->GetLeftClippingPlane();
734 case Dali::CameraActor::RIGHT_PLANE_DISTANCE:
736 ret = mCameraAttachment->GetRightClippingPlane();
739 case Dali::CameraActor::TOP_PLANE_DISTANCE:
741 ret = mCameraAttachment->GetTopClippingPlane();
744 case Dali::CameraActor::BOTTOM_PLANE_DISTANCE:
746 ret = mCameraAttachment->GetBottomClippingPlane();
749 case Dali::CameraActor::NEAR_PLANE_DISTANCE:
751 ret = mCameraAttachment->GetNearClippingPlane();
754 case Dali::CameraActor::FAR_PLANE_DISTANCE:
756 ret = mCameraAttachment->GetFarClippingPlane();
759 case Dali::CameraActor::TARGET_POSITION:
761 ret = mCameraAttachment->GetTargetPosition();
764 case Dali::CameraActor::PROJECTION_MATRIX:
766 ret = mCameraAttachment->GetProjectionMatrix();
769 case Dali::CameraActor::VIEW_MATRIX:
771 ret = mCameraAttachment->GetViewMatrix();
774 case Dali::CameraActor::INVERT_Y_AXIS:
776 ret = mCameraAttachment->GetInvertYAxis();
781 DALI_LOG_WARNING("Unknown property (%d)\n", index);
790 const SceneGraph::PropertyBase* CameraActor::GetSceneObjectAnimatableProperty( Property::Index index ) const
792 DALI_ASSERT_ALWAYS( IsPropertyAnimatable(index) && "Property is not animatable" );
794 const SceneGraph::PropertyBase* property( NULL );
796 // This method should only return a property of an object connected to the scene-graph
802 // let actor handle animatable properties, we have no animatable properties
803 if( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
805 property = Actor::GetSceneObjectAnimatableProperty(index);
811 const PropertyInputImpl* CameraActor::GetSceneObjectInputProperty( Property::Index index ) const
813 const PropertyInputImpl* property( NULL );
815 // This method should only return a property of an object connected to the scene-graph
821 // if its an actor default property or a custom property (actor already handles custom properties)
822 if( ( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT ) || ( index >= DEFAULT_PROPERTY_MAX_COUNT ) )
824 property = Actor::GetSceneObjectInputProperty(index);
830 case Dali::CameraActor::PROJECTION_MATRIX:
832 property = mCameraAttachment->GetProjectionMatrixProperty();
835 case Dali::CameraActor::VIEW_MATRIX:
837 property = mCameraAttachment->GetViewMatrixProperty();
841 DALI_LOG_WARNING("Not an input property (%d)\n", index);
850 } // namespace Internal