+ matrixAfter.GetTransformComponents(position, rotation, scale);
+ DALI_TEST_EQUALS(reflected, rotation, 0.01f, TEST_LOCATION);
+
+ // Test Orthographic camera + Look at target
+ freeLookCameraActor.SetType(Camera::LOOK_AT_TARGET);
+ freeLookCameraActor.SetTargetPosition(targetPosition);
+
+ // Make sure the recalculation will take place
+ freeLookCameraActor.SetProperty(Dali::DevelCameraActor::Property::REFLECTION_PLANE, Vector4(0.0f, 1.0f, 0.0f, 0.0f));
+
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+ application.Render();
+
+ // Nothing should change despite of different camera type
+ matrixAfter.GetTransformComponents(position, rotation, scale);
+ DALI_TEST_EQUALS(reflected, rotation, 0.01f, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliCameraActorProjectionDirection(void)
+{
+ TestApplication application;
+
+ Integration::Scene stage = application.GetScene();
+ Vector2 stageSize = stage.GetSize();
+
+ CameraActor defaultCameraActor = stage.GetRenderTaskList().GetTask(0).GetCameraActor();
+ CameraActor expectCameraActor1 = CameraActor::New(stageSize);
+ CameraActor expectCameraActor2 = CameraActor::New(stageSize);
+ CameraActor expectCameraActor3 = CameraActor::New(stageSize);
+
+ float fieldOfView = defaultCameraActor.GetFieldOfView();
+ float aspectRatio = defaultCameraActor.GetAspectRatio();
+
+ // Calculate expect camera 1's fov.
+ float anotherFieldOfView = 2.0f * std::atan(std::tan(fieldOfView * 0.5f) / aspectRatio);
+ expectCameraActor1.SetFieldOfView(anotherFieldOfView);
+
+ // Calculate expect camera 2's fov and aspect ratio.
+ float anotherFieldOfView2 = 2.0f * std::atan(std::tan(fieldOfView * 0.5f) * aspectRatio);
+ float anotherAspectRatio = 1.0f / aspectRatio;
+ expectCameraActor2.SetFieldOfView(anotherFieldOfView2);
+ expectCameraActor2.SetAspectRatio(anotherAspectRatio);
+
+ // Calculate expect camera 3's aspect raio
+ expectCameraActor3.SetAspectRatio(anotherAspectRatio);
+
+ stage.Add(expectCameraActor1);
+ stage.Add(expectCameraActor2);
+ stage.Add(expectCameraActor3);
+
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+ application.Render();
+
+ // Test default projection direction is VERTICAL
+ DALI_TEST_EQUALS(defaultCameraActor.GetProperty<int>(Dali::DevelCameraActor::Property::PROJECTION_DIRECTION), static_cast<int>(Dali::DevelCameraActor::ProjectionDirection::VERTICAL), TEST_LOCATION);
+
+ Matrix matrixBefore, matrixAfter;
+ Matrix matrixExpect1, matrixExpect2, matrixExpect3;
+
+ defaultCameraActor.GetProperty(CameraActor::CameraActor::Property::PROJECTION_MATRIX).Get(matrixBefore);
+ expectCameraActor1.GetProperty(CameraActor::CameraActor::Property::PROJECTION_MATRIX).Get(matrixExpect1);
+ expectCameraActor2.GetProperty(CameraActor::CameraActor::Property::PROJECTION_MATRIX).Get(matrixExpect2);
+ expectCameraActor3.GetProperty(CameraActor::CameraActor::Property::PROJECTION_MATRIX).Get(matrixExpect3);
+
+ tet_printf("Check ProjectionDirection::HORIZONTAL\n");
+
+ defaultCameraActor.SetProperty(Dali::DevelCameraActor::Property::PROJECTION_DIRECTION, Dali::DevelCameraActor::ProjectionDirection::HORIZONTAL);
+ DALI_TEST_EQUALS(defaultCameraActor.GetProperty<int>(Dali::DevelCameraActor::Property::PROJECTION_DIRECTION), static_cast<int>(Dali::DevelCameraActor::ProjectionDirection::HORIZONTAL), TEST_LOCATION);
+ // NOTE : ProjectionDirection doesn't change camera actor's FieldOfView and AspectRatio value.)
+ DALI_TEST_EQUALS(defaultCameraActor.GetFieldOfView(), fieldOfView, TEST_LOCATION);
+ DALI_TEST_EQUALS(defaultCameraActor.GetAspectRatio(), aspectRatio, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+ application.Render();
+
+ defaultCameraActor.GetProperty(CameraActor::CameraActor::Property::PROJECTION_MATRIX).Get(matrixAfter);
+
+ // Check camera's ProjectionMatrix same as expect camera 1's ProjectionMatrix.
+ DALI_TEST_EQUALS(matrixAfter, matrixExpect1, Dali::Math::MACHINE_EPSILON_10000, TEST_LOCATION);
+
+ tet_printf("Check ProjectionDirection::HORIZONTAL + Change aspect ratio\n");
+
+ defaultCameraActor.SetAspectRatio(anotherAspectRatio);
+ DALI_TEST_EQUALS(defaultCameraActor.GetAspectRatio(), anotherAspectRatio, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+ application.Render();
+
+ defaultCameraActor.GetProperty(CameraActor::CameraActor::Property::PROJECTION_MATRIX).Get(matrixAfter);
+
+ // Check camera's ProjectionMatrix same as expect camera 2's ProjectionMatrix.
+ DALI_TEST_EQUALS(matrixAfter, matrixExpect2, Dali::Math::MACHINE_EPSILON_10000, TEST_LOCATION);
+
+ tet_printf("Check ProjectionDirection::HORIZONTAL + Change aspect ratio + Change fov\n");
+
+ defaultCameraActor.SetFieldOfView(anotherFieldOfView);
+ DALI_TEST_EQUALS(defaultCameraActor.GetFieldOfView(), anotherFieldOfView, TEST_LOCATION);
+ DALI_TEST_EQUALS(defaultCameraActor.GetAspectRatio(), anotherAspectRatio, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+ application.Render();
+
+ defaultCameraActor.GetProperty(CameraActor::CameraActor::Property::PROJECTION_MATRIX).Get(matrixAfter);
+
+ // Check camera's ProjectionMatrix same as expect camera 3's ProjectionMatrix.
+ DALI_TEST_EQUALS(matrixAfter, matrixExpect3, Dali::Math::MACHINE_EPSILON_10000, TEST_LOCATION);
+
+ tet_printf("Check ProjectionDirection::VERTICAL, the original camera\n");
+
+ defaultCameraActor.SetProperty(Dali::DevelCameraActor::Property::PROJECTION_DIRECTION, Dali::DevelCameraActor::ProjectionDirection::VERTICAL);
+ defaultCameraActor.SetFieldOfView(fieldOfView);
+ defaultCameraActor.SetAspectRatio(aspectRatio);
+ DALI_TEST_EQUALS(defaultCameraActor.GetProperty<int>(Dali::DevelCameraActor::Property::PROJECTION_DIRECTION), static_cast<int>(Dali::DevelCameraActor::ProjectionDirection::VERTICAL), TEST_LOCATION);
+ DALI_TEST_EQUALS(defaultCameraActor.GetFieldOfView(), fieldOfView, TEST_LOCATION);
+ DALI_TEST_EQUALS(defaultCameraActor.GetAspectRatio(), aspectRatio, TEST_LOCATION);
+
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+ application.Render();
+
+ defaultCameraActor.GetProperty(CameraActor::CameraActor::Property::PROJECTION_MATRIX).Get(matrixAfter);
+
+ // Check vertical camera's ProjectionMatrix same as original ProjectionMatrix.
+ DALI_TEST_EQUALS(matrixAfter, matrixBefore, Dali::Math::MACHINE_EPSILON_10000, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliCameraActorGetAspectRatioNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ instance.GetAspectRatio();
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorGetFieldOfViewNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ instance.GetFieldOfView();
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorGetInvertYAxisNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ instance.GetInvertYAxis();
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetAspectRatioNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ float arg1(0.0f);
+ instance.SetAspectRatio(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetFieldOfViewNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ float arg1(0.0f);
+ instance.SetFieldOfView(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetInvertYAxisNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ bool arg1(false);
+ instance.SetInvertYAxis(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetProjectionModeNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ Dali::Camera::ProjectionMode arg1(Camera::PERSPECTIVE_PROJECTION);
+ instance.SetProjectionMode(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetTargetPositionNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ Dali::Vector3 arg1;
+ instance.SetTargetPosition(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorGetFarClippingPlaneNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ instance.GetFarClippingPlane();
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetFarClippingPlaneNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ float arg1(0.0f);
+ instance.SetFarClippingPlane(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorGetNearClippingPlaneNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ instance.GetNearClippingPlane();
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetNearClippingPlaneNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ float arg1(0.0f);
+ instance.SetNearClippingPlane(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetPerspectiveProjectionNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ Dali::Vector2 arg1;
+ instance.SetPerspectiveProjection(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetOrthographicProjectionNegative02(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ Dali::Vector2 arg1;
+ instance.SetOrthographicProjection(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetTypeNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ Dali::Camera::Type arg1(Camera::FREE_LOOK);
+ instance.SetType(arg1);
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorGetProjectionModeNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ instance.GetProjectionMode();
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorGetTargetPositionNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ instance.GetTargetPosition();
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorGetTypeNegative(void)
+{
+ TestApplication application;
+ Dali::CameraActor instance;
+ try
+ {
+ instance.GetType();
+ DALI_TEST_CHECK(false); // Should not get here
+ }
+ catch(...)
+ {
+ DALI_TEST_CHECK(true); // We expect an assert
+ }
+ END_TEST;
+}
+
+int UtcDaliCameraActorNewDefaultOrthogonalProjection01(void)
+{
+ TestApplication application;
+ tet_infoline("Test that changing to orthogonal projection and then adding to scene calculates the right defaults");
+
+ CameraActor actor = CameraActor::New();
+ DALI_TEST_CHECK(actor);
+
+ actor.SetProjectionMode(Camera::ORTHOGRAPHIC_PROJECTION);
+ application.GetScene().Add(actor);
+
+ // Test application screen size is 480x800
+ // Check that the properties match to that screen size
+ float value;
+ actor.GetProperty(CameraActor::Property::ASPECT_RATIO).Get(value);
+ DALI_TEST_EQUALS(480.0f / 800.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ actor.GetProperty(CameraActor::Property::NEAR_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(800.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ actor.GetProperty(CameraActor::Property::FAR_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(4895.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ actor.GetProperty(CameraActor::Property::LEFT_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(-240.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+ actor.GetProperty(CameraActor::Property::RIGHT_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(240.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ actor.GetProperty(CameraActor::Property::TOP_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(400.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+ actor.GetProperty(CameraActor::Property::BOTTOM_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(-400.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ DALI_TEST_EQUALS(1600.0f, actor.GetProperty(Actor::Property::POSITION_Z).Get<float>(), TEST_LOCATION);
+
+ DALI_TEST_EQUALS(actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION);
+ END_TEST;
+}
+
+int UtcDaliCameraActorNewDefaultOrthogonalProjection02(void)
+{
+ TestApplication application;
+ tet_infoline("Test that changing to orthogonal projection and then adding to scene calculates the right defaults");
+
+ CameraActor actor = CameraActor::New();
+ DALI_TEST_CHECK(actor);
+
+ actor.SetOrthographicProjection(Vector2::ZERO);
+ DALI_TEST_EQUALS(actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION);
+ application.GetScene().Add(actor);
+
+ // Test application screen size is 480x800
+ // Check that the properties match to that screen size
+ float value;
+ actor.GetProperty(CameraActor::Property::ASPECT_RATIO).Get(value);
+ DALI_TEST_EQUALS(480.0f / 800.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ actor.GetProperty(CameraActor::Property::NEAR_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(800.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ actor.GetProperty(CameraActor::Property::FAR_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(4895.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ actor.GetProperty(CameraActor::Property::LEFT_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(-240.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+ actor.GetProperty(CameraActor::Property::RIGHT_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(240.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ actor.GetProperty(CameraActor::Property::TOP_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(400.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+ actor.GetProperty(CameraActor::Property::BOTTOM_PLANE_DISTANCE).Get(value);
+ DALI_TEST_EQUALS(-400.0f, value, FLOAT_EPSILON, TEST_LOCATION);
+
+ DALI_TEST_EQUALS(1600.0f, actor.GetProperty(Actor::Property::POSITION_Z).Get<float>(), TEST_LOCATION);
+
+ DALI_TEST_EQUALS(actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION);
+ END_TEST;
+}
+
+// Add tests for culling:
+// add large actor just outside canvas, & rotate it 45% - should still be rendered
+// Rotate back to 0, should be culled.
+
+int UtcDaliCameraActorCulling01(void)
+{
+ TestApplication application;
+ auto& gfx = application.GetGraphicsController();
+
+ tet_infoline("Create a renderable actor and position it slightly to the left of the scene");
+ tet_infoline("The actor should not be rendered");
+
+ Actor a = CreateRenderableActor(CreateTexture(TextureType::TEXTURE_2D, Pixel::Format::RGBA8888, 200, 200));
+
+ a[Actor::Property::PARENT_ORIGIN] = ParentOrigin::CENTER_LEFT;
+ a[Actor::Property::ANCHOR_POINT] = ParentOrigin::CENTER_RIGHT;
+ a[Actor::Property::POSITION] = Vector3(-10.0f, 0.0f, 0.0f);
+
+ application.GetScene().Add(a);
+
+ application.SendNotification();
+ application.Render();
+
+ auto& cmdStack = gfx.mCommandBufferCallStack;
+ DALI_TEST_CHECK(!cmdStack.FindMethod("Draw") && !cmdStack.FindMethod("DrawIndexed"));
+
+ tet_infoline("Rotate the actor 45 degrees, the actor should now be rendered");
+ a[Actor::Property::ORIENTATION] = Quaternion(Dali::ANGLE_45, Vector3::ZAXIS);
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(cmdStack.FindMethod("Draw") || cmdStack.FindMethod("DrawIndexed"));
+
+ END_TEST;
+}
+
+int UtcDaliCameraActorSetProperty(void)
+{
+ TestApplication application;
+
+ tet_infoline("Test the CameraActor reset properties when On Scene, if user set property explicitly.");
+
+ CameraActor camera = CameraActor::New();
+ camera.SetFieldOfView(1.0f);
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(1.0f, camera.GetFieldOfView(), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();
+
+ camera = CameraActor::New();
+ camera.SetAspectRatio(1.0f);
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(1.0f, camera.GetAspectRatio(), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();
+
+ camera = CameraActor::New();
+ camera.SetNearClippingPlane(1.0f);
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(1.0f, camera.GetNearClippingPlane(), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();
+
+ camera = CameraActor::New();
+ camera.SetFarClippingPlane(1.0f);
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(1.0f, camera.GetFarClippingPlane(), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();
+
+ camera = CameraActor::New();
+ camera.SetProperty(Dali::Actor::Property::POSITION, Vector3(100.0f, 100.0f, 100.0f));
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(Vector3(100.0f, 100.0f, 100.0f), camera.GetProperty<Vector3>(Dali::Actor::Property::POSITION), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();
+
+ camera = CameraActor::New();
+ camera.SetProperty(Dali::Actor::Property::POSITION_X, 1.0f);
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(1.0f, camera.GetProperty<float>(Dali::Actor::Property::POSITION_X), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();
+
+ camera = CameraActor::New();
+ camera.SetProperty(Dali::Actor::Property::POSITION_Y, 1.0f);
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(1.0f, camera.GetProperty<float>(Dali::Actor::Property::POSITION_Y), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();
+
+ camera = CameraActor::New();
+ camera.SetProperty(Dali::Actor::Property::POSITION_Z, 1.0f);
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(1.0f, camera.GetProperty<float>(Dali::Actor::Property::POSITION_Z), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();
+
+ camera = CameraActor::New();
+ camera.SetProperty(Dali::Actor::Property::ORIENTATION, Quaternion(Radian(Degree(90.0f)), Vector3::XAXIS));
+ application.GetScene().Add(camera);
+ DALI_TEST_EQUALS(Quaternion(Radian(Degree(90.0f)), Vector3::XAXIS), camera.GetProperty<Quaternion>(Dali::Actor::Property::ORIENTATION), TEST_LOCATION);
+ camera.Unparent();
+ camera.Reset();