[Tizen] Add screen and client rotation itself function
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / camera-actor-impl.cpp
index b531ab6..a0faef3 100644 (file)
@@ -25,6 +25,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/actors/camera-actor-devel.h>
 #include <dali/integration-api/debug.h>
 #include <dali/internal/event/common/property-helper.h>
 #include <dali/internal/event/common/stage-impl.h>
@@ -208,6 +209,14 @@ void CameraActor::OnStageConnectionInternal()
   }
 }
 
+void CameraActor::SetReflectByPlane(const Vector4& plane) {
+  SceneGraph::Camera* cam = const_cast<SceneGraph::Camera*>(GetCamera());
+  if (cam)
+  {
+    cam->SetReflectByPlane(plane);
+  }
+}
+
 void CameraActor::SetTarget( const Vector3& target )
 {
   if( target != mTarget ) // using range epsilon
@@ -522,6 +531,12 @@ const SceneGraph::Camera* CameraActor::GetCamera() const
   return mSceneObject;
 }
 
+void CameraActor::RotateProjection( int rotationAngle )
+{
+  // sceneObject is being used in a separate thread; queue a message to set
+  RotateProjectionMessage( GetEventThreadServices(), *mSceneObject, rotationAngle );
+}
+
 void CameraActor::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
 {
   if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
@@ -618,6 +633,12 @@ void CameraActor::SetDefaultProperty( Property::Index index, const Property::Val
         SetInvertYAxis( propertyValue.Get<bool>() ); // set to false in case property is not bool
         break;
       }
+      case Dali::DevelCameraActor::Property::REFLECTION_PLANE:
+      {
+        SetReflectByPlane( propertyValue.Get<Vector4>() );
+        break;
+      }
+
       default:
       {
         DALI_LOG_WARNING( "Unknown property (%d)\n", index );