Further Setter/Getter public API removal from Dali::Actor
[platform/core/uifw/dali-demo.git] / examples / reflection-demo / reflection-example.cpp
index 3bf189f..013c0b6 100644 (file)
@@ -192,11 +192,11 @@ private:
 
     stage.GetRenderTaskList().GetTask(0).SetClearEnabled(false);
     mLayer3D = Layer::New();
-    mLayer3D.SetSize( stageWidth, stageHeight );
+    mLayer3D.SetProperty( Actor::Property::SIZE, Vector2( stageWidth, stageHeight ) );
     stage.Add(mLayer3D);
 
-    mLayer3D.SetAnchorPoint( AnchorPoint::CENTER );
-    mLayer3D.SetParentOrigin( ParentOrigin::CENTER );
+    mLayer3D.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+    mLayer3D.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
     mLayer3D.SetBehavior( Layer::LAYER_3D );
     mLayer3D.SetDepthTestDisabled( false );
 
@@ -301,11 +301,11 @@ private:
 
     Actor panScreen = Actor::New();
     auto stageSize = stage.GetSize();
-    panScreen.SetSize( stageSize.width, stageSize.height );
-    panScreen.SetAnchorPoint( AnchorPoint::CENTER );
-    panScreen.SetParentOrigin( ParentOrigin::CENTER );
+    panScreen.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width, stageSize.height ) );
+    panScreen.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+    panScreen.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
     auto camera2d = stage.GetRenderTaskList().GetTask(0).GetCameraActor();
-    panScreen.SetPosition( 0, 0, camera2d.GetNearClippingPlane() );
+    panScreen.SetProperty( Actor::Property::POSITION, Vector3( 0, 0, camera2d.GetNearClippingPlane() ));
     camera2d.Add(panScreen);
     camera2d.RotateBy( Degree(180.0f), Vector3( 0.0, 1.0, 0.0 ) );
     mPanGestureDetector = PanGestureDetector::New();
@@ -330,13 +330,13 @@ private:
     {
       auto actor = node.cameraId != 0xffffffff ? CameraActor::New( stage.GetSize() ) : Actor::New();
 
-      actor.SetSize( 1, 1, 1 );
-      actor.SetName( node.name );
-      actor.SetAnchorPoint( AnchorPoint::CENTER );
-      actor.SetParentOrigin( ParentOrigin::CENTER );
-      actor.SetPosition( node.translation[0], node.translation[1], node.translation[2] );
-      actor.SetScale( node.scale[0], node.scale[1], node.scale[2] );
-      actor.SetOrientation( Quaternion(node.rotationQuaternion[3],
+      actor.SetProperty( Actor::Property::SIZE, Vector3( 1, 1, 1 ) );
+      actor.SetProperty( Dali::Actor::Property::NAME, node.name );
+      actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+      actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+      actor.SetProperty( Actor::Property::POSITION, Vector3( node.translation[0], node.translation[1], node.translation[2] ));
+      actor.SetProperty( Actor::Property::SCALE, Vector3( node.scale[0], node.scale[1], node.scale[2] ) );
+      actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(node.rotationQuaternion[3],
                                        node.rotationQuaternion[0],
                                        node.rotationQuaternion[1],
                                        node.rotationQuaternion[2]));
@@ -374,7 +374,7 @@ private:
         mCameraPos = Vector3(node.translation[0], node.translation[1], node.translation[2]);
         auto quatY = Quaternion( Degree(180.0f), Vector3( 0.0, 1.0, 0.0) );
         auto cameraActor = CameraActor::DownCast( actor );
-        cameraActor.SetOrientation( Quaternion(node.rotationQuaternion[3],
+        cameraActor.SetProperty( Actor::Property::ORIENTATION, Quaternion(node.rotationQuaternion[3],
                                                node.rotationQuaternion[0],
                                                node.rotationQuaternion[1],
                                                node.rotationQuaternion[2] )
@@ -388,8 +388,8 @@ private:
         cameraActor.SetFieldOfView( camera->yfov );
 
         cameraActor.SetProperty( CameraActor::Property::INVERT_Y_AXIS, true);
-        cameraActor.SetAnchorPoint( AnchorPoint::CENTER );
-        cameraActor.SetParentOrigin( ParentOrigin::CENTER );
+        cameraActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        cameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
 
         mCameras.emplace_back( cameraActor );
       }
@@ -634,7 +634,7 @@ private:
     auto sun = root.FindChildByName( "sun" );
     sun.SetProperty( mSunTimeUniformIndex, mMockTime );
     sun.SetProperty( mSunKFactorUniformIndex, mKFactor );
-    sun.SetOrientation( Quaternion( Radian(Degree(rotationAngle)), Vector3(0.0, 1.0, 0.0)));
+    sun.SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian(Degree(rotationAngle)), Vector3(0.0, 1.0, 0.0)));
     return true;
   }