2 * Copyright (c) 2014 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>
22 #include <dali/public-api/common/stage.h>
23 #include <dali/public-api/object/type-registry.h>
24 #include <dali/internal/event/actor-attachments/camera-attachment-impl.h>
25 #include <dali/internal/event/common/property-index-ranges.h>
26 #include <dali/internal/event/common/stage-impl.h>
27 #include <dali/internal/event/render-tasks/render-task-impl.h>
28 #include <dali/internal/event/render-tasks/render-task-list-impl.h>
29 #include <dali/internal/event/common/projection.h>
30 #include <dali/integration-api/debug.h>
35 const Property::Index CameraActor::TYPE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
36 const Property::Index CameraActor::PROJECTION_MODE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 1;
37 const Property::Index CameraActor::FIELD_OF_VIEW = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 2;
38 const Property::Index CameraActor::ASPECT_RATIO = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 3;
39 const Property::Index CameraActor::NEAR_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 4;
40 const Property::Index CameraActor::FAR_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 5;
41 const Property::Index CameraActor::LEFT_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 6;
42 const Property::Index CameraActor::RIGHT_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 7;
43 const Property::Index CameraActor::TOP_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 8;
44 const Property::Index CameraActor::BOTTOM_PLANE_DISTANCE = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 9;
45 const Property::Index CameraActor::TARGET_POSITION = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 10;
46 const Property::Index CameraActor::PROJECTION_MATRIX = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 11;
47 const Property::Index CameraActor::VIEW_MATRIX = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 12;
48 const Property::Index CameraActor::INVERT_Y_AXIS = Internal::DEFAULT_ACTOR_PROPERTY_MAX_COUNT + 13;
52 bool CameraActor::mFirstInstance = true;
53 Actor::DefaultPropertyLookup* CameraActor::mDefaultCameraActorPropertyLookup = NULL;
58 // calculate the far plane distance for a 16bit depth buffer with 4 bits per unit precision
59 void CalculateClippingAndZ( float width, float height, float& nearClippingPlane, float& farClippingPlane, float& cameraZ )
61 nearClippingPlane = std::max( width, height );
62 farClippingPlane = nearClippingPlane + static_cast<float>( 0xFFFF >> 4 );
63 cameraZ = 2.0f * nearClippingPlane;
68 return Dali::CameraActor::New();
71 TypeRegistration mType( typeid(Dali::CameraActor), typeid(Dali::Actor), Create );
73 const std::string DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[] =
79 "near-plane-distance",
81 "left-plane-distance",
82 "right-plane-distance",
84 "bottom-plane-distance",
90 const int DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT = sizeof( DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES ) / sizeof( std::string );
92 const Property::Type DEFAULT_CAMERA_ACTOR_PROPERTY_TYPES[DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT] =
94 Property::STRING, // "type",
95 Property::STRING, // "projection-mode",
96 Property::FLOAT, // "field-of-view",
97 Property::FLOAT, // "aspect-ratio",
98 Property::FLOAT, // "near-plane-distance",
99 Property::FLOAT, // "far-plane-distance",
100 Property::FLOAT, // "left-plane-distance",
101 Property::FLOAT, // "right-plane-distance",
102 Property::FLOAT, // "top-plane-distance",
103 Property::FLOAT, // "bottom-plane-distance",
104 Property::VECTOR3, // "target-position",
105 Property::MATRIX, // "projection-matrix",
106 Property::MATRIX, // "view-matrix",
107 Property::BOOLEAN, // "invert-y-axis",
111 * Builds the picking ray in the world reference system from an orthographic camera
112 * The ray origin is the screen coordinate in the near plane translated to a parallel
113 * plane at the camera origin. The ray direction is the direction the camera is facing
114 * (i.e. Z=-1 in view space).
116 void BuildOrthoPickingRay( const Matrix& viewMatrix,
117 const Matrix& projectionMatrix,
118 const Viewport& viewport,
123 float nearPlaneDistance )
125 // inv( modelMatrix ) inv( viewMatrix ) inv( projectionMatrix ) normalize
126 // <----------------- <----------------- <-------------- <-------------
127 // Local World Camera Normalized Screen
128 // reference reference reference clip coordinates
129 // system system system coordinates
130 // -----------------> -----------------> --------------> ------------->
131 // modelMatrix viewMatrix projectionMatrix viewport
133 // Transforms the touch point from the screen reference system to the world reference system.
134 Matrix invViewProjection( false ); // Don't initialize.
135 Matrix::Multiply( invViewProjection, viewMatrix, projectionMatrix );
136 if( !invViewProjection.Invert() )
138 DALI_ASSERT_DEBUG( false );
141 Vector4 near( screenX - viewport.x, viewport.height - (screenY - viewport.y), 0.f, 1.f );
142 if( !Unproject( near, invViewProjection, viewport.width, viewport.height, rayOrigin ) )
144 DALI_ASSERT_DEBUG( false );
147 Matrix invView = viewMatrix;
148 if( !invView.Invert() )
150 DALI_ASSERT_DEBUG( false );
153 Vector4 cameraOrigin = invView * Vector4( 0.f, 0.f, 0.f, 1.f );
154 Vector4 nearPlaneOrigin = invView * Vector4( 0.0f, 0.0f, -nearPlaneDistance, 1.0f);
156 // Vector pointing from the camera to the near plane
157 rayDir = cameraOrigin - nearPlaneOrigin;
165 CameraActorPtr CameraActor::New( const Size& size )
167 CameraActorPtr actor(new CameraActor());
169 // Second-phase construction
173 actor->SetName("DefaultCamera");
175 // Create the attachment
176 actor->mCameraAttachment = CameraAttachment::New( *actor->mNode );
178 actor->Attach(*actor->mCameraAttachment);
180 actor->SetPerspectiveProjection( size );
185 void CameraActor::OnInitialize()
187 if(CameraActor::mFirstInstance)
189 mDefaultCameraActorPropertyLookup = new DefaultPropertyLookup();
190 const int start = DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
191 for ( int i = 0; i < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT; ++i )
193 (*mDefaultCameraActorPropertyLookup)[DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[i]] = i + start;
195 CameraActor::mFirstInstance = false;
199 CameraActor::CameraActor()
200 : Actor( Actor::BASIC )
204 CameraActor::~CameraActor()
208 void CameraActor::SetType( Dali::Camera::Type type )
210 mCameraAttachment->SetType(type);
213 Dali::Camera::Type CameraActor::GetType() const
215 return mCameraAttachment->GetType();
218 void CameraActor::SetProjectionMode( Dali::Camera::ProjectionMode mode )
220 mCameraAttachment->SetProjectionMode(mode);
223 Dali::Camera::ProjectionMode CameraActor::GetProjectionMode() const
225 return mCameraAttachment->GetProjectionMode();
228 void CameraActor::SetFieldOfView( float fieldOfView )
230 mCameraAttachment->SetFieldOfView(fieldOfView);
233 float CameraActor::GetFieldOfView( ) const
235 return mCameraAttachment->GetFieldOfView();
238 void CameraActor::SetAspectRatio( float aspectRatio )
240 mCameraAttachment->SetAspectRatio(aspectRatio);
243 float CameraActor::GetAspectRatio( ) const
245 return mCameraAttachment->GetAspectRatio();
248 void CameraActor::SetNearClippingPlane( float nearClippingPlane )
250 mCameraAttachment->SetNearClippingPlane(nearClippingPlane);
253 float CameraActor::GetNearClippingPlane( ) const
255 return mCameraAttachment->GetNearClippingPlane();
258 void CameraActor::SetFarClippingPlane( float farClippingPlane )
260 mCameraAttachment->SetFarClippingPlane(farClippingPlane);
263 float CameraActor::GetFarClippingPlane( ) const
265 return mCameraAttachment->GetFarClippingPlane();
268 void CameraActor::SetTargetPosition(const Vector3& target)
270 mCameraAttachment->SetTargetPosition(target);
273 Vector3 CameraActor::GetTargetPosition() const
275 return mCameraAttachment->GetTargetPosition();
278 void CameraActor::SetInvertYAxis(bool invertYAxis)
280 mCameraAttachment->SetInvertYAxis(invertYAxis);
283 bool CameraActor::GetInvertYAxis() const
285 return mCameraAttachment->GetInvertYAxis();
288 void CameraActor::SetPerspectiveProjection( const Size& size, float stereoBias /* = 0.0f */ )
290 float width = size.width;
291 float height = size.height;
293 if( Size::ZERO == size )
295 if( Stage::IsInstalled() )
297 const Size& stageSize = mStage->GetSize();
299 width = stageSize.width;
300 height = stageSize.height;
304 if( ( width < Math::MACHINE_EPSILON_1000 ) || ( height < Math::MACHINE_EPSILON_1000 ) )
306 // On the stage initialization this method is called but the size has not been set.
307 // There is no point to set any value if width or height is zero.
311 float nearClippingPlane;
312 float farClippingPlane;
314 CalculateClippingAndZ( width, height, nearClippingPlane, farClippingPlane, cameraZ );
316 // calculate the position of the camera to have the desired aspect ratio
317 const float fieldOfView = 2.0f * std::atan( height * 0.5f / cameraZ );
319 // unless it is too small, we want at least as much space to the back as we have torwards the front
320 const float minClippingFarPlane = 2.f * nearClippingPlane;
321 if ( farClippingPlane < minClippingFarPlane )
323 farClippingPlane = minClippingFarPlane;
326 const float aspectRatio = width / height;
328 SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
329 SetFieldOfView( fieldOfView );
330 SetNearClippingPlane( nearClippingPlane );
331 SetFarClippingPlane( farClippingPlane );
332 SetAspectRatio( aspectRatio );
333 mCameraAttachment->SetStereoBias( stereoBias );
338 void CameraActor::SetOrthographicProjection( const Vector2& size )
340 // Choose near, far and Z parameters to match the SetPerspectiveProjection above.
341 float nearClippingPlane;
342 float farClippingPlane;
344 CalculateClippingAndZ( size.width, size.height, nearClippingPlane, farClippingPlane, cameraZ );
345 SetOrthographicProjection( -size.x*0.5f, size.x*0.5f, size.y*0.5f, -size.y*0.5f,
346 nearClippingPlane, farClippingPlane );
350 void CameraActor::SetOrthographicProjection( float left, float right, float top, float bottom, float near, float far )
352 mCameraAttachment->SetLeftClippingPlane(left);
353 mCameraAttachment->SetRightClippingPlane(right);
354 mCameraAttachment->SetTopClippingPlane(top);
355 mCameraAttachment->SetBottomClippingPlane(bottom);
356 SetNearClippingPlane( near );
357 SetFarClippingPlane( far );
358 SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
361 bool CameraActor::BuildPickingRay( const Vector2& screenCoordinates,
362 const Viewport& viewport,
364 Vector4& rayDirection )
367 if( GetProjectionMode() == Dali::Camera::PERSPECTIVE_PROJECTION )
369 // Build a picking ray in the world reference system.
370 // ray starts from the camera world position
371 rayOrigin = mNode->GetWorldPosition( mStage->GetEventBufferIndex() );
374 // Transform the touch point from the screen coordinate system to the world coordinates system.
375 Vector4 near( screenCoordinates.x - viewport.x, viewport.height - (screenCoordinates.y - viewport.y), 0.f, 1.f );
376 if( !Unproject( near, mCameraAttachment->GetInverseViewProjectionMatrix(), viewport.width, viewport.height, near ) )
378 // unproject failed so no picking ray possible
382 // Compute the ray's director vector.
383 rayDirection.x = near.x - rayOrigin.x;
384 rayDirection.y = near.y - rayOrigin.y;
385 rayDirection.z = near.z - rayOrigin.z;
386 rayDirection.Normalize();
387 rayDirection.w = 1.f;
391 float nearPlaneDistance = GetNearClippingPlane();
392 BuildOrthoPickingRay( GetViewMatrix(),
393 GetProjectionMatrix(),
394 viewport, screenCoordinates.x,
404 const Matrix& CameraActor::GetViewMatrix() const
408 return mCameraAttachment->GetViewMatrix();
412 return Matrix::IDENTITY;
416 const Matrix& CameraActor::GetProjectionMatrix() const
420 return mCameraAttachment->GetProjectionMatrix();
424 return Matrix::IDENTITY;
428 unsigned int CameraActor::GetDefaultPropertyCount() const
430 return Actor::GetDefaultPropertyCount() + DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT;
433 void CameraActor::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
435 Actor::GetDefaultPropertyIndices( indices ); // Actor class properties
437 indices.reserve( indices.size() + DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT );
439 int index = DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
440 for ( int i = 0; i < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT; ++i, ++index )
442 indices.push_back( index );
446 bool CameraActor::IsDefaultPropertyWritable( Property::Index index ) const
448 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
450 return Actor::IsDefaultPropertyWritable(index);
454 if( Dali::CameraActor::PROJECTION_MATRIX == index || Dali::CameraActor::VIEW_MATRIX == index )
465 bool CameraActor::IsDefaultPropertyAnimatable( Property::Index index ) const
467 bool animatable = false; // Our properties are not animatable.
469 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
471 animatable = Actor::IsDefaultPropertyAnimatable(index);
476 bool CameraActor::IsDefaultPropertyAConstraintInput( Property::Index index ) const
478 bool animatable = true; // Our properties can be used as inputs to constraints.
480 if( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
482 animatable = Actor::IsDefaultPropertyAConstraintInput(index);
487 Property::Type CameraActor::GetDefaultPropertyType( Property::Index index ) const
489 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
491 return Actor::GetDefaultPropertyType(index);
495 index -= DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
497 if ( ( index >= 0 ) && ( index < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT ) )
499 return DEFAULT_CAMERA_ACTOR_PROPERTY_TYPES[index];
503 // index out-of-bounds
504 return Property::NONE;
509 const std::string& CameraActor::GetDefaultPropertyName( Property::Index index ) const
511 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
513 return Actor::GetDefaultPropertyName(index);
517 index -= DEFAULT_ACTOR_PROPERTY_MAX_COUNT;
519 if ( ( index >= 0 ) && ( index < DEFAULT_CAMERA_ACTOR_PROPERTY_COUNT ) )
521 return DEFAULT_CAMERA_ACTOR_PROPERTY_NAMES[index];
525 // index out-of-bounds
526 static const std::string INVALID_PROPERTY_NAME;
527 return INVALID_PROPERTY_NAME;
532 Property::Index CameraActor::GetDefaultPropertyIndex(const std::string& name) const
534 Property::Index index = Property::INVALID_INDEX;
536 DALI_ASSERT_DEBUG( NULL != mDefaultCameraActorPropertyLookup );
538 // Look for name in current class' default properties
539 DefaultPropertyLookup::const_iterator result = mDefaultCameraActorPropertyLookup->find( name );
540 if ( mDefaultCameraActorPropertyLookup->end() != result )
542 index = result->second;
546 // If not found, check in base class
547 index = Actor::GetDefaultPropertyIndex( name );
553 void CameraActor::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
555 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
557 Actor::SetDefaultProperty(index, propertyValue);
561 DALI_ASSERT_DEBUG(mCameraAttachment && "where is the camera?");
564 case Dali::CameraActor::TYPE:
566 std::string s(propertyValue.Get<std::string>());
567 if(s == "LOOK_AT_TARGET")
569 mCameraAttachment->SetType(Dali::Camera::LOOK_AT_TARGET);
571 else if(s == "FREE_LOOK")
573 mCameraAttachment->SetType(Dali::Camera::FREE_LOOK);
577 DALI_LOG_WARNING("Unknown camera type\n");
581 case Dali::CameraActor::PROJECTION_MODE:
583 std::string s(propertyValue.Get<std::string>());
584 if(s == "PERSPECTIVE_PROJECTION")
586 mCameraAttachment->SetProjectionMode(Dali::Camera::PERSPECTIVE_PROJECTION);
588 else if(s == "ORTHOGRAPHIC_PROJECTION")
590 mCameraAttachment->SetProjectionMode(Dali::Camera::ORTHOGRAPHIC_PROJECTION);
594 DALI_LOG_WARNING("Unknown projection mode\n");
598 case Dali::CameraActor::FIELD_OF_VIEW:
600 mCameraAttachment->SetFieldOfView(propertyValue.Get<float>());
603 case Dali::CameraActor::ASPECT_RATIO:
605 mCameraAttachment->SetAspectRatio(propertyValue.Get<float>());
608 case Dali::CameraActor::LEFT_PLANE_DISTANCE:
610 mCameraAttachment->SetLeftClippingPlane(propertyValue.Get<float>());
613 case Dali::CameraActor::RIGHT_PLANE_DISTANCE:
615 mCameraAttachment->SetRightClippingPlane(propertyValue.Get<float>());
618 case Dali::CameraActor::TOP_PLANE_DISTANCE:
620 mCameraAttachment->SetTopClippingPlane(propertyValue.Get<float>());
623 case Dali::CameraActor::BOTTOM_PLANE_DISTANCE:
625 mCameraAttachment->SetBottomClippingPlane(propertyValue.Get<float>());
628 case Dali::CameraActor::NEAR_PLANE_DISTANCE:
630 mCameraAttachment->SetNearClippingPlane(propertyValue.Get<float>());
633 case Dali::CameraActor::FAR_PLANE_DISTANCE:
635 mCameraAttachment->SetFarClippingPlane(propertyValue.Get<float>());
638 case Dali::CameraActor::TARGET_POSITION:
640 mCameraAttachment->SetTargetPosition(propertyValue.Get<Vector3>());
643 case Dali::CameraActor::PROJECTION_MATRIX:
645 DALI_LOG_WARNING("projection-matrix property is not animatable \n");
648 case Dali::CameraActor::VIEW_MATRIX:
650 DALI_LOG_WARNING("view-matrix property is not animatable \n");
653 case Dali::CameraActor::INVERT_Y_AXIS:
655 mCameraAttachment->SetInvertYAxis(propertyValue.Get<bool>());
660 DALI_LOG_WARNING("Unknown property (%d)\n", index);
668 Property::Value CameraActor::GetDefaultProperty( Property::Index index ) const
671 if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
673 ret = Actor::GetDefaultProperty(index);
677 DALI_ASSERT_DEBUG(mCameraAttachment && "where is the camera?");
681 case Dali::CameraActor::TYPE:
683 if(mCameraAttachment->GetType() == Dali::Camera::LOOK_AT_TARGET)
685 ret = "LOOK_AT_TARGET";
687 else if(mCameraAttachment->GetType() == Dali::Camera::FREE_LOOK)
694 DALI_ASSERT_DEBUG("Unknown camera type\n");
700 case Dali::CameraActor::PROJECTION_MODE:
702 if(mCameraAttachment->GetProjectionMode() == Dali::Camera::PERSPECTIVE_PROJECTION)
704 ret = "PERSPECTIVE_PROJECTION";
706 else if(mCameraAttachment->GetProjectionMode() == Dali::Camera::ORTHOGRAPHIC_PROJECTION)
708 ret = "ORTHOGRAPHIC_PROJECTION";
713 DALI_ASSERT_DEBUG("Unknown projection mode\n");
717 case Dali::CameraActor::FIELD_OF_VIEW:
719 ret = mCameraAttachment->GetFieldOfView();
722 case Dali::CameraActor::ASPECT_RATIO:
724 ret = mCameraAttachment->GetAspectRatio();
727 case Dali::CameraActor::LEFT_PLANE_DISTANCE:
729 ret = mCameraAttachment->GetLeftClippingPlane();
732 case Dali::CameraActor::RIGHT_PLANE_DISTANCE:
734 ret = mCameraAttachment->GetRightClippingPlane();
737 case Dali::CameraActor::TOP_PLANE_DISTANCE:
739 ret = mCameraAttachment->GetTopClippingPlane();
742 case Dali::CameraActor::BOTTOM_PLANE_DISTANCE:
744 ret = mCameraAttachment->GetBottomClippingPlane();
747 case Dali::CameraActor::NEAR_PLANE_DISTANCE:
749 ret = mCameraAttachment->GetNearClippingPlane();
752 case Dali::CameraActor::FAR_PLANE_DISTANCE:
754 ret = mCameraAttachment->GetFarClippingPlane();
757 case Dali::CameraActor::TARGET_POSITION:
759 ret = mCameraAttachment->GetTargetPosition();
762 case Dali::CameraActor::PROJECTION_MATRIX:
764 ret = mCameraAttachment->GetProjectionMatrix();
767 case Dali::CameraActor::VIEW_MATRIX:
769 ret = mCameraAttachment->GetViewMatrix();
772 case Dali::CameraActor::INVERT_Y_AXIS:
774 ret = mCameraAttachment->GetInvertYAxis();
779 DALI_LOG_WARNING("Unknown property (%d)\n", index);
788 const SceneGraph::PropertyBase* CameraActor::GetSceneObjectAnimatableProperty( Property::Index index ) const
790 DALI_ASSERT_ALWAYS( IsPropertyAnimatable(index) && "Property is not animatable" );
792 const SceneGraph::PropertyBase* property( NULL );
794 // This method should only return a property of an object connected to the scene-graph
800 // let actor handle animatable properties, we have no animatable properties
801 if( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT )
803 property = Actor::GetSceneObjectAnimatableProperty(index);
809 const PropertyInputImpl* CameraActor::GetSceneObjectInputProperty( Property::Index index ) const
811 const PropertyInputImpl* property( NULL );
813 // This method should only return a property of an object connected to the scene-graph
819 // if its an actor default property or a custom property (actor already handles custom properties)
820 if( ( index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT ) || ( index >= DEFAULT_PROPERTY_MAX_COUNT ) )
822 property = Actor::GetSceneObjectInputProperty(index);
828 case Dali::CameraActor::PROJECTION_MATRIX:
830 property = mCameraAttachment->GetProjectionMatrixProperty();
833 case Dali::CameraActor::VIEW_MATRIX:
835 property = mCameraAttachment->GetViewMatrixProperty();
839 DALI_LOG_WARNING("Not an input property (%d)\n", index);
848 } // namespace Internal