From fccb244dff5d42180d207fec97c613c1a77d34bf Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Tue, 19 May 2020 13:43:33 +0100 Subject: [PATCH 01/16] Change to use properties instead of Setter/Getter APIs of Dali::Actor Change-Id: I27691e0b380b25ef66801d6ff91f1f401db65954 --- .../utc-Dali-Internal-FrustumCulling.cpp | 30 +- .../dali-test-suite-utils/test-custom-actor.cpp | 4 +- .../dali/dali-test-suite-utils/test-custom-actor.h | 4 +- automated-tests/src/dali/utc-Dali-Actor.cpp | 868 ++++++++-------- automated-tests/src/dali/utc-Dali-Animation.cpp | 1056 ++++++++++---------- automated-tests/src/dali/utc-Dali-BaseHandle.cpp | 26 +- automated-tests/src/dali/utc-Dali-BufferImage.cpp | 4 +- automated-tests/src/dali/utc-Dali-CameraActor.cpp | 28 +- automated-tests/src/dali/utc-Dali-Constrainer.cpp | 70 +- automated-tests/src/dali/utc-Dali-Constraint.cpp | 42 +- automated-tests/src/dali/utc-Dali-Constraints.cpp | 2 +- automated-tests/src/dali/utc-Dali-Context.cpp | 2 +- automated-tests/src/dali/utc-Dali-CustomActor.cpp | 319 +++--- .../src/dali/utc-Dali-FrameCallbackInterface.cpp | 50 +- .../src/dali/utc-Dali-HitTestAlgorithm.cpp | 84 +- .../src/dali/utc-Dali-HoverProcessing.cpp | 90 +- automated-tests/src/dali/utc-Dali-Layer.cpp | 8 +- .../src/dali/utc-Dali-LongPressGestureDetector.cpp | 44 +- .../dali/utc-Dali-LongPressGestureRecognizer.cpp | 18 +- automated-tests/src/dali/utc-Dali-NativeImage.cpp | 2 +- .../src/dali/utc-Dali-PanGestureDetector.cpp | 96 +- .../src/dali/utc-Dali-PanGestureRecognizer.cpp | 32 +- .../src/dali/utc-Dali-PinchGestureDetector.cpp | 50 +- .../src/dali/utc-Dali-PinchGestureRecognizer.cpp | 34 +- .../src/dali/utc-Dali-PropertyNotification.cpp | 16 +- automated-tests/src/dali/utc-Dali-RenderTask.cpp | 24 +- automated-tests/src/dali/utc-Dali-Renderer.cpp | 32 +- .../src/dali/utc-Dali-RotationGestureDetector.cpp | 50 +- .../dali/utc-Dali-RotationGestureRecognizer.cpp | 4 +- automated-tests/src/dali/utc-Dali-Sampler.cpp | 6 +- automated-tests/src/dali/utc-Dali-Scene.cpp | 8 +- automated-tests/src/dali/utc-Dali-Scripting.cpp | 58 +- automated-tests/src/dali/utc-Dali-Stage.cpp | 16 +- .../src/dali/utc-Dali-TapGestureDetector.cpp | 44 +- .../src/dali/utc-Dali-TapGestureRecognizer.cpp | 22 +- automated-tests/src/dali/utc-Dali-TextureSet.cpp | 4 +- .../src/dali/utc-Dali-TouchDataProcessing.cpp | 128 +-- .../src/dali/utc-Dali-TouchProcessing.cpp | 110 +- automated-tests/src/dali/utc-Dali-TypeRegistry.cpp | 20 +- automated-tests/src/dali/utc-Dali-WheelEvent.cpp | 2 +- dali/integration-api/debug.cpp | 9 +- dali/integration-api/debug.h | 13 +- .../event/events/hover-event-processor.cpp | 6 +- .../event/events/multi-point-event-util.cpp | 16 +- .../event/events/touch-event-processor.cpp | 6 +- .../event/events/wheel-event-processor.cpp | 8 +- .../size-negotiation/relayout-controller-impl.cpp | 6 +- 47 files changed, 1815 insertions(+), 1756 deletions(-) diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp index aa4f298..e53f0f1 100644 --- a/automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp +++ b/automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp @@ -71,8 +71,8 @@ Actor CreateMeshActorToStage( TestApplication& application, Vector3 parentOrigin Actor meshActor = Actor::New(); meshActor.AddRenderer( renderer ); meshActor.SetSize( Vector3( 400.0f, 400.0f, 0.1f ) ); - meshActor.SetParentOrigin( parentOrigin ); - meshActor.SetAnchorPoint( anchorPoint ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint ); Stage::GetCurrent().Add( meshActor ); application.SendNotification(); @@ -101,7 +101,7 @@ bool GetCameraDepths( TestApplication& application, float& nearPlane, float& far nearPlane = cameraActor.GetNearClippingPlane(); farPlane = cameraActor.GetFarClippingPlane(); - cameraDepth = cameraActor.GetCurrentPosition().z; + cameraDepth = cameraActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z; } return !!cameraActor; @@ -137,8 +137,8 @@ int UtcFrustumLeftCullP(void) float radius = meshActor.GetTargetSize().Length() * 0.5f; Vector2 stageSize = Stage::GetCurrent().GetSize(); - meshActor.SetParentOrigin( Vector3( -radius / stageSize.width + offset, 0.5f, 0.5f ) ); - meshActor.SetAnchorPoint( AnchorPoint::CENTER ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( -radius / stageSize.width + offset, 0.5f, 0.5f ) ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); drawTrace.Reset(); application.SendNotification(); @@ -182,8 +182,8 @@ int UtcFrustumRightCullP(void) float radius = meshActor.GetTargetSize().Length() * 0.5f; Vector2 stageSize = Stage::GetCurrent().GetSize(); - meshActor.SetParentOrigin( Vector3( radius / stageSize.width + offset, 0.5f, 0.5f ) ); - meshActor.SetAnchorPoint( AnchorPoint::CENTER ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( radius / stageSize.width + offset, 0.5f, 0.5f ) ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); drawTrace.Reset(); application.SendNotification(); @@ -227,8 +227,8 @@ int UtcFrustumTopCullP(void) float radius = meshActor.GetTargetSize().Length() * 0.5f; Vector2 stageSize = Stage::GetCurrent().GetSize(); - meshActor.SetParentOrigin( Vector3( 0.5f, -radius / stageSize.width + offset, 0.5f ) ); - meshActor.SetAnchorPoint( AnchorPoint::CENTER ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, -radius / stageSize.width + offset, 0.5f ) ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); drawTrace.Reset(); application.SendNotification(); @@ -273,8 +273,8 @@ int UtcFrustumBottomCullP(void) float radius = meshActor.GetTargetSize().Length() * 0.5f; Vector2 stageSize = Stage::GetCurrent().GetSize(); - meshActor.SetParentOrigin( Vector3( 0.5f, radius / stageSize.width + offset, 0.5f ) ); - meshActor.SetAnchorPoint( AnchorPoint::CENTER ); + meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, radius / stageSize.width + offset, 0.5f ) ); + meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); drawTrace.Reset(); application.SendNotification(); @@ -316,7 +316,7 @@ int UtcFrustumNearCullP(void) DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) ); Actor meshActor = CreateMeshActorToStage( application ); - Vector3 meshPosition = meshActor.GetCurrentPosition(); + Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); float radius = meshActor.GetTargetSize().Length() * 0.5f; float offset = radius + 0.1f; @@ -344,7 +344,7 @@ int UtcFrustumNearCullN(void) DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) ); Actor meshActor = CreateMeshActorToStage( application ); - Vector3 meshPosition = meshActor.GetCurrentPosition(); + Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); float offset = meshActor.GetTargetSize().z - 0.1f; meshPosition.z = cameraDepth - nearPlane + offset; @@ -370,7 +370,7 @@ int UtcFrustumFarCullP(void) DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) ); Actor meshActor = CreateMeshActorToStage( application ); - Vector3 meshPosition = meshActor.GetCurrentPosition(); + Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); float radius = meshActor.GetTargetSize().Length() * 0.5f; float offset = radius + 0.1f; @@ -398,7 +398,7 @@ int UtcFrustumFarCullN(void) DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) ); Actor meshActor = CreateMeshActorToStage( application ); - Vector3 meshPosition = meshActor.GetCurrentPosition(); + Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); float offset = meshActor.GetTargetSize().z - 0.1f; meshPosition.z = cameraDepth - farPlane - offset; diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp index d300568..3cf7ecb 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp @@ -27,7 +27,7 @@ TestCustomActor TestCustomActor::NewNegoSize() { Impl::TestCustomActor* impl = new Impl::TestCustomActor( true ); TestCustomActor custom( *impl ); // takes ownership - custom.SetName( "SizeNegotiationActor" ); + custom.SetProperty( Dali::Actor::Property::NAME, "SizeNegotiationActor" ); impl->Initialize(); @@ -290,7 +290,7 @@ void TestCustomActor::AddToCallStacks( const char* method ) mMethodsCalled.push_back( method ); // Combine Actor name with method string - std::string nameAndMethod( Self().GetName() ); + std::string nameAndMethod( Self().GetProperty< std::string >( Dali::Actor::Property::NAME ) ); if ( 0 == nameAndMethod.size() ) { nameAndMethod = "Unknown: "; diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h b/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h index e10b28b..a951b4e 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h @@ -346,10 +346,10 @@ struct TestCustomActorVariant7 : public TestCustomActor virtual void OnInitialize( const char* name ) { // We need to do this early, before the OnChildAdd is recorded - Self().SetName( name ); + Self().SetProperty( Dali::Actor::Property::NAME, name ); mContainer = Dali::Actor::New(); - mContainer.SetName( "Container" ); + mContainer.SetProperty( Dali::Actor::Property::NAME, "Container" ); Self().Add( mContainer ); } diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index 1e68d63..4cc24d0 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -15,6 +15,9 @@ * */ +// Enable debug log for test coverage +#define DEBUG_ENABLED 1 + #include "assert.h" #include #include @@ -22,6 +25,7 @@ #include #include #include +#include #include #include @@ -132,14 +136,14 @@ static int gOnStageCallBackCalled; void OnStageCallback( Actor actor ) { ++gOnStageCallBackCalled; - gActorNamesOnOffStage.push_back( actor.GetName() ); + gActorNamesOnOffStage.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) ); DALI_TEST_CHECK( actor.OnStage() == true ); } static int gOffStageCallBackCalled; void OffStageCallback( Actor actor ) { ++gOffStageCallBackCalled; - gActorNamesOnOffStage.push_back( actor.GetName() ); + gActorNamesOnOffStage.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) ); DALI_TEST_CHECK( actor.OnStage() == false ); } @@ -176,7 +180,7 @@ static std::vector< std::string > gActorNamesRelayout; void OnRelayoutCallback( Actor actor ) { gOnRelayoutCallBackCalled = true; - gActorNamesRelayout.push_back( actor.GetName() ); + gActorNamesRelayout.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) ); } struct VisibilityChangedFunctorData @@ -326,7 +330,7 @@ int UtcDaliActorGetName(void) Actor actor = Actor::New(); - DALI_TEST_CHECK(actor.GetName().empty()); + DALI_TEST_CHECK(actor.GetProperty< std::string >( Actor::Property::NAME ).empty()); END_TEST; } @@ -338,8 +342,8 @@ int UtcDaliActorSetName(void) string str("ActorName"); Actor actor = Actor::New(); - actor.SetName(str); - DALI_TEST_CHECK(actor.GetName() == str); + actor.SetProperty( Actor::Property::NAME,str); + DALI_TEST_CHECK(actor.GetProperty< std::string >( Actor::Property::NAME ) == str); END_TEST; } @@ -748,25 +752,25 @@ int UtcDaliActorSetParentOrigin(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); - actor.SetParentOrigin(vector); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, vector ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); Stage::GetCurrent().Add( actor ); - actor.SetParentOrigin( Vector3( 0.1f, 0.2f, 0.3f ) ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.1f, 0.2f, 0.3f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentParentOrigin(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), TEST_LOCATION ); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -779,7 +783,7 @@ int UtcDaliActorSetParentOriginIndividual(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); actor.SetProperty( Actor::Property::PARENT_ORIGIN_X, vector.x ); @@ -787,7 +791,7 @@ int UtcDaliActorSetParentOriginIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.x, actor.GetCurrentParentOrigin().x, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).x, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN_Y, vector.y ); @@ -795,7 +799,7 @@ int UtcDaliActorSetParentOriginIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.y, actor.GetCurrentParentOrigin().y, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).y, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN_Z, vector.z ); @@ -803,7 +807,7 @@ int UtcDaliActorSetParentOriginIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.z, actor.GetCurrentParentOrigin().z, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).z, TEST_LOCATION ); END_TEST; } @@ -815,15 +819,15 @@ int UtcDaliActorGetCurrentParentOrigin(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); - actor.SetParentOrigin(vector); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, vector ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentParentOrigin()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN )); END_TEST; } @@ -834,24 +838,24 @@ int UtcDaliActorSetAnchorPoint(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); - actor.SetAnchorPoint(vector); + actor.SetProperty( Actor::Property::ANCHOR_POINT, vector ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); Stage::GetCurrent().Add( actor ); - actor.SetAnchorPoint( Vector3( 0.1f, 0.2f, 0.3f ) ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3( 0.1f, 0.2f, 0.3f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentAnchorPoint(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), TEST_LOCATION ); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -864,7 +868,7 @@ int UtcDaliActorSetAnchorPointIndividual(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); actor.SetProperty( Actor::Property::ANCHOR_POINT_X, vector.x ); @@ -872,7 +876,7 @@ int UtcDaliActorSetAnchorPointIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.x, actor.GetCurrentAnchorPoint().x, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).x, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT_Y, vector.y ); @@ -880,7 +884,7 @@ int UtcDaliActorSetAnchorPointIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.y, actor.GetCurrentAnchorPoint().y, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).y, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT_Z, vector.z ); @@ -888,7 +892,7 @@ int UtcDaliActorSetAnchorPointIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.z, actor.GetCurrentAnchorPoint().z, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).z, TEST_LOCATION ); END_TEST; } @@ -900,15 +904,15 @@ int UtcDaliActorGetCurrentAnchorPoint(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); - actor.SetAnchorPoint(vector); + actor.SetProperty( Actor::Property::ANCHOR_POINT, vector); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentAnchorPoint()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT )); END_TEST; } @@ -920,7 +924,7 @@ int UtcDaliActorSetSize01(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector.x, vector.y); @@ -936,7 +940,7 @@ int UtcDaliActorSetSize01(void) application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -986,7 +990,7 @@ int UtcDaliActorSetSize02(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector.x, vector.y, vector.z); @@ -999,7 +1003,7 @@ int UtcDaliActorSetSize02(void) application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1015,7 +1019,7 @@ int UtcDaliActorSetSize03(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(Vector2(vector.x, vector.y)); @@ -1028,7 +1032,7 @@ int UtcDaliActorSetSize03(void) application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1044,7 +1048,7 @@ int UtcDaliActorSetSize04(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector); @@ -1057,7 +1061,7 @@ int UtcDaliActorSetSize04(void) application.Render(); // Check the size in the new frame - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); Stage::GetCurrent().Add( actor ); actor.SetSize( Vector3( 0.1f, 0.2f, 0.3f ) ); @@ -1071,7 +1075,7 @@ int UtcDaliActorSetSize04(void) application.Render(); // Check the size in the new frame - DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentSize(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), TEST_LOCATION ); currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); DALI_TEST_EQUALS( currentSize, Vector3( 0.1f, 0.2f, 0.3f ), Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1087,7 +1091,7 @@ int UtcDaliActorSetSizeIndividual(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetProperty( Actor::Property::SIZE_WIDTH, vector.width ); @@ -1100,7 +1104,7 @@ int UtcDaliActorSetSizeIndividual(void) application.Render(); // Check the width in the new frame - DALI_TEST_EQUALS( vector.width, actor.GetCurrentSize().width, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.width, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, TEST_LOCATION ); sizeWidth = actor.GetProperty( Actor::Property::SIZE_WIDTH ).Get< float >(); DALI_TEST_EQUALS( sizeWidth, vector.width, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1116,7 +1120,7 @@ int UtcDaliActorSetSizeIndividual(void) application.Render(); // Check the height in the new frame - DALI_TEST_EQUALS( vector.height, actor.GetCurrentSize().height, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.height, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, TEST_LOCATION ); sizeHeight = actor.GetProperty( Actor::Property::SIZE_HEIGHT ).Get< float >(); DALI_TEST_EQUALS( sizeHeight, vector.height, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1132,7 +1136,7 @@ int UtcDaliActorSetSizeIndividual(void) application.Render(); // Check the depth in the new frame - DALI_TEST_EQUALS( vector.depth, actor.GetCurrentSize().depth, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.depth, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, TEST_LOCATION ); sizeDepth = actor.GetProperty( Actor::Property::SIZE_DEPTH ).Get< float >(); DALI_TEST_EQUALS( sizeDepth, vector.depth, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1173,7 +1177,7 @@ int UtcDaliActorSetSizeIndividual02(void) Stage::GetCurrent().Add( actor ); Vector3 vector( 100.0f, 200.0f, 400.0f ); - DALI_TEST_CHECK( vector != actor.GetCurrentSize() ); + DALI_TEST_CHECK( vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); actor.SetProperty( Actor::Property::SIZE_WIDTH, vector.width ); DALI_TEST_EQUALS( actor.GetProperty( Actor::Property::SIZE_WIDTH ).Get< float >(), vector.width, Math::MACHINE_EPSILON_0, TEST_LOCATION ); @@ -1189,8 +1193,8 @@ int UtcDaliActorSetSizeIndividual02(void) application.Render(); // Check the width in the new frame - DALI_TEST_EQUALS( vector.width, actor.GetCurrentSize().width, TEST_LOCATION ); - DALI_TEST_EQUALS( vector.height, actor.GetCurrentSize().height, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.width, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.height, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, TEST_LOCATION ); END_TEST; } @@ -1203,7 +1207,7 @@ int UtcDaliActorGetCurrentSize(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 20.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector); @@ -1211,7 +1215,7 @@ int UtcDaliActorGetCurrentSize(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); END_TEST; } @@ -1235,19 +1239,19 @@ int UtcDaliActorGetCurrentSizeImmediate(void) Vector3 vector(100.0f, 100.0f, 20.0f); DALI_TEST_CHECK(vector != actor.GetTargetSize()); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); actor.SetSize(vector); DALI_TEST_CHECK(vector == actor.GetTargetSize()); - DALI_TEST_CHECK(vector != actor.GetCurrentSize()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); // flush the queue and render once application.SendNotification(); application.Render(); DALI_TEST_CHECK(vector == actor.GetTargetSize()); - DALI_TEST_CHECK(vector == actor.GetCurrentSize()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); // Animation // Build the animation @@ -1304,20 +1308,20 @@ int UtcDaliActorSetPosition01(void) Vector3 vector(100.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetPosition(vector.x, vector.y); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); Stage::GetCurrent().Add( actor ); actor.SetPosition( Vector3( 0.1f, 0.2f, 0.3f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); actor.SetX( 1.0f ); actor.SetY( 1.1f ); @@ -1325,13 +1329,13 @@ int UtcDaliActorSetPosition01(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 1.0f, 1.1f, 1.2f ), actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 1.0f, 1.1f, 1.2f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); actor.TranslateBy( Vector3( 0.1f, 0.1f, 0.1f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 1.1f, 1.2f, 1.3f ), actor.GetCurrentPosition(), Math::MACHINE_EPSILON_10000, TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 1.1f, 1.2f, 1.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Math::MACHINE_EPSILON_10000, TEST_LOCATION ); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -1349,7 +1353,7 @@ int UtcDaliActorSetPosition02(void) Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetPosition(vector.x, vector.y, vector.z); @@ -1357,7 +1361,7 @@ int UtcDaliActorSetPosition02(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1373,7 +1377,7 @@ int UtcDaliActorSetPosition03(void) Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetPosition(vector); @@ -1381,7 +1385,7 @@ int UtcDaliActorSetPosition03(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1393,7 +1397,7 @@ int UtcDaliActorSetX(void) Vector3 vector(100.0f, 0.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetX(100.0f); @@ -1401,7 +1405,7 @@ int UtcDaliActorSetX(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1413,7 +1417,7 @@ int UtcDaliActorSetY(void) Vector3 vector(0.0f, 100.0f, 0.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetY(100.0f); @@ -1421,7 +1425,7 @@ int UtcDaliActorSetY(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1433,7 +1437,7 @@ int UtcDaliActorSetZ(void) Vector3 vector(0.0f, 0.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetZ(100.0f); @@ -1441,7 +1445,7 @@ int UtcDaliActorSetZ(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1452,7 +1456,7 @@ int UtcDaliActorSetPositionProperties(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetProperty( Actor::Property::POSITION_X, vector.x ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION ); @@ -1462,7 +1466,7 @@ int UtcDaliActorSetPositionProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.x, actor.GetCurrentPosition().x, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::POSITION_X ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION ); @@ -1476,7 +1480,7 @@ int UtcDaliActorSetPositionProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.y, actor.GetCurrentPosition().y, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetProperty< float >( Actor::Property::POSITION_Y ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION ); @@ -1490,7 +1494,7 @@ int UtcDaliActorSetPositionProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.z, actor.GetCurrentPosition().z, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetProperty< float >( Actor::Property::POSITION_Z ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION ); @@ -1506,7 +1510,7 @@ int UtcDaliActorTranslateBy(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.SetPosition(vector); @@ -1514,7 +1518,7 @@ int UtcDaliActorTranslateBy(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); actor.TranslateBy(vector); @@ -1522,7 +1526,7 @@ int UtcDaliActorTranslateBy(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector*2.0f == actor.GetCurrentPosition()); + DALI_TEST_CHECK(vector*2.0f == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); END_TEST; } @@ -1538,7 +1542,7 @@ int UtcDaliActorGetCurrentPosition(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentPosition() == setVector); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) == setVector); END_TEST; } @@ -1549,30 +1553,30 @@ int UtcDaliActorGetCurrentWorldPosition(void) Actor parent = Actor::New(); Vector3 parentPosition( 1.0f, 2.0f, 3.0f ); parent.SetPosition( parentPosition ); - parent.SetParentOrigin( ParentOrigin::CENTER ); - parent.SetAnchorPoint( AnchorPoint::CENTER ); + parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin( ParentOrigin::CENTER ); - child.SetAnchorPoint( AnchorPoint::CENTER ); + child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Vector3 childPosition( 6.0f, 6.0f, 6.0f ); child.SetPosition( childPosition ); parent.Add( child ); // The actors should not have a world position yet - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), childPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childPosition, TEST_LOCATION ); // The actors should have a world position now - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childPosition, TEST_LOCATION ); END_TEST; } @@ -1584,53 +1588,53 @@ int UtcDaliActorSetInheritPosition(void) Actor parent = Actor::New(); Vector3 parentPosition( 1.0f, 2.0f, 3.0f ); parent.SetPosition( parentPosition ); - parent.SetParentOrigin( ParentOrigin::CENTER ); - parent.SetAnchorPoint( AnchorPoint::CENTER ); + parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin( ParentOrigin::CENTER ); - child.SetAnchorPoint( AnchorPoint::CENTER ); + child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Vector3 childPosition( 10.0f, 11.0f, 12.0f ); child.SetPosition( childPosition ); parent.Add( child ); // The actors should not have a world position yet - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION ); // first test default, which is to inherit position - DALI_TEST_EQUALS( child.IsPositionInherited(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), true, TEST_LOCATION ); application.SendNotification(); application.Render(0); // should only really call Update as Render is not required to update scene - DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), childPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childPosition, TEST_LOCATION ); //Change child position Vector3 childOffset( -1.0f, 1.0f, 0.0f ); child.SetPosition( childOffset ); // Use local position as world postion - child.SetInheritPosition( false ); - DALI_TEST_EQUALS( child.IsPositionInherited(), false, TEST_LOCATION ); + child.SetProperty( Actor::Property::INHERIT_POSITION, false ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), false, TEST_LOCATION ); application.SendNotification(); application.Render(0); // should only really call Update as Render is not required to update scene - DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), childOffset, TEST_LOCATION ); - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), childOffset, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childOffset, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), childOffset, TEST_LOCATION ); //Change back to inherit position from parent - child.SetInheritPosition( true ); - DALI_TEST_EQUALS( child.IsPositionInherited(), true, TEST_LOCATION ); + child.SetProperty( Actor::Property::INHERIT_POSITION, true ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), true, TEST_LOCATION ); application.SendNotification(); application.Render(0); // should only really call Update as Render is not required to update scene - DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), childOffset, TEST_LOCATION ); - DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childOffset, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childOffset, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childOffset, TEST_LOCATION ); END_TEST; } @@ -1651,7 +1655,7 @@ int UtcDaliActorInheritOpacity(void) application.SendNotification(); application.Render(); - parent.SetOpacity( 0.1f ); + parent.SetProperty( DevelActor::Property::OPACITY, 0.1f ); DALI_TEST_EQUALS( parent.GetProperty( Actor::Property::COLOR_ALPHA ).Get(), 0.1f, 0.0001f, TEST_LOCATION ); DALI_TEST_EQUALS( child.GetProperty( Actor::Property::COLOR_ALPHA ).Get(), 1.0f, 0.0001f, TEST_LOCATION ); @@ -1683,7 +1687,7 @@ int UtcDaliActorSetOrientation01(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); END_TEST; } @@ -1701,24 +1705,24 @@ int UtcDaliActorSetOrientation02(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); Stage::GetCurrent().Add( actor ); actor.RotateBy( Degree( 360 ), axis); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); actor.SetOrientation( Degree( 0 ), Vector3( 1.0f, 0.0f, 0.0f ) ); Quaternion result( Radian( 0 ), Vector3( 1.0f, 0.0f, 0.0f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( result, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS( result, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); actor.SetOrientation( angle, axis); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -1739,7 +1743,7 @@ int UtcDaliActorSetOrientationProperty(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); DALI_TEST_EQUALS(rotation, actor.GetProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); END_TEST; @@ -1757,7 +1761,7 @@ int UtcDaliActorRotateBy01(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(Quaternion( angle, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(Quaternion( angle, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); Stage::GetCurrent().Add( actor ); @@ -1765,7 +1769,7 @@ int UtcDaliActorRotateBy01(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); Stage::GetCurrent().Remove( actor ); END_TEST; @@ -1784,13 +1788,13 @@ int UtcDaliActorRotateBy02(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); actor.RotateBy(rotation); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); END_TEST; } @@ -1804,7 +1808,7 @@ int UtcDaliActorGetCurrentOrientation(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION); END_TEST; } @@ -1824,28 +1828,28 @@ int UtcDaliActorGetCurrentWorldOrientation(void) parent.Add( child ); // The actors should not have a world rotation yet - DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( parent.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, 0.001, TEST_LOCATION ); // The actors should have a world rotation now - DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION ); // turn off child rotation inheritance - child.SetInheritOrientation( false ); - DALI_TEST_EQUALS( child.IsOrientationInherited(), false, TEST_LOCATION ); + child.SetProperty( Actor::Property::INHERIT_ORIENTATION, false ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_ORIENTATION ), false, TEST_LOCATION ); application.SendNotification(); application.Render(0); // The actors should have a world rotation now - DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), rotation, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), rotation, 0.001, TEST_LOCATION ); END_TEST; } @@ -1856,11 +1860,11 @@ int UtcDaliActorSetScale01(void) Actor actor = Actor::New(); - // Set to random value first - GetCurrentScale() asserts if called before SetScale() + // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale() actor.SetScale(0.25f); Vector3 scale(10.0f, 10.0f, 10.0f); - DALI_TEST_CHECK(actor.GetCurrentScale() != scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale); actor.SetScale(scale.x); @@ -1868,7 +1872,7 @@ int UtcDaliActorSetScale01(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentScale() == scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale); END_TEST; } @@ -1880,16 +1884,16 @@ int UtcDaliActorSetScale02(void) Actor actor = Actor::New(); - // Set to random value first - GetCurrentScale() asserts if called before SetScale() + // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale() actor.SetScale(Vector3(12.0f, 1.0f, 2.0f)); - DALI_TEST_CHECK(actor.GetCurrentScale() != scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale); actor.SetScale(scale.x, scale.y, scale.z); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentScale() == scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale); // add to stage and test Stage::GetCurrent().Add( actor ); @@ -1897,7 +1901,7 @@ int UtcDaliActorSetScale02(void) // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector3( 2.0f, 2.0f, 2.0f ), actor.GetCurrentScale(), 0.001, TEST_LOCATION); + DALI_TEST_EQUALS( Vector3( 2.0f, 2.0f, 2.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), 0.001, TEST_LOCATION); Stage::GetCurrent().Remove( actor ); @@ -1912,10 +1916,10 @@ int UtcDaliActorSetScale03(void) Actor actor = Actor::New(); - // Set to random value first - GetCurrentScale() asserts if called before SetScale() + // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale() actor.SetScale(Vector3(12.0f, 1.0f, 2.0f)); - DALI_TEST_CHECK(actor.GetCurrentScale() != scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale); actor.SetScale(scale); @@ -1923,7 +1927,7 @@ int UtcDaliActorSetScale03(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentScale() == scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale); END_TEST; } @@ -1934,7 +1938,7 @@ int UtcDaliActorSetScaleIndividual(void) Actor actor = Actor::New(); Vector3 vector(0.7f, 0.8f, 0.9f); - DALI_TEST_CHECK(vector != actor.GetCurrentScale()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); actor.SetProperty( Actor::Property::SCALE_X, vector.x ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION ); @@ -1943,7 +1947,7 @@ int UtcDaliActorSetScaleIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.x, actor.GetCurrentScale().x, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION ); @@ -1954,7 +1958,7 @@ int UtcDaliActorSetScaleIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.y, actor.GetCurrentScale().y, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION ); @@ -1965,7 +1969,7 @@ int UtcDaliActorSetScaleIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.z, actor.GetCurrentScale().z, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION ); @@ -1981,7 +1985,7 @@ int UtcDaliActorScaleBy(void) Actor actor = Actor::New(); Vector3 vector(100.0f, 100.0f, 100.0f); - DALI_TEST_CHECK(vector != actor.GetCurrentScale()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); actor.SetScale(vector); @@ -1989,7 +1993,7 @@ int UtcDaliActorScaleBy(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector == actor.GetCurrentScale()); + DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); actor.ScaleBy(vector); @@ -1997,7 +2001,7 @@ int UtcDaliActorScaleBy(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(vector*100.0f == actor.GetCurrentScale()); + DALI_TEST_CHECK(vector*100.0f == actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); END_TEST; } @@ -2014,7 +2018,7 @@ int UtcDaliActorGetCurrentScale(void) application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentScale() == scale); + DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale); END_TEST; } @@ -2033,22 +2037,22 @@ int UtcDaliActorGetCurrentWorldScale(void) parent.Add( child ); // The actors should not have a scale yet - DALI_TEST_EQUALS( parent.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // The actors should not have a world scale yet - DALI_TEST_EQUALS( parent.GetCurrentWorldScale(), Vector3::ONE, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), Vector3::ONE, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( parent.GetCurrentScale(), parentScale, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentScale(), childScale, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), parentScale, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), childScale, TEST_LOCATION ); // The actors should have a world scale now - DALI_TEST_EQUALS( parent.GetCurrentWorldScale(), parentScale, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldScale(), parentScale * childScale, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale * childScale, TEST_LOCATION ); END_TEST; } @@ -2070,16 +2074,16 @@ int UtcDaliActorInheritScale(void) application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( child.IsScaleInherited(), true, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldScale(), parentScale * childScale, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), true, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale * childScale, TEST_LOCATION ); - child.SetInheritScale( false ); - DALI_TEST_EQUALS( child.IsScaleInherited(), false, TEST_LOCATION ); + child.SetProperty( Actor::Property::INHERIT_SCALE, false ); + DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), false, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( child.GetCurrentWorldScale(), childScale, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), childScale, TEST_LOCATION ); END_TEST; } @@ -2088,25 +2092,25 @@ int UtcDaliActorSetVisible(void) TestApplication application; Actor actor = Actor::New(); - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.IsVisible() == false); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false); - actor.SetVisible(true); + actor.SetProperty( Actor::Property::VISIBLE,true); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.IsVisible() == true); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); // put actor on stage Stage::GetCurrent().Add( actor ); - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.IsVisible() == false); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false); END_TEST; } @@ -2116,7 +2120,7 @@ int UtcDaliActorIsVisible(void) Actor actor = Actor::New(); - DALI_TEST_CHECK(actor.IsVisible() == true); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); END_TEST; } @@ -2126,38 +2130,38 @@ int UtcDaliActorSetOpacity(void) Actor actor = Actor::New(); // initial opacity is 1 - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); - actor.SetOpacity( 0.4f); + actor.SetProperty( DevelActor::Property::OPACITY, 0.4f); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.4f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.4f, TEST_LOCATION ); // change opacity, actor is on stage to change is not immediate - actor.SetOpacity( actor.GetCurrentOpacity() + 0.1f ); + actor.SetProperty( DevelActor::Property::OPACITY, actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) + 0.1f ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, TEST_LOCATION ); // put actor on stage Stage::GetCurrent().Add( actor ); // change opacity, actor is on stage to change is not immediate - actor.SetOpacity( 0.9f ); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.5f, TEST_LOCATION ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.9f ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, TEST_LOCATION ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.9f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.9f, TEST_LOCATION ); // change opacity, actor is on stage to change is not immediate - actor.SetOpacity( actor.GetCurrentOpacity() - 0.9f ); + actor.SetProperty( DevelActor::Property::OPACITY, actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) - 0.9f ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -2166,13 +2170,13 @@ int UtcDaliActorGetCurrentOpacity(void) TestApplication application; Actor actor = Actor::New(); - DALI_TEST_CHECK(actor.GetCurrentOpacity() != 0.5f); + DALI_TEST_CHECK(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 0.5f); - actor.SetOpacity(0.5f); + actor.SetProperty( DevelActor::Property::OPACITY,0.5f); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(actor.GetCurrentOpacity() == 0.5f); + DALI_TEST_CHECK(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) == 0.5f); END_TEST; } @@ -2181,11 +2185,11 @@ int UtcDaliActorSetSensitive(void) TestApplication application; Actor actor = Actor::New(); - bool sensitive = !actor.IsSensitive(); + bool sensitive = !actor.GetProperty< bool >( Actor::Property::SENSITIVE ); - actor.SetSensitive(sensitive); + actor.SetProperty( Actor::Property::SENSITIVE,sensitive); - DALI_TEST_CHECK(sensitive == actor.IsSensitive()); + DALI_TEST_CHECK(sensitive == actor.GetProperty< bool >( Actor::Property::SENSITIVE )); END_TEST; } @@ -2193,9 +2197,9 @@ int UtcDaliActorIsSensitive(void) { TestApplication application; Actor actor = Actor::New(); - actor.SetSensitive(false); + actor.SetProperty( Actor::Property::SENSITIVE,false); - DALI_TEST_CHECK(false == actor.IsSensitive()); + DALI_TEST_CHECK(false == actor.GetProperty< bool >( Actor::Property::SENSITIVE )); END_TEST; } @@ -2205,35 +2209,35 @@ int UtcDaliActorSetColor(void) Actor actor = Actor::New(); Vector4 color(1.0f, 1.0f, 1.0f, 0.5f); - DALI_TEST_CHECK(color != actor.GetCurrentColor()); + DALI_TEST_CHECK(color != actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); - actor.SetColor(color); + actor.SetProperty( Actor::Property::COLOR,color); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(color == actor.GetCurrentColor()); + DALI_TEST_CHECK(color == actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); - actor.SetColor( actor.GetCurrentColor() + Vector4( -0.4f, -0.5f, -0.6f, -0.4f ) ); + actor.SetProperty( Actor::Property::COLOR, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ) + Vector4( -0.4f, -0.5f, -0.6f, -0.4f ) ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( Vector4( 0.6f, 0.5f, 0.4f, 0.1f ), actor.GetCurrentColor(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector4( 0.6f, 0.5f, 0.4f, 0.1f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION ); Stage::GetCurrent().Add( actor ); - actor.SetColor( color ); + actor.SetProperty( Actor::Property::COLOR, color ); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( color, actor.GetCurrentColor(), TEST_LOCATION ); + DALI_TEST_EQUALS( color, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION ); - actor.SetColor( actor.GetCurrentColor() + Vector4( 1.1f, 1.1f, 1.1f, 1.1f ) ); + actor.SetProperty( Actor::Property::COLOR, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ) + Vector4( 1.1f, 1.1f, 1.1f, 1.1f ) ); // flush the queue and render once application.SendNotification(); application.Render(); // Actor color is not clamped - DALI_TEST_EQUALS( Vector4( 2.1f, 2.1f, 2.1f, 1.6f ), actor.GetCurrentColor(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector4( 2.1f, 2.1f, 2.1f, 1.6f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION ); // world color is clamped - DALI_TEST_EQUALS( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ), actor.GetCurrentWorldColor(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), TEST_LOCATION ); actor.SetProperty( Actor::Property::COLOR, color ); DALI_TEST_EQUALS( color, actor.GetProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION ); @@ -2253,7 +2257,7 @@ int UtcDaliActorSetColorIndividual(void) Actor actor = Actor::New(); Vector4 vector(0.7f, 0.8f, 0.9f, 0.6f); - DALI_TEST_CHECK(vector != actor.GetCurrentColor()); + DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); actor.SetProperty( Actor::Property::COLOR_RED, vector.r ); DALI_TEST_EQUALS( vector.r, actor.GetProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION ); @@ -2262,7 +2266,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.r, actor.GetCurrentColor().r, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.r, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, TEST_LOCATION ); DALI_TEST_EQUALS( vector.r, actor.GetProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.r, actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION ); @@ -2273,7 +2277,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.g, actor.GetCurrentColor().g, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.g, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, TEST_LOCATION ); DALI_TEST_EQUALS( vector.g, actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.g, actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION ); @@ -2284,7 +2288,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.b, actor.GetCurrentColor().b, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.b, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, TEST_LOCATION ); DALI_TEST_EQUALS( vector.b, actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.b, actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION ); @@ -2296,7 +2300,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( vector.a, actor.GetCurrentColor().a, TEST_LOCATION ); + DALI_TEST_EQUALS( vector.a, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, TEST_LOCATION ); DALI_TEST_EQUALS( vector.a, actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), TEST_LOCATION ); DALI_TEST_EQUALS( vector.a, actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), TEST_LOCATION ); @@ -2310,7 +2314,7 @@ int UtcDaliActorSetColorIndividual(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( 0.2f, actor.GetCurrentColor().a, TEST_LOCATION ); + DALI_TEST_EQUALS( 0.2f, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, TEST_LOCATION ); END_TEST; } @@ -2322,11 +2326,11 @@ int UtcDaliActorGetCurrentColor(void) Actor actor = Actor::New(); Vector4 color(1.0f, 1.0f, 1.0f, 0.5f); - actor.SetColor(color); + actor.SetProperty( Actor::Property::COLOR,color); // flush the queue and render once application.SendNotification(); application.Render(); - DALI_TEST_CHECK(color == actor.GetCurrentColor()); + DALI_TEST_CHECK(color == actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); END_TEST; } @@ -2337,46 +2341,46 @@ int UtcDaliActorGetCurrentWorldColor(void) Actor parent = Actor::New(); Vector4 parentColor( 1.0f, 0.5f, 0.0f, 0.8f ); - parent.SetColor( parentColor ); + parent.SetProperty( Actor::Property::COLOR, parentColor ); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); Vector4 childColor( 0.5f, 0.6f, 0.5f, 1.0f ); - child.SetColor( childColor ); + child.SetProperty( Actor::Property::COLOR, childColor ); parent.Add( child ); - DALI_TEST_EQUALS( parent.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // verify the default color mode DALI_TEST_EQUALS( USE_OWN_MULTIPLY_PARENT_ALPHA, child.GetColorMode(), TEST_LOCATION ); // The actors should not have a world color yet - DALI_TEST_EQUALS( parent.GetCurrentWorldColor(), Color::WHITE, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Color::WHITE, TEST_LOCATION ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( parent.GetCurrentColor(), parentColor, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), parentColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION ); // The actors should have a world color now - DALI_TEST_EQUALS( parent.GetCurrentWorldColor(), parentColor, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), Vector4( childColor.r, childColor.g, childColor.b, childColor.a * parentColor.a), TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), parentColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Vector4( childColor.r, childColor.g, childColor.b, childColor.a * parentColor.a), TEST_LOCATION ); // use own color child.SetColorMode( USE_OWN_COLOR ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), childColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), childColor, TEST_LOCATION ); // use parent color child.SetColorMode( USE_PARENT_COLOR ); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), parentColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), parentColor, TEST_LOCATION ); // use parent alpha child.SetColorMode( USE_OWN_MULTIPLY_PARENT_ALPHA ); @@ -2384,8 +2388,8 @@ int UtcDaliActorGetCurrentWorldColor(void) application.Render(0); Vector4 expectedColor( childColor ); expectedColor.a *= parentColor.a; - DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldColor(), expectedColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), expectedColor, TEST_LOCATION ); END_TEST; } @@ -2415,7 +2419,7 @@ int UtcDaliActorScreenToLocal(void) { TestApplication application; Actor actor = Actor::New(); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.SetSize(100.0f, 100.0f); actor.SetPosition(10.0f, 10.0f); Stage::GetCurrent().Add(actor); @@ -2443,11 +2447,11 @@ int UtcDaliActorSetLeaveRequired(void) Actor actor = Actor::New(); - actor.SetLeaveRequired(false); - DALI_TEST_CHECK(actor.GetLeaveRequired() == false); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED,false); + DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == false); - actor.SetLeaveRequired(true); - DALI_TEST_CHECK(actor.GetLeaveRequired() == true); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED,true); + DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == true); END_TEST; } @@ -2457,7 +2461,7 @@ int UtcDaliActorGetLeaveRequired(void) Actor actor = Actor::New(); - DALI_TEST_CHECK(actor.GetLeaveRequired() == false); + DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == false); END_TEST; } @@ -2547,7 +2551,7 @@ int UtcDaliActorRemoveConstraintTag(void) result2 = 0; actor.RemoveConstraints(constraint1Tag); // make color property dirty, which will trigger constraints to be reapplied. - actor.SetColor( Color::WHITE ); + actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); // flush the queue and render once application.SendNotification(); application.Render(); @@ -2560,7 +2564,7 @@ int UtcDaliActorRemoveConstraintTag(void) result2 = 0; constraint1.Apply(); // make color property dirty, which will trigger constraints to be reapplied. - actor.SetColor( Color::WHITE ); + actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); // flush the queue and render once application.SendNotification(); application.Render(); @@ -2573,7 +2577,7 @@ int UtcDaliActorRemoveConstraintTag(void) result2 = 0; actor.RemoveConstraints(constraint2Tag); // make color property dirty, which will trigger constraints to be reapplied. - actor.SetColor( Color::WHITE ); + actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); // flush the queue and render once application.SendNotification(); application.Render(); @@ -2586,7 +2590,7 @@ int UtcDaliActorRemoveConstraintTag(void) result2 = 0; actor.RemoveConstraints(constraint1Tag); // make color property dirty, which will trigger constraints to be reapplied. - actor.SetColor( Color::WHITE ); + actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); // flush the queue and render once application.SendNotification(); application.Render(); @@ -2667,7 +2671,7 @@ int UtcDaliActorOnOffStageSignal(void) gActorNamesOnOffStage.clear(); Actor parent = Actor::New(); - parent.SetName( "parent" ); + parent.SetProperty( Actor::Property::NAME, "parent" ); parent.OnStageSignal().Connect( OnStageCallback ); parent.OffStageSignal().Connect( OffStageCallback ); // sanity check @@ -2687,7 +2691,7 @@ int UtcDaliActorOnOffStageSignal(void) gActorNamesOnOffStage.clear(); Actor child = Actor::New(); - child.SetName( "child" ); + child.SetProperty( Actor::Property::NAME, "child" ); child.OnStageSignal().Connect( OnStageCallback ); child.OffStageSignal().Connect( OffStageCallback ); parent.Add( child ); // add child @@ -2750,11 +2754,11 @@ int UtcDaliActorFindChildByName(void) TestApplication application; Actor parent = Actor::New(); - parent.SetName( "parent" ); + parent.SetProperty( Actor::Property::NAME, "parent" ); Actor first = Actor::New(); - first .SetName( "first" ); + first .SetProperty( Actor::Property::NAME, "first" ); Actor second = Actor::New(); - second.SetName( "second" ); + second.SetProperty( Actor::Property::NAME, "second" ); parent.Add(first); first.Add(second); @@ -2831,8 +2835,8 @@ int UtcDaliActorHitTest(void) // get the root layer Actor actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::CENTER ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( actor ); @@ -2984,8 +2988,8 @@ int UtcDaliActorGetCurrentWorldMatrix(void) tet_infoline(" UtcDaliActorGetCurrentWorldMatrix"); Actor parent = Actor::New(); - parent.SetParentOrigin(ParentOrigin::CENTER); - parent.SetAnchorPoint(AnchorPoint::CENTER); + parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); Vector3 parentPosition( 10.0f, 20.0f, 30.0f); Radian rotationAngle(Degree(85.0f)); Quaternion parentRotation(rotationAngle, Vector3::ZAXIS); @@ -2996,7 +3000,7 @@ int UtcDaliActorGetCurrentWorldMatrix(void) Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Vector3 childPosition( 0.0f, 0.0f, 100.0f ); Radian childRotationAngle(Degree(23.0f)); Quaternion childRotation( childRotationAngle, Vector3::YAXIS ); @@ -3021,8 +3025,8 @@ int UtcDaliActorGetCurrentWorldMatrix(void) Matrix childWorldMatrix(false); Matrix::Multiply( childWorldMatrix, childMatrix, parentMatrix); - DALI_TEST_EQUALS( parent.GetCurrentWorldMatrix(), parentMatrix, 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentWorldMatrix(), childWorldMatrix, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), parentMatrix, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), childWorldMatrix, 0.001, TEST_LOCATION ); END_TEST; } @@ -3034,8 +3038,8 @@ int UtcDaliActorConstrainedToWorldMatrix(void) tet_infoline(" UtcDaliActorConstrainedToWorldMatrix"); Actor parent = Actor::New(); - parent.SetParentOrigin(ParentOrigin::CENTER); - parent.SetAnchorPoint(AnchorPoint::CENTER); + parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); Vector3 parentPosition( 10.0f, 20.0f, 30.0f); Radian rotationAngle(Degree(85.0f)); Quaternion parentRotation(rotationAngle, Vector3::ZAXIS); @@ -3046,7 +3050,7 @@ int UtcDaliActorConstrainedToWorldMatrix(void) Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Constraint posConstraint = Constraint::New( child, Actor::Property::POSITION, PositionComponentConstraint() ); posConstraint.AddSource( Source( parent, Actor::Property::WORLD_MATRIX ) ); posConstraint.Apply(); @@ -3061,8 +3065,8 @@ int UtcDaliActorConstrainedToWorldMatrix(void) Matrix parentMatrix(false); parentMatrix.SetTransformComponents(parentScale, parentRotation, parentPosition); - DALI_TEST_EQUALS( parent.GetCurrentWorldMatrix(), parentMatrix, 0.001, TEST_LOCATION ); - DALI_TEST_EQUALS( child.GetCurrentPosition(), parent.GetCurrentPosition(), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( parent.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), parentMatrix, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001, TEST_LOCATION ); END_TEST; } @@ -3072,8 +3076,8 @@ int UtcDaliActorConstrainedToOrientation(void) tet_infoline(" UtcDaliActorConstrainedToOrientation"); Actor parent = Actor::New(); - parent.SetParentOrigin(ParentOrigin::CENTER); - parent.SetAnchorPoint(AnchorPoint::CENTER); + parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); Vector3 parentPosition( 10.0f, 20.0f, 30.0f); Radian rotationAngle(Degree(85.0f)); Quaternion parentRotation(rotationAngle, Vector3::ZAXIS); @@ -3084,7 +3088,7 @@ int UtcDaliActorConstrainedToOrientation(void) Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); Constraint posConstraint = Constraint::New( child, Actor::Property::ORIENTATION, OrientationComponentConstraint() ); posConstraint.AddSource( Source( parent, Actor::Property::ORIENTATION ) ); posConstraint.Apply(); @@ -3096,7 +3100,7 @@ int UtcDaliActorConstrainedToOrientation(void) app.Render(); app.SendNotification(); - DALI_TEST_EQUALS( child.GetCurrentOrientation(), parent.GetCurrentOrientation(), 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), parent.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION ); END_TEST; } @@ -3106,7 +3110,7 @@ int UtcDaliActorConstrainedToOpacity(void) tet_infoline(" UtcDaliActorConstrainedToOpacity"); Actor parent = Actor::New(); - parent.SetOpacity( 0.7f ); + parent.SetProperty( DevelActor::Property::OPACITY, 0.7f ); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); @@ -3121,16 +3125,16 @@ int UtcDaliActorConstrainedToOpacity(void) app.Render(); app.SendNotification(); - DALI_TEST_EQUALS( child.GetCurrentOpacity(), parent.GetCurrentOpacity(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), parent.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.001f, TEST_LOCATION ); - parent.SetOpacity( 0.3f ); + parent.SetProperty( DevelActor::Property::OPACITY, 0.3f ); app.SendNotification(); app.Render(0); app.Render(); app.SendNotification(); - DALI_TEST_EQUALS( child.GetCurrentOpacity(), parent.GetCurrentOpacity(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( child.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), parent.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.001f, TEST_LOCATION ); END_TEST; } @@ -3545,15 +3549,15 @@ int UtcDaliActorSetMinimumSize(void) Actor actor = Actor::New(); - Vector2 size = actor.GetMinimumSize(); + Vector2 size = actor.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE ); DALI_TEST_EQUALS( size.width, 0.0f, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, 0.0f, TEST_LOCATION ); Vector2 size2( 1.0f, 2.0f ); - actor.SetMinimumSize( size2 ); + actor.SetProperty( Actor::Property::MINIMUM_SIZE, size2 ); - size = actor.GetMinimumSize(); + size = actor.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE ); DALI_TEST_EQUALS( size.width, size2.width, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, size2.height, TEST_LOCATION ); @@ -3567,15 +3571,15 @@ int UtcDaliActorSetMaximumSize(void) Actor actor = Actor::New(); - Vector2 size = actor.GetMaximumSize(); + Vector2 size = actor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ); DALI_TEST_EQUALS( size.width, FLT_MAX, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, FLT_MAX, TEST_LOCATION ); Vector2 size2( 1.0f, 2.0f ); - actor.SetMaximumSize( size2 ); + actor.SetProperty( Actor::Property::MAXIMUM_SIZE, size2 ); - size = actor.GetMaximumSize(); + size = actor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ); DALI_TEST_EQUALS( size.width, size2.width, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, size2.height, TEST_LOCATION ); @@ -3594,7 +3598,7 @@ int UtcDaliActorOnRelayoutSignal(void) gActorNamesRelayout.clear(); Actor actor = Actor::New(); - actor.SetName( "actor" ); + actor.SetProperty( Actor::Property::NAME, "actor" ); actor.OnRelayoutSignal().Connect( OnRelayoutCallback ); // Sanity check @@ -3698,35 +3702,35 @@ int UtcDaliActorAnchorPointPropertyAsString(void) Actor actor = Actor::New(); actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_RIGHT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER_RIGHT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); // Invalid should not change anything actor.SetProperty( Actor::Property::ANCHOR_POINT, "INVALID_ARG" ); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); END_TEST; } @@ -3738,35 +3742,35 @@ int UtcDaliActorParentOriginPropertyAsString(void) Actor actor = Actor::New(); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_RIGHT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER_RIGHT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_LEFT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_CENTER" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION ); actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_RIGHT" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); // Invalid should not change anything actor.SetProperty( Actor::Property::PARENT_ORIGIN, "INVALID_ARG" ); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION ); END_TEST; } @@ -4036,8 +4040,8 @@ Actor CreateActorWithContent( uint32_t width, uint32_t height) // Setup dimensions and position so actor is not skipped by culling. actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); actor.SetSize( width, height ); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); return actor; } @@ -4347,12 +4351,12 @@ int UtcDaliActorPropertyClippingActorDrawOrder(void) if( i == 0 ) { - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); } else { float b = i > 2 ? 1.0f : -1.0f; - actor.SetParentOrigin( Vector3( 0.5 + ( 0.2f * b ), 0.8f, 0.8f ) ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5 + ( 0.2f * b ), 0.8f, 0.8f ) ); } actors[i] = actor; @@ -4426,8 +4430,8 @@ int UtcDaliActorPropertyScissorClippingActor(void) Actor clippingActorA = CreateActorWithContent16x16(); // Note: Scissor coords are have flipped Y values compared with DALi's coordinate system. // We choose BOTTOM_LEFT to give us x=0, y=0 starting coordinates for the first test. - clippingActorA.SetParentOrigin( ParentOrigin::BOTTOM_LEFT ); - clippingActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); Stage::GetCurrent().Add( clippingActorA ); @@ -4445,8 +4449,8 @@ int UtcDaliActorPropertyScissorClippingActor(void) compareParametersString << "0, 0, " << imageSize.x << ", " << imageSize.y; DALI_TEST_CHECK( scissorTrace.FindMethodAndParams( "Scissor", compareParametersString.str() ) ); // Compare with 0, 0, 16, 16 - clippingActorA.SetParentOrigin( ParentOrigin::TOP_RIGHT ); - clippingActorA.SetAnchorPoint( AnchorPoint::TOP_RIGHT ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); // Gather the call trace. GenerateTrace( application, enabledDisableTrace, scissorTrace ); @@ -4479,12 +4483,12 @@ int UtcDaliActorPropertyScissorClippingActorSiblings(void) Actor clippingActorA = CreateActorWithContent( sizeA.width, sizeA.height ); Actor clippingActorB = CreateActorWithContent( sizeB.width, sizeB.height ); - clippingActorA.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorA.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorB.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorB.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); clippingActorA.SetPosition( 0.0f, -200.0f, 0.0f ); @@ -4548,15 +4552,15 @@ int UtcDaliActorPropertyScissorClippingActorNested01(void) Actor clippingActorA = CreateActorWithContent16x16(); // Note: Scissor coords are have flipped Y values compared with DALi's coordinate system. // We choose BOTTOM_LEFT to give us x=0, y=0 starting coordinates for the first test. - clippingActorA.SetParentOrigin( ParentOrigin::CENTER ); - clippingActorA.SetAnchorPoint( AnchorPoint::CENTER ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); Stage::GetCurrent().Add( clippingActorA ); // Create a child clipping actor. Actor clippingActorB = CreateActorWithContent16x16(); - clippingActorB.SetParentOrigin( ParentOrigin::CENTER ); - clippingActorB.SetAnchorPoint( AnchorPoint::CENTER ); + clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); clippingActorA.Add( clippingActorB ); @@ -4625,24 +4629,24 @@ int UtcDaliActorPropertyScissorClippingActorNested02(void) Actor clippingActorD = CreateActorWithContent( sizeD.width, sizeD.height ); Actor clippingActorE = CreateActorWithContent( sizeE.width, sizeE.height ); - clippingActorA.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorA.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorB.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorB.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorC.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorC.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorC.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorD.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorD.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorD.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorD.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorD.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX ); - clippingActorE.SetParentOrigin( ParentOrigin::CENTER_LEFT ); - clippingActorE.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + clippingActorE.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); + clippingActorE.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); clippingActorA.SetPosition( 0.0f, -200.0f, 0.0f ); clippingActorB.SetPosition( 0.0f, 0.0f, 0.0f ); @@ -4746,20 +4750,22 @@ int UtcDaliActorRaiseLower(void) TestApplication application; + Debug::Filter::SetGlobalLogLevel( Debug::Verbose ); + Stage stage( Stage::GetCurrent() ); Actor actorA = Actor::New(); Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -4866,6 +4872,8 @@ int UtcDaliActorRaiseLower(void) ResetTouchCallbacks(); + Debug::Filter::SetGlobalLogLevel( Debug::NoLogging ); + END_TEST; } @@ -4904,14 +4912,14 @@ int UtcDaliActorRaiseToTopLowerToBottom(void) Renderer rendererC = Renderer::New(geometry, shaderC); actorC.AddRenderer(rendererC); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5116,14 +5124,14 @@ int UtcDaliActorRaiseAbove(void) Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5248,14 +5256,14 @@ int UtcDaliActorLowerBelow(void) Renderer rendererC = Renderer::New(geometry, shaderC); actorC.AddRenderer(rendererC); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5267,7 +5275,7 @@ int UtcDaliActorLowerBelow(void) actorC.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); Actor container = Actor::New(); - container.SetParentOrigin( ParentOrigin::CENTER ); + container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); container.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); stage.Add( container ); @@ -5454,11 +5462,11 @@ int UtcDaliActorRaiseAboveDifferentParentsN(void) parentB.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); parentB.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); - parentA.SetAnchorPoint( AnchorPoint::CENTER ); - parentA.SetParentOrigin( ParentOrigin::CENTER ); + parentA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + parentA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - parentB.SetAnchorPoint( AnchorPoint::CENTER ); - parentB.SetParentOrigin( ParentOrigin::CENTER ); + parentB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + parentB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); stage.Add( parentA ); stage.Add( parentB ); @@ -5473,14 +5481,14 @@ int UtcDaliActorRaiseAboveDifferentParentsN(void) tet_printf( "Actor C added to different parent from A and B \n" ); parentB.Add( actorC ); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5559,14 +5567,14 @@ int UtcDaliActorRaiseLowerWhenUnparentedTargetN(void) Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5727,14 +5735,14 @@ int UtcDaliActorTestAllAPIwhenActorNotParented(void) Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5888,14 +5896,14 @@ int UtcDaliActorRaiseAboveActorAndTargetTheSameN(void) Actor actorB = Actor::New(); Actor actorC = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorB.SetAnchorPoint( AnchorPoint::CENTER ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" ); actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" ); @@ -5991,7 +5999,7 @@ int UtcDaliActorGetScreenPosition(void) Stage stage( Stage::GetCurrent() ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); Vector2 size2( 10.0f, 20.0f ); actorA.SetSize( size2 ); @@ -6016,7 +6024,7 @@ int UtcDaliActorGetScreenPosition(void) tet_infoline( "UtcDaliActorGetScreenPosition Top Left Anchor Point and 0,0 position \n" ); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); @@ -6032,7 +6040,7 @@ int UtcDaliActorGetScreenPosition(void) tet_infoline( "UtcDaliActorGetScreenPosition Bottom right Anchor Point and 0,0 position \n" ); - actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); @@ -6080,11 +6088,11 @@ int UtcDaliActorGetScreenPosition(void) tet_infoline( "UtcDaliActorGetScreenPosition Scale parent and check child's screen position \n" ); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actorA.SetPosition( 30.0, 30.0 ); Actor actorB = Actor::New(); - actorB.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actorB.SetSize( size2 ); actorB.SetPosition( 10.f, 10.f ); actorA.Add( actorB ); @@ -6111,7 +6119,7 @@ int UtcDaliActorGetScreenPositionAfterScaling(void) Stage stage( Stage::GetCurrent() ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Vector2 size2( 10.0f, 20.0f ); actorA.SetSize( size2 ); @@ -6136,7 +6144,7 @@ int UtcDaliActorGetScreenPositionAfterScaling(void) tet_infoline( "UtcDaliActorGetScreenPositionAfterScaling BOTTOM_RIGHT Anchor Point, scale 1.5f and 0,0 position \n" ); - actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); @@ -6162,8 +6170,8 @@ int UtcDaliActorGetScreenPositionWithDifferentParentOrigin(void) Stage stage( Stage::GetCurrent() ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size2( 10.0f, 20.0f ); actorA.SetSize( size2 ); actorA.SetPosition( 0.f, 0.f ); @@ -6186,8 +6194,8 @@ int UtcDaliActorGetScreenPositionWithDifferentParentOrigin(void) tet_infoline( " BOTTOM_RIGHT Anchor Point, ParentOrigin::TOP_RIGHT and 0,0 position \n" ); - actorA.SetParentOrigin( ParentOrigin::TOP_RIGHT ); - actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); @@ -6216,8 +6224,8 @@ int UtcDaliActorGetScreenPositionWithChildActors(void) tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size1( 10.0f, 20.0f ); actorA.SetSize( size1 ); actorA.SetPosition( 0.f, 0.f ); @@ -6225,8 +6233,8 @@ int UtcDaliActorGetScreenPositionWithChildActors(void) tet_infoline( "Create Parent Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" ); Actor parentActorA = Actor::New(); - parentActorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - parentActorA.SetParentOrigin( ParentOrigin::CENTER ); + parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size2( 30.0f, 60.0f ); parentActorA.SetSize( size2 ); parentActorA.SetPosition( 0.f, 0.f ); @@ -6252,8 +6260,8 @@ int UtcDaliActorGetScreenPositionWithChildActors(void) tet_infoline( "change parent anchor point and parent origin then check screen position \n" ); - parentActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); - parentActorA.SetParentOrigin( ParentOrigin::TOP_LEFT ); + parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); + parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); application.SendNotification(); application.Render(); @@ -6281,8 +6289,8 @@ int UtcDaliActorGetScreenPositionWithChildActors02(void) tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size1( 10.0f, 20.0f ); actorA.SetSize( size1 ); actorA.SetPosition( 0.f, 0.f ); @@ -6290,8 +6298,8 @@ int UtcDaliActorGetScreenPositionWithChildActors02(void) tet_infoline( "Create Parent Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" ); Actor parentActorA = Actor::New(); - parentActorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - parentActorA.SetParentOrigin( ParentOrigin::CENTER ); + parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Vector2 size2( 30.0f, 60.0f ); parentActorA.SetSize( size2 ); parentActorA.SetPosition( 0.f, 0.f ); @@ -6299,8 +6307,8 @@ int UtcDaliActorGetScreenPositionWithChildActors02(void) tet_infoline( "Create Grand Parent Actor 1 BOTTOM_LEFT Anchor Point, ParentOrigin::BOTTOM_LEFT and 0,0 position \n" ); Actor grandParentActorA = Actor::New(); - grandParentActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); - grandParentActorA.SetParentOrigin( ParentOrigin::BOTTOM_LEFT ); + grandParentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); + grandParentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); Vector2 size3( 60.0f, 120.0f ); grandParentActorA.SetSize( size3 ); grandParentActorA.SetPosition( 0.f, 0.f ); @@ -6340,8 +6348,8 @@ int UtcDaliActorGetScreenPositionPositionUsesAnchorPointFalse(void) tet_infoline( "Create an actor with AnchorPoint::TOP_LEFT, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" ); Actor actorA = Actor::New(); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actorA.SetParentOrigin( ParentOrigin::CENTER ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorA.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); actorA.SetSize( 10.0f, 20.0f ); stage.Add( actorA ); @@ -6349,8 +6357,8 @@ int UtcDaliActorGetScreenPositionPositionUsesAnchorPointFalse(void) tet_infoline( "Create an Actor with AnchorPoint::BOTTOM_RIGHT, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" ); Actor actorB = Actor::New(); - actorB.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); - actorB.SetParentOrigin( ParentOrigin::CENTER ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorB.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); Vector2 actorBSize( 30.0f, 60.0f ); actorB.SetSize( actorBSize ); @@ -6359,8 +6367,8 @@ int UtcDaliActorGetScreenPositionPositionUsesAnchorPointFalse(void) tet_infoline( "Create an actor with AnchorPoint::CENTER, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" ); Actor actorC = Actor::New(); - actorC.SetAnchorPoint( AnchorPoint::CENTER ); - actorC.SetParentOrigin( ParentOrigin::CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actorC.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); Vector2 actorCSize( 60.0f, 120.0f ); actorC.SetSize( actorCSize ); @@ -6399,8 +6407,8 @@ int utcDaliActorPositionUsesAnchorPoint(void) tet_infoline( "Check default behaviour\n" ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); Stage::GetCurrent().Add( actor ); @@ -6408,7 +6416,7 @@ int utcDaliActorPositionUsesAnchorPoint(void) application.Render(); tet_infoline( "Check that the world position is in the center\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Set the position uses anchor point property to false\n" ); actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); @@ -6417,7 +6425,7 @@ int utcDaliActorPositionUsesAnchorPoint(void) application.Render(); tet_infoline( "Check that the world position has changed appropriately\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); END_TEST; } @@ -6428,8 +6436,8 @@ int utcDaliActorPositionUsesAnchorPointCheckScale(void) tet_infoline( "Check that the scale is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); actor.SetScale( 2.0f ); actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); @@ -6439,19 +6447,19 @@ int utcDaliActorPositionUsesAnchorPointCheckScale(void) application.Render(); tet_infoline( "Check the world position is the same as it would be without a scale\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 100.0f, 100.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 100.0f, 100.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); END_TEST; } @@ -6462,8 +6470,8 @@ int utcDaliActorPositionUsesAnchorPointCheckRotation(void) tet_infoline( "Check that the rotation is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); actor.SetOrientation( Degree( 90.0f), Vector3::ZAXIS ); actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); @@ -6473,19 +6481,19 @@ int utcDaliActorPositionUsesAnchorPointCheckRotation(void) application.Render(); tet_infoline( "Check the world position is the same as it would be without a rotation\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( -50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( -50.0f, 50.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 150.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 150.0f, 50.0f, 0.0f ), TEST_LOCATION ); END_TEST; } @@ -6496,8 +6504,8 @@ int utcDaliActorPositionUsesAnchorPointCheckScaleAndRotation(void) tet_infoline( "Check that the scale and rotation is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); actor.SetOrientation( Degree( 90.0f), Vector3::ZAXIS ); actor.SetScale( 2.0f ); @@ -6508,19 +6516,19 @@ int utcDaliActorPositionUsesAnchorPointCheckScaleAndRotation(void) application.Render(); tet_infoline( "Check the world position is the same as it would be without a scale and rotation\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( -100.0f, 100.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( -100.0f, 100.0f, 0.0f ), TEST_LOCATION ); tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" ); - actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 200.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 200.0f, 0.0f, 0.0f ), TEST_LOCATION ); END_TEST; } @@ -6536,11 +6544,11 @@ int utcDaliActorPositionUsesAnchorPointOnlyInheritPosition(void) Vector2 stageSize( Stage::GetCurrent().GetSize() ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.SetSize( 100.0f, 100.0f ); - actor.SetInheritScale( false ); - actor.SetInheritOrientation( false ); + actor.SetProperty( Actor::Property::INHERIT_SCALE, false ); + actor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false ); actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); parent.Add( actor ); @@ -6550,19 +6558,19 @@ int utcDaliActorPositionUsesAnchorPointOnlyInheritPosition(void) const Vector3 expectedWorldPosition( -stageSize.width * 0.5f + 50.0f, -stageSize.height * 0.5f + 50.0f, 0.0f ); tet_infoline( "Check the world position is in the right place\n" ); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION ); tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure world position hasn't changed" ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION ); tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure world position hasn't changed" ); - actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION ); END_TEST; } @@ -6577,14 +6585,14 @@ int utcDaliActorVisibilityChangeSignalSelf(void) VisibilityChangedFunctorData data; DevelActor::VisibilityChangedSignal( actor ).Connect( &application, VisibilityChangedFunctor( data ) ); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); data.Check( true /* called */, actor, false /* not visible */, DevelActor::VisibilityChange::SELF, TEST_LOCATION ); tet_infoline( "Ensure functor is not called if we attempt to change the visibility to what it already is at" ); data.Reset(); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); data.Check( false /* not called */, TEST_LOCATION ); tet_infoline( "Change the visibility using properties, ensure called" ); @@ -6622,7 +6630,7 @@ int utcDaliActorVisibilityChangeSignalChildren(void) DevelActor::VisibilityChangedSignal( child ).Connect( &application, VisibilityChangedFunctor( childData ) ); DevelActor::VisibilityChangedSignal( grandChild ).Connect( &application, VisibilityChangedFunctor( grandChildData ) ); - parent.SetVisible( false ); + parent.SetProperty( Actor::Property::VISIBLE, false ); parentData.Check( false /* not called */, TEST_LOCATION ); childData.Check( true /* called */, child, false /* not visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION ); grandChildData.Check( true /* called */, grandChild, false /* not visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION ); @@ -6634,7 +6642,7 @@ int utcDaliActorVisibilityChangeSignalChildren(void) DevelActor::VisibilityChangedSignal( parent ).Connect( &application, VisibilityChangedFunctor( parentData ) ); - parent.SetVisible( true ); + parent.SetProperty( Actor::Property::VISIBLE, true ); parentData.Check( true /* called */, parent, true /* visible */, DevelActor::VisibilityChange::SELF, TEST_LOCATION ); childData.Check( true /* called */, child, true /* visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION ); grandChildData.Check( true /* called */, grandChild, true /* visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION ); @@ -6644,7 +6652,7 @@ int utcDaliActorVisibilityChangeSignalChildren(void) childData.Reset(); grandChildData.Reset(); - parent.SetVisible( true ); + parent.SetProperty( Actor::Property::VISIBLE, true ); parentData.Check( false /* not called */, TEST_LOCATION ); childData.Check( false /* not called */, TEST_LOCATION ); grandChildData.Check( false /* not called */, TEST_LOCATION ); @@ -6701,12 +6709,12 @@ int utcDaliActorVisibilityChangeSignalByName(void) bool signalCalled=false; actor.ConnectSignal( &application, "visibilityChanged", VisibilityChangedVoidFunctor(signalCalled) ); DALI_TEST_EQUALS( signalCalled, false, TEST_LOCATION ); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); DALI_TEST_EQUALS( signalCalled, true, TEST_LOCATION ); tet_infoline( "Ensure functor is not called if we attempt to change the visibility to what it already is at" ); signalCalled = false; - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); DALI_TEST_EQUALS( signalCalled, false, TEST_LOCATION ); tet_infoline( "Change the visibility using properties, ensure called" ); @@ -7247,7 +7255,7 @@ int utcDaliEnsureRenderWhenMakingLastActorInvisible(void) auto& glAbstraction = application.GetGlAbstraction(); const auto clearCountBefore = glAbstraction.GetClearCountCalled(); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); diff --git a/automated-tests/src/dali/utc-Dali-Animation.cpp b/automated-tests/src/dali/utc-Dali-Animation.cpp index addc288..0c53693 100644 --- a/automated-tests/src/dali/utc-Dali-Animation.cpp +++ b/automated-tests/src/dali/utc-Dali-Animation.cpp @@ -268,7 +268,7 @@ int UtcDaliAnimationSetDurationP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Restart the animation, with a different duration finishCheck.Reset(); @@ -290,13 +290,13 @@ int UtcDaliAnimationSetDurationP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -356,7 +356,7 @@ int UtcDaliAnimationSetLoopingP(void) application.Render(static_cast(durationSeconds*intervalSeconds*1000.0f)); progress += intervalSeconds; - DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION ); if (progress >= 1.0f) { @@ -378,13 +378,13 @@ int UtcDaliAnimationSetLoopingP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -439,7 +439,7 @@ int UtcDaliAnimationSetLoopCountP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); finishCheck.Reset(); @@ -676,7 +676,7 @@ int UtcDaliAnimationSetLoopCountP4(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f) ); finishCheck.Reset(); @@ -690,7 +690,7 @@ int UtcDaliAnimationSetLoopCountP4(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -844,13 +844,13 @@ int UtcDaliAnimationSetEndActionN(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Go back to the start actor.SetPosition(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Test BakeFinal, animate again, for half the duration finishCheck.Reset(); @@ -867,17 +867,17 @@ int UtcDaliAnimationSetEndActionN(void) // We did NOT expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( targetPosition * 0.5f, actor.GetCurrentPosition(), VECTOR4_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition * 0.5f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), VECTOR4_EPSILON, TEST_LOCATION ); // The position should be same with target position in the next frame application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Go back to the start actor.SetPosition(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Test EndAction::Discard, animate again, but don't bake this time finishCheck.Reset(); @@ -891,17 +891,17 @@ int UtcDaliAnimationSetEndActionN(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // The position should be discarded in the next frame application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO/*discarded*/, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO/*discarded*/, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -950,7 +950,7 @@ int UtcDaliAnimationSetDisconnectActionP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } // Bake @@ -977,7 +977,7 @@ int UtcDaliAnimationSetDisconnectActionP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition*0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition*0.5f, TEST_LOCATION ); } // Discard @@ -1004,7 +1004,7 @@ int UtcDaliAnimationSetDisconnectActionP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); } // Don't play the animation: disconnect action should not be applied @@ -1027,7 +1027,7 @@ int UtcDaliAnimationSetDisconnectActionP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); } END_TEST; @@ -1111,7 +1111,7 @@ int UtcDaliAnimationSetCurrentProgressP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); DALI_TEST_EQUALS( 0.6f, animation.GetCurrentProgress(), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing @@ -1125,20 +1125,20 @@ int UtcDaliAnimationSetCurrentProgressP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); DALI_TEST_EQUALS( 0.8f, animation.GetCurrentProgress(), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1278,27 +1278,27 @@ int UtcDaliAnimationSetSpeedFactorP1(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f) + 1u/*just beyond half the duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1338,41 +1338,41 @@ int UtcDaliAnimationSetSpeedFactorP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 60% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), initialPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1414,21 +1414,21 @@ int UtcDaliAnimationSetSpeedFactorP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.3f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.3f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); @@ -1436,20 +1436,20 @@ int UtcDaliAnimationSetSpeedFactorP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*1200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1492,21 +1492,21 @@ int UtcDaliAnimationSetSpeedFactorP4(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.3f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.3f), TEST_LOCATION ); tet_printf("Reverse direction of animation whilst playing\n"); tet_printf("SetSpeedFactor(-0.5f)\n"); @@ -1518,27 +1518,27 @@ int UtcDaliAnimationSetSpeedFactorP4(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 10% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), 0.0001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), 0.0001, TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), initialPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -1698,8 +1698,8 @@ int UtcDaliAnimationSetSpeedFactorAndRange(void) unsigned int actorIndex = 0u; for( actorIndex = 0u; actorIndex < NUM_ENTRIES; ++actorIndex ) { - DALI_TEST_EQUALS( actors[actorIndex].GetCurrentPosition().x, testData[actorIndex].expected[frame], 0.001, TEST_LOCATION ); - if( ! Equals(actors[actorIndex].GetCurrentPosition().x, testData[actorIndex].expected[frame]) ) + DALI_TEST_EQUALS( actors[actorIndex].GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData[actorIndex].expected[frame], 0.001, TEST_LOCATION ); + if( ! Equals(actors[actorIndex].GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData[actorIndex].expected[frame]) ) { tet_printf("Failed at frame %u, actorIndex %u\n", frame, actorIndex ); } @@ -1785,7 +1785,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount01(void) for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame ) { - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, testData.expected[frame], 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData.expected[frame], 0.001, TEST_LOCATION ); application.Render(200); // 200 ms at half speed corresponds to 0.1 s @@ -1800,7 +1800,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount01(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 80.0f, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, 80.0f, 0.001, TEST_LOCATION ); END_TEST; } @@ -1867,7 +1867,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount02(void) for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame ) { - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, testData.expected[frame], 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData.expected[frame], 0.001, TEST_LOCATION ); application.Render(200); // 200 ms at half speed corresponds to 0.1 s @@ -1882,7 +1882,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount02(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 30.0f, 0.001, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, 30.0f, 0.001, TEST_LOCATION ); END_TEST; } @@ -1934,14 +1934,14 @@ int UtcDaliAnimationSetPlayRangeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.6f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.6f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 200.0f )/* 80% progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.8f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.8f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds*100.0f ) + 1u/*just beyond the animation duration*/ ); @@ -1949,7 +1949,7 @@ int UtcDaliAnimationSetPlayRangeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.9f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.9f ), TEST_LOCATION ); END_TEST; } @@ -2028,7 +2028,7 @@ int UtcDaliAnimationPlayP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2037,7 +2037,7 @@ int UtcDaliAnimationPlayP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2046,7 +2046,7 @@ int UtcDaliAnimationPlayP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2055,7 +2055,7 @@ int UtcDaliAnimationPlayP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2064,13 +2064,13 @@ int UtcDaliAnimationPlayP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2084,7 +2084,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) Actor actor = Actor::New(); Vector3 basePosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION ); // Not added to the stage yet! // Build the animation @@ -2107,7 +2107,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2118,7 +2118,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); // Remove from the stage Stage::GetCurrent().Remove(actor); @@ -2129,14 +2129,14 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*back to start position as disconnect behaviour is discard*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*back to start position as disconnect behaviour is discard*/, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2147,7 +2147,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(80,80,80), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(80,80,80), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); @@ -2155,15 +2155,15 @@ int UtcDaliAnimationPlayOffStageDiscardP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2177,7 +2177,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) Actor actor = Actor::New(); Vector3 basePosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION ); // Not added to the stage! // Build the animation @@ -2199,7 +2199,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2210,7 +2210,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); // Remove from the stage Stage::GetCurrent().Remove(actor); @@ -2221,7 +2221,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition /*bake final*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition /*bake final*/, TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2232,7 +2232,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition /*bake final removed the */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition /*bake final removed the */, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); @@ -2240,14 +2240,14 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2261,7 +2261,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void) Actor actor = Actor::New(); Vector3 basePosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION ); // Not added to the stage! // Build the animation @@ -2284,7 +2284,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION ); // Add to the stage Stage::GetCurrent().Add(actor); @@ -2295,7 +2295,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION ); // Remove from the stage Stage::GetCurrent().Remove(actor); // baked here @@ -2306,18 +2306,18 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40) /*baked value*/, TEST_LOCATION ); // Add back to the stage Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /* animation restarted at 40,40,40 + 80%*60 */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /* animation restarted at 40,40,40 + 80%*60 */, TEST_LOCATION ); application.Render(static_cast(0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); application.Render(static_cast(0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); // Remove from the stage Stage::GetCurrent().Remove(actor); // baked here @@ -2325,11 +2325,11 @@ int UtcDaliAnimationPlayOffStageBakeP(void) application.SendNotification(); // this render is a no-op in this case as animator is disabled while off stage application.Render(static_cast(durationSeconds*200.0f)/* 100% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); application.Render(static_cast(0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); application.Render(static_cast(0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION ); // Add back to the stage Stage::GetCurrent().Add(actor); @@ -2337,7 +2337,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) , TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) , TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); @@ -2345,14 +2345,14 @@ int UtcDaliAnimationPlayOffStageBakeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2387,7 +2387,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); @@ -2395,7 +2395,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 60% progress */); @@ -2403,7 +2403,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); @@ -2411,7 +2411,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); @@ -2419,13 +2419,13 @@ int UtcDaliAnimationPlayDiscardHandleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2455,7 +2455,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); // This is a test of the "Fire and Forget" behaviour // Stop the animation, and Discard the animation handle! @@ -2470,7 +2470,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); finishCheck.Reset(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 60% progress */); @@ -2478,7 +2478,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) // Check that nothing has changed application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); @@ -2486,7 +2486,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) // Check that nothing has changed application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 100% progress */); @@ -2494,7 +2494,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void) // Check that nothing has changed application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION ); END_TEST; } @@ -2539,7 +2539,7 @@ int UtcDaliAnimationPlayRangeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2548,13 +2548,13 @@ int UtcDaliAnimationPlayRangeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); //Loop inside the range @@ -2574,7 +2574,7 @@ int UtcDaliAnimationPlayRangeP(void) progress = progress - 0.4f; } - DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION ); } // We didn't expect the animation to finish yet @@ -2596,7 +2596,7 @@ int UtcDaliAnimationPlayRangeP(void) progress = progress - 0.7f; } - DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION ); } END_TEST; @@ -2633,7 +2633,7 @@ int UtcDaliAnimationPlayFromP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION ); animation.Play(); // Test that calling play has no effect, when animation is already playing application.SendNotification(); @@ -2642,19 +2642,19 @@ int UtcDaliAnimationPlayFromP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2710,7 +2710,7 @@ int UtcDaliAnimationPauseP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Pause the animation animation.Pause(); @@ -2724,7 +2724,7 @@ int UtcDaliAnimationPauseP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); } // Keep going @@ -2742,13 +2742,13 @@ int UtcDaliAnimationPauseP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); END_TEST; } @@ -2785,7 +2785,7 @@ int UtcDaliAnimationGetStateP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Pause the animation animation.Pause(); @@ -2801,7 +2801,7 @@ int UtcDaliAnimationGetStateP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); DALI_TEST_EQUALS( animation.GetState(), Animation::PAUSED, TEST_LOCATION ); } @@ -2822,14 +2822,14 @@ int UtcDaliAnimationGetStateP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION ); // re-play @@ -2874,7 +2874,7 @@ int UtcDaliAnimationStopP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Stop the animation animation.Stop(); @@ -2888,7 +2888,7 @@ int UtcDaliAnimationStopP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when stopped */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when stopped */, TEST_LOCATION ); } END_TEST; } @@ -2924,7 +2924,7 @@ int UtcDaliAnimationStopSetPositionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Stop the animation animation.Stop(); @@ -2940,7 +2940,7 @@ int UtcDaliAnimationStopSetPositionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), positionSet/*Animation should not interfere with this*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), positionSet/*Animation should not interfere with this*/, TEST_LOCATION ); } END_TEST; } @@ -2973,7 +2973,7 @@ int UtcDaliAnimationClearP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION ); // Clear the animation animation.Clear(); @@ -2984,7 +2984,7 @@ int UtcDaliAnimationClearP(void) // We don't expect the animation to finish now application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress since the animator was destroyed */, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress since the animator was destroyed */, TEST_LOCATION ); // Restart as a scale animation; this should not move the actor's position finishCheck.Reset(); @@ -2999,16 +2999,16 @@ int UtcDaliAnimationClearP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3(2.0f, 2.0f, 2.0f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), TEST_LOCATION ); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); END_TEST; } @@ -4567,7 +4567,7 @@ int UtcDaliAnimationAnimateByActorPositionP(void) Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4594,7 +4594,7 @@ int UtcDaliAnimationAnimateByActorPositionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4602,13 +4602,13 @@ int UtcDaliAnimationAnimateByActorPositionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4618,7 +4618,7 @@ int UtcDaliAnimationAnimateByActorPositionComponentsP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4629,7 +4629,7 @@ int UtcDaliAnimationAnimateByActorPositionComponentsP(void) animation.AnimateBy( Property( actor, Actor::Property::POSITION_Y ), relativePosition.y ); animation.AnimateBy( Property( actor, Actor::Property::POSITION_Z ), relativePosition.z ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Start the animation @@ -4641,12 +4641,12 @@ int UtcDaliAnimationAnimateByActorPositionComponentsP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), targetPosition.y, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), targetPosition.z, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4661,7 +4661,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionP(void) Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4687,7 +4687,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - Vector3 current(actor.GetCurrentPosition()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); DALI_TEST_CHECK( current.x > ninetyFivePercentProgress.x ); DALI_TEST_CHECK( current.y > ninetyFivePercentProgress.y ); DALI_TEST_CHECK( current.z > ninetyFivePercentProgress.z ); @@ -4698,13 +4698,13 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4718,7 +4718,7 @@ int UtcDaliAnimationAnimateByActorPositionTimePeriodP(void) Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4745,7 +4745,7 @@ int UtcDaliAnimationAnimateByActorPositionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -4753,13 +4753,13 @@ int UtcDaliAnimationAnimateByActorPositionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4773,7 +4773,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionTimePeriodP(void) Stage::GetCurrent().Add(actor); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4801,7 +4801,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -4809,13 +4809,13 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -4826,7 +4826,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4851,7 +4851,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -4859,7 +4859,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -4867,7 +4867,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4875,7 +4875,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -4888,7 +4888,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4911,7 +4911,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -4919,7 +4919,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -4927,7 +4927,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4935,7 +4935,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -4949,7 +4949,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4974,7 +4974,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -4982,7 +4982,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -4990,7 +4990,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4998,8 +4998,8 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -5011,7 +5011,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5033,7 +5033,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -5041,7 +5041,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -5049,7 +5049,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5057,7 +5057,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -5068,7 +5068,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) Actor actor = Actor::New(); actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5093,7 +5093,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); float progress = max(0.0f, 0.25f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -5102,7 +5102,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.5f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -5111,7 +5111,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.75f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5119,7 +5119,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -5129,7 +5129,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5156,7 +5156,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), ninetyNinePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); @@ -5164,14 +5164,14 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetScale(Vector3::ONE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -5187,7 +5187,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) finishCheck.CheckSignalNotReceived(); // The scale should have grown less, than with a linear alpha function - Vector3 current(actor.GetCurrentScale()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); DALI_TEST_CHECK( current.x > 1.0f ); DALI_TEST_CHECK( current.y > 1.0f ); DALI_TEST_CHECK( current.z > 1.0f ); @@ -5201,14 +5201,14 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetScale(Vector3::ONE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Repeat with a delay float delay = 0.5f; @@ -5223,7 +5223,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -5231,7 +5231,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); END_TEST; } @@ -5241,7 +5241,7 @@ int UtcDaliAnimationAnimateByActorScaleComponentsP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5252,7 +5252,7 @@ int UtcDaliAnimationAnimateByActorScaleComponentsP(void) animation.AnimateBy( Property( actor, Actor::Property::SCALE_Y ), relativeScale.y ); animation.AnimateBy( Property( actor, Actor::Property::SCALE_Z ), relativeScale.z ); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Start the animation @@ -5264,12 +5264,12 @@ int UtcDaliAnimationAnimateByActorScaleComponentsP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Y ), targetScale.y, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Z ), targetScale.z, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); END_TEST; } @@ -5280,7 +5280,7 @@ int UtcDaliAnimationAnimateByActorColorP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5289,7 +5289,7 @@ int UtcDaliAnimationAnimateByActorColorP(void) Vector4 relativeColor( targetColor - Color::WHITE ); animation.AnimateBy( Property( actor, Actor::Property::COLOR ), relativeColor ); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Start the animation @@ -5302,12 +5302,12 @@ int UtcDaliAnimationAnimateByActorColorP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetColor.b, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetColor.a, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); END_TEST; } @@ -5318,7 +5318,7 @@ int UtcDaliAnimationAnimateByActorColorComponentsP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5330,7 +5330,7 @@ int UtcDaliAnimationAnimateByActorColorComponentsP(void) animation.AnimateBy( Property( actor, Actor::Property::COLOR_BLUE ), relativeColor.b ); animation.AnimateBy( Property( actor, Actor::Property::COLOR_ALPHA ), relativeColor.a ); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Start the animation @@ -5343,12 +5343,12 @@ int UtcDaliAnimationAnimateByActorColorComponentsP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetColor.b, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetColor.a, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); END_TEST; } @@ -5359,7 +5359,7 @@ int UtcDaliAnimationAnimateByActorSizeP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5368,7 +5368,7 @@ int UtcDaliAnimationAnimateByActorSizeP(void) Vector3 relativeSize( targetSize - Vector3::ZERO ); animation.AnimateBy( Property( actor, Actor::Property::SIZE ), relativeSize ); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Start the animation @@ -5380,12 +5380,12 @@ int UtcDaliAnimationAnimateByActorSizeP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetSize.height, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetSize.depth, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); END_TEST; } @@ -5396,7 +5396,7 @@ int UtcDaliAnimationAnimateByActorSizeComponentsP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5407,7 +5407,7 @@ int UtcDaliAnimationAnimateByActorSizeComponentsP(void) animation.AnimateBy( Property( actor, Actor::Property::SIZE_HEIGHT ), relativeSize.height ); animation.AnimateBy( Property( actor, Actor::Property::SIZE_DEPTH ), relativeSize.depth ); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Start the animation @@ -5419,12 +5419,12 @@ int UtcDaliAnimationAnimateByActorSizeComponentsP(void) DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetSize.height, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetSize.depth, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); END_TEST; } @@ -5435,14 +5435,14 @@ int UtcDaliAnimationAnimateByActorVisibilityP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); - actor.SetVisible( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.IsVisible(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5458,12 +5458,12 @@ int UtcDaliAnimationAnimateByActorVisibilityP(void) // Target value should be retrievable straight away DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), targetVisibility, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.IsVisible(), false, TEST_LOCATION ); // Not changed yet + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); // Not changed yet application.SendNotification(); application.Render( 1000 ); // 1 second progress - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); END_TEST; } @@ -6886,7 +6886,7 @@ int UtcDaliAnimationAnimateToActorParentOriginP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -6908,7 +6908,7 @@ int UtcDaliAnimationAnimateToActorParentOriginXN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().x, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).x, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::PARENT_ORIGIN_X), startValue, TEST_LOCATION ); // Build the animation @@ -6931,7 +6931,7 @@ int UtcDaliAnimationAnimateToActorParentOriginYN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().y, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).y, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::PARENT_ORIGIN_Y), startValue, TEST_LOCATION ); // Build the animation @@ -6954,7 +6954,7 @@ int UtcDaliAnimationAnimateToActorParentOriginZN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.5f); - DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().z, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).z, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::PARENT_ORIGIN_Z), startValue, TEST_LOCATION ); // Build the animation @@ -6976,7 +6976,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), AnchorPoint::CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::CENTER, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -6998,7 +6998,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointXN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.5f); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().x, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).x, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::ANCHOR_POINT_X), startValue, TEST_LOCATION ); // Build the animation @@ -7021,7 +7021,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointYN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.5f); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().y, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).y, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::ANCHOR_POINT_Y), startValue, TEST_LOCATION ); // Build the animation @@ -7044,7 +7044,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointZN(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.5f); - DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().z, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).z, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::ANCHOR_POINT_Z), startValue, TEST_LOCATION ); // Build the animation @@ -7066,7 +7066,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7101,7 +7101,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), ninetyNinePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); @@ -7109,14 +7109,14 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetSize(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -7132,7 +7132,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) finishCheck.CheckSignalNotReceived(); // The size should have travelled less, than with a linear alpha function - Vector3 current(actor.GetCurrentSize()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); DALI_TEST_CHECK( current.x > 0.0f ); DALI_TEST_CHECK( current.y > 0.0f ); DALI_TEST_CHECK( current.z > 0.0f ); @@ -7146,14 +7146,14 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetSize(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Repeat with a delay float delay = 0.5f; @@ -7168,7 +7168,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7176,7 +7176,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); END_TEST; } @@ -7187,7 +7187,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentSize().width, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), startValue, TEST_LOCATION ); // Build the animation @@ -7219,7 +7219,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().width, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7227,7 +7227,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().width, targetWidth, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, targetWidth, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), targetWidth, TEST_LOCATION ); END_TEST; } @@ -7239,7 +7239,7 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentSize().height, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), startValue, TEST_LOCATION ); // Build the animation @@ -7271,7 +7271,7 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().height, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7279,7 +7279,7 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().height, targetHeight, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, targetHeight, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), targetHeight, TEST_LOCATION ); END_TEST; } @@ -7291,7 +7291,7 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentSize().depth, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), startValue, TEST_LOCATION ); // Build the animation @@ -7323,7 +7323,7 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().depth, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7331,7 +7331,7 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().depth, targetDepth, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, targetDepth, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), targetDepth, TEST_LOCATION ); END_TEST; } @@ -7342,7 +7342,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7365,7 +7365,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), ninetyNinePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); @@ -7373,14 +7373,14 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetSize(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -7397,7 +7397,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) finishCheck.CheckSignalNotReceived(); // The size should have travelled less, than with a linear alpha function - Vector3 current(actor.GetCurrentSize()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE )); DALI_TEST_CHECK( current.x > 0.0f ); DALI_TEST_CHECK( current.y > 0.0f ); DALI_TEST_CHECK( current.x < ninetyNinePercentProgress.x ); @@ -7409,15 +7409,15 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().x, targetSize.x, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentSize().y, targetSize.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).x, targetSize.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, targetSize.y, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetSize(Vector3::ZERO); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Repeat with a delay float delay = 0.5f; @@ -7433,7 +7433,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7441,8 +7441,8 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize().x, targetSize.x, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentSize().y, targetSize.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).x, targetSize.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, targetSize.y, TEST_LOCATION ); END_TEST; } @@ -7452,7 +7452,7 @@ int UtcDaliAnimationAnimateToActorPositionP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7487,7 +7487,7 @@ int UtcDaliAnimationAnimateToActorPositionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -7495,7 +7495,7 @@ int UtcDaliAnimationAnimateToActorPositionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -7506,7 +7506,7 @@ int UtcDaliAnimationAnimateToActorPositionXP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7540,7 +7540,7 @@ int UtcDaliAnimationAnimateToActorPositionXP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7548,7 +7548,7 @@ int UtcDaliAnimationAnimateToActorPositionXP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, targetX, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, targetX, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), targetX, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7562,7 +7562,7 @@ int UtcDaliAnimationAnimateToActorPositionYP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentPosition().y, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7596,7 +7596,7 @@ int UtcDaliAnimationAnimateToActorPositionYP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().y, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7604,7 +7604,7 @@ int UtcDaliAnimationAnimateToActorPositionYP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().y, targetY, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, targetY, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetY, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7618,7 +7618,7 @@ int UtcDaliAnimationAnimateToActorPositionZP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(0.0f); - DALI_TEST_EQUALS( actor.GetCurrentPosition().z, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), startValue, TEST_LOCATION ); @@ -7652,7 +7652,7 @@ int UtcDaliAnimationAnimateToActorPositionZP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().z, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7660,7 +7660,7 @@ int UtcDaliAnimationAnimateToActorPositionZP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition().z, targetZ, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, targetZ, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetZ, TEST_LOCATION ); @@ -7673,7 +7673,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7698,7 +7698,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved less, than with a linear alpha function - Vector3 current(actor.GetCurrentPosition()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )); DALI_TEST_CHECK( current.x > Vector3::ZERO.x ); DALI_TEST_CHECK( current.y > Vector3::ZERO.y ); DALI_TEST_CHECK( current.z > Vector3::ZERO.z ); @@ -7712,7 +7712,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -7722,7 +7722,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7748,7 +7748,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */); @@ -7756,7 +7756,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f*0.25) + 1u/*just beyond the animation duration*/); @@ -7764,7 +7764,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -7774,7 +7774,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7801,7 +7801,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */); @@ -7809,7 +7809,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f*0.25) + 1u/*just beyond the animation duration*/); @@ -7817,7 +7817,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -7828,7 +7828,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7853,7 +7853,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -7861,7 +7861,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -7869,7 +7869,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -7877,7 +7877,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -7888,7 +7888,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7911,7 +7911,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -7919,7 +7919,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -7927,7 +7927,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -7935,7 +7935,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -7946,7 +7946,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7968,7 +7968,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -7976,7 +7976,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -7984,7 +7984,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -7992,7 +7992,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -8003,7 +8003,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8027,7 +8027,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); float progress = max(0.0f, 0.25f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -8036,7 +8036,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.5f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -8045,7 +8045,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.75f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -8053,7 +8053,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -8064,7 +8064,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) Actor actor = Actor::New(); actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8088,7 +8088,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); float progress = max(0.0f, 0.25f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -8097,7 +8097,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.5f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); @@ -8106,7 +8106,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); progress = max(0.0f, 0.75f - delay) / (1.0f - delay); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -8114,7 +8114,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); END_TEST; } @@ -8124,7 +8124,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8153,7 +8153,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), ninetyNinePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); @@ -8161,14 +8161,14 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetScale(Vector3::ONE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -8184,7 +8184,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) finishCheck.CheckSignalNotReceived(); // The scale should have grown less, than with a linear alpha function - Vector3 current(actor.GetCurrentScale()); + Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE )); DALI_TEST_CHECK( current.x > 1.0f ); DALI_TEST_CHECK( current.y > 1.0f ); DALI_TEST_CHECK( current.z > 1.0f ); @@ -8198,14 +8198,14 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); // Reset everything finishCheck.Reset(); actor.SetScale(Vector3::ONE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Repeat with a delay float delay = 0.5f; @@ -8220,7 +8220,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -8228,7 +8228,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); END_TEST; } @@ -8239,7 +8239,7 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentScale().x, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); @@ -8272,7 +8272,7 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().x, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); @@ -8283,7 +8283,7 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().x, targetX, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, targetX, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), targetX, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); @@ -8297,7 +8297,7 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentScale().y, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); @@ -8330,7 +8330,7 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().y, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); @@ -8341,7 +8341,7 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().y, targetY, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, targetY, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), targetY, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); @@ -8355,7 +8355,7 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentScale().z, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); @@ -8388,7 +8388,7 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().z, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), fiftyPercentProgress, TEST_LOCATION ); @@ -8399,7 +8399,7 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentScale().z, targetZ, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, targetZ, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), targetZ, TEST_LOCATION ); @@ -8412,7 +8412,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8444,7 +8444,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), tenPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), tenPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*900.0f) + 1u/*just beyond the animation duration*/); @@ -8452,14 +8452,14 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); // Reset everything finishCheck.Reset(); - actor.SetColor(Color::WHITE); + actor.SetProperty( Actor::Property::COLOR,Color::WHITE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Repeat with a different (ease-in) alpha function animation = Animation::New(durationSeconds); @@ -8475,7 +8475,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) finishCheck.CheckSignalNotReceived(); // The color should have changed less, than with a linear alpha function - Vector4 current(actor.GetCurrentColor()); + Vector4 current(actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR )); DALI_TEST_CHECK( current.x == 1.0f ); // doesn't change DALI_TEST_CHECK( current.y < 1.0f ); DALI_TEST_CHECK( current.y > tenPercentProgress.y ); @@ -8489,14 +8489,14 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); // Reset everything finishCheck.Reset(); - actor.SetColor(Color::WHITE); + actor.SetProperty( Actor::Property::COLOR,Color::WHITE); application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Repeat with a shorter animator duration float animatorDuration = 0.5f; @@ -8511,7 +8511,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), twentyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), twentyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*400.0f)/* 50% animation progress, 100% animator progress */); @@ -8519,7 +8519,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -8527,7 +8527,7 @@ int UtcDaliAnimationAnimateToActorColorP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); END_TEST; } @@ -8538,7 +8538,7 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentColor().r, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8573,7 +8573,7 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().r, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8585,7 +8585,7 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().r, targetRed, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, targetRed, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), targetRed, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8600,7 +8600,7 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentColor().g, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8635,7 +8635,7 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().g, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8647,7 +8647,7 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().g, targetGreen, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, targetGreen, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), targetGreen, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8662,7 +8662,7 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentColor().b, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8697,7 +8697,7 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().b, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), fiftyPercentProgress, TEST_LOCATION ); @@ -8709,7 +8709,7 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().b, targetBlue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, targetBlue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), targetBlue, TEST_LOCATION ); @@ -8724,7 +8724,7 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); float startValue(1.0f); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8760,7 +8760,7 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, fiftyPercentProgress, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); @@ -8772,7 +8772,7 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, targetAlpha, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, targetAlpha, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); @@ -8957,10 +8957,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -8997,7 +8997,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) application.Render(0); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.1f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.1f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 10% progress */); application.SendNotification(); @@ -9005,7 +9005,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.3f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); application.SendNotification(); @@ -9013,7 +9013,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.25f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.25f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.25f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 40% progress */); application.SendNotification(); @@ -9021,7 +9021,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.0f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*400.0f)/* 80% progress */); application.SendNotification(); @@ -9029,7 +9029,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.7f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 90% progress */); application.SendNotification(); @@ -9037,7 +9037,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.8f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)+1/* 100% progress */); application.SendNotification(); @@ -9045,7 +9045,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.9f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -9059,10 +9059,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9096,7 +9096,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) application.Render(0); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.1f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.1f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 10% progress */); application.SendNotification(); @@ -9104,7 +9104,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.36f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.36f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.36f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); application.SendNotification(); @@ -9112,7 +9112,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.21f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.21f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.21f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 40% progress */); application.SendNotification(); @@ -9120,7 +9120,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.0f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*400.0f)/* 80% progress */); application.SendNotification(); @@ -9128,7 +9128,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.7f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 90% progress */); application.SendNotification(); @@ -9136,7 +9136,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.76f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.76f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.76f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)+1/* 100% progress */); application.SendNotification(); @@ -9144,7 +9144,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.9f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -9158,10 +9158,10 @@ int UtcDaliAnimationAnimateBetweenActorColorP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9237,10 +9237,10 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9322,7 +9322,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleP(void) application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9341,7 +9341,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleP(void) animation.Play(); // Final key frame value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); @@ -9353,7 +9353,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleP(void) application.Render(static_cast(durationSeconds*500.0f)+1); application.SendNotification(); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION); finishCheck.CheckSignalReceived(); END_TEST; } @@ -9370,7 +9370,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleCubicP(void) application.SendNotification(); application.Render(0); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9399,7 +9399,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleCubicP(void) application.Render(static_cast(durationSeconds*500.0f)+1); application.SendNotification(); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION); + DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION); finishCheck.CheckSignalReceived(); END_TEST; } @@ -9416,7 +9416,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01P(void) application.SendNotification(); application.Render(0); Quaternion start(Radian(aa.angle), aa.axis); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9445,7 +9445,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01P(void) Quaternion check( Radian(Degree(60)), Vector3::ZAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; } @@ -9462,7 +9462,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02P(void) Stage::GetCurrent().Add(actor); Quaternion start(Radian(aa.angle), aa.axis); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9487,27 +9487,27 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02P(void) finishCheck.CheckSignalNotReceived(); Quaternion check(Radian(Degree(60)), Vector3::XAXIS); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(90)), Vector3::XAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(120)), Vector3::XAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(101.5)), Vector3(0.5f, 0.5f, 0.0f) ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(120)), Vector3::YAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); // We did expect the animation to finish @@ -9527,7 +9527,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01CubicP(void) application.SendNotification(); application.Render(0); Quaternion start(Radian(aa.angle), aa.axis); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9554,7 +9554,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01CubicP(void) Quaternion check( Radian(Degree(60)), Vector3::ZAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; } @@ -9571,7 +9571,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02CubicP(void) Stage::GetCurrent().Add(actor); Quaternion start(Radian(aa.angle), aa.axis); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9597,27 +9597,27 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02CubicP(void) finishCheck.CheckSignalNotReceived(); Quaternion check(Radian(Degree(60)), Vector3::XAXIS); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(90)), Vector3::XAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(120)), Vector3::XAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(101.5)), Vector3(0.5f, 0.5f, 0.0f ) ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); check = Quaternion( Radian(Degree(120)), Vector3::YAXIS ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION ); // We did expect the animation to finish @@ -9631,10 +9631,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9710,10 +9710,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionCubicP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9789,10 +9789,10 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9870,10 +9870,10 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodCubicP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -9952,10 +9952,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionTimePeriodP(void) float startValue(1.0f); float delay = 0.5f; Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -10032,10 +10032,10 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicWithDelayP(void) float startValue(1.0f); Actor actor = Actor::New(); - actor.SetColor(Vector4(startValue, startValue, startValue, startValue)); + actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue)); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); @@ -10152,36 +10152,36 @@ int UtcDaliAnimationAnimateP(void) Quaternion rotation; path.Sample( 0.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); path.Sample( 0.25f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); path.Sample( 0.5f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); path.Sample( 0.75f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); path.Sample( 1.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; @@ -10231,36 +10231,36 @@ int UtcDaliAnimationAnimateAlphaFunctionP(void) Quaternion rotation; path.Sample( 0.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); path.Sample( 0.25f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); path.Sample( 0.5f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); path.Sample( 0.75f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); path.Sample( 1.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; @@ -10310,36 +10310,36 @@ int UtcDaliAnimationAnimateTimePeriodP(void) Quaternion rotation; path.Sample( 0.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); path.Sample( 0.25f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); path.Sample( 0.5f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); path.Sample( 0.75f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); path.Sample( 1.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; @@ -10389,36 +10389,36 @@ int UtcDaliAnimationAnimateAlphaFunctionTimePeriodP(void) Quaternion rotation; path.Sample( 0.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); path.Sample( 0.25f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); path.Sample( 0.5f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); path.Sample( 0.75f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); path.Sample( 1.0f, position, tangent ); rotation = Quaternion( Vector3::XAXIS, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION ); finishCheck.CheckSignalReceived(); END_TEST; @@ -10429,10 +10429,10 @@ int UtcDaliAnimationShowP(void) TestApplication application; Actor actor = Actor::New(); - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); application.SendNotification(); application.Render(0); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); Stage::GetCurrent().Add(actor); // Start the animation @@ -10451,7 +10451,7 @@ int UtcDaliAnimationShowP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f)/*Should be shown now*/); @@ -10459,7 +10459,7 @@ int UtcDaliAnimationShowP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -10467,7 +10467,7 @@ int UtcDaliAnimationShowP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); END_TEST; } @@ -10476,7 +10476,7 @@ int UtcDaliAnimationHideP(void) TestApplication application; Actor actor = Actor::New(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); Stage::GetCurrent().Add(actor); // Start the animation @@ -10495,7 +10495,7 @@ int UtcDaliAnimationHideP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); application.SendNotification(); application.Render(static_cast(durationSeconds*10.0f)/*Should be hidden now*/); @@ -10503,7 +10503,7 @@ int UtcDaliAnimationHideP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -10511,7 +10511,7 @@ int UtcDaliAnimationHideP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); END_TEST; } @@ -10523,7 +10523,7 @@ int UtcDaliAnimationShowHideAtEndP(void) TestApplication application; Actor actor = Actor::New(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); Stage::GetCurrent().Add(actor); // Start Hide animation @@ -10542,7 +10542,7 @@ int UtcDaliAnimationShowHideAtEndP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( !actor.IsVisible() ); + DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); // Start Show animation animation = Animation::New(durationSeconds); @@ -10556,7 +10556,7 @@ int UtcDaliAnimationShowHideAtEndP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.IsVisible() ); + DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ); END_TEST; } @@ -10928,7 +10928,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayP(void) //Test GetCurrentProgress return 0.0 as the duration is 0.0 DALI_TEST_EQUALS( 0.0f, animation.GetCurrentProgress(), TEST_LOCATION ); - DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); tet_infoline("Set target position in animation without intiating play"); @@ -10956,7 +10956,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPosition.y, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPosition.z, TEST_LOCATION ); - tet_printf( "x position at half way point(%f)\n", actor.GetCurrentPosition().x ); + tet_printf( "x position at half way point(%f)\n", actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x ); application.Render(2000u); @@ -10993,7 +10993,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsPositionP(void) //Test GetCurrentProgress return 0.0 as the duration is 0.0 DALI_TEST_EQUALS( 0.0f, animation.GetCurrentProgress(), TEST_LOCATION ); - DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); tet_infoline("Set target position in animation without intiating play"); @@ -11023,7 +11023,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsPositionP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPositions[2].y, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPositions[2].z, TEST_LOCATION ); - tet_printf( "x position at half way point(%f)\n", actor.GetCurrentPosition().x ); + tet_printf( "x position at half way point(%f)\n", actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x ); application.Render(2000u); @@ -11170,7 +11170,7 @@ int UtcDaliAnimationTimePeriodOrder(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); @@ -11192,7 +11192,7 @@ int UtcDaliAnimationTimePeriodOrder(void) application.SendNotification(); application.Render(5000); // After the animation is complete - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 100.0f, TEST_LOCATION ); @@ -11207,7 +11207,7 @@ int UtcDaliAnimationTimePeriodOrder(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); @@ -11223,7 +11223,7 @@ int UtcDaliAnimationTimePeriodOrder(void) application.SendNotification(); application.Render(5000); // After the animation is complete - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 100.0f, TEST_LOCATION ); @@ -11242,7 +11242,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); @@ -11268,7 +11268,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void) application.SendNotification(); application.Render(14000); // After the animation is complete - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 145.0f, TEST_LOCATION ); @@ -11284,7 +11284,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); @@ -11304,7 +11304,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void) application.SendNotification(); application.Render(14000); // After the animation is complete - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 145.0f, TEST_LOCATION ); @@ -11472,7 +11472,7 @@ int UtcDaliAnimationProgressCallbackP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); tet_infoline( "Animation finished" ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -11507,21 +11507,21 @@ int UtcDaliAnimationPlayAfterP(void) application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 50% animation progress, 0% animator progress */ ); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) + 1u/*just beyond the animation duration*/ ); @@ -11529,11 +11529,11 @@ int UtcDaliAnimationPlayAfterP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } tet_printf("Testing that playing after 2 seconds with negative speedfactor\n"); @@ -11563,21 +11563,21 @@ int UtcDaliAnimationPlayAfterP(void) application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position. + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position. application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 25% animation progress, 50% animator progress */ ); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 50% animation progress, 100% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 500.0f ) + 1u/*just beyond the animation duration*/ ); @@ -11585,11 +11585,11 @@ int UtcDaliAnimationPlayAfterP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of Timeperiod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of Timeperiod in seconds // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0.0, 0.0, 0.0), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0, 0.0, 0.0), TEST_LOCATION ); } END_TEST; @@ -11631,7 +11631,7 @@ int UtcDaliAnimationPlayAfterP2(void) application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move } application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 50% animation progress, 0% animator progress */ ); @@ -11639,14 +11639,14 @@ int UtcDaliAnimationPlayAfterP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) /* 100% progress */ ); @@ -11654,7 +11654,7 @@ int UtcDaliAnimationPlayAfterP2(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } animation.SetLooping(false); @@ -11663,7 +11663,7 @@ int UtcDaliAnimationPlayAfterP2(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } tet_printf("Testing that playing after 2 seconds before looping with negative speedfactor\n"); @@ -11699,7 +11699,7 @@ int UtcDaliAnimationPlayAfterP2(void) application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position. + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position. } application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 25% animation progress, 50% animator progress */ ); @@ -11707,14 +11707,14 @@ int UtcDaliAnimationPlayAfterP2(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 50% animation progress, 100% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 500.0f ) /* 100% progress */ ); @@ -11722,7 +11722,7 @@ int UtcDaliAnimationPlayAfterP2(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in second + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in second } animation.SetLooping(false); @@ -11731,7 +11731,7 @@ int UtcDaliAnimationPlayAfterP2(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0.0, 0.0, 0.0), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0, 0.0, 0.0), TEST_LOCATION ); } END_TEST; @@ -11768,14 +11768,14 @@ int UtcDaliAnimationPlayAfterP3(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) + 1u/*just beyond the animation duration*/ ); @@ -11783,11 +11783,11 @@ int UtcDaliAnimationPlayAfterP3(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -11822,35 +11822,35 @@ int UtcDaliAnimationPlayAfterP4(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of PlayAfter + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of PlayAfter application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 20% animation progress, 0% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 45% animation progress, 0% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 70% animation progress, 40% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.4f ), TEST_LOCATION ); // 40% of animator progress + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.4f ), TEST_LOCATION ); // 40% of animator progress application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 95% animation progress, 90% animator progress */ ); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.9f ), TEST_LOCATION ); // 90% of animator progress + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.9f ), TEST_LOCATION ); // 90% of animator progress application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 50.0f ) + 1u/*just beyond the animation duration*/ ); @@ -11858,11 +11858,11 @@ int UtcDaliAnimationPlayAfterP4(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } @@ -11893,7 +11893,7 @@ int UtcDaliAnimationSetLoopingModeP(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } // LoopingMode::AUTO_REVERSE @@ -11929,7 +11929,7 @@ int UtcDaliAnimationSetLoopingModeP(void) // AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition, // and arrives at the beginning. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 100% time progress */ ); @@ -11937,7 +11937,7 @@ int UtcDaliAnimationSetLoopingModeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); } animation.SetLooping( false ); @@ -11947,7 +11947,7 @@ int UtcDaliAnimationSetLoopingModeP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); } // LoopingMode::AUTO_REVERSE in Reverse mode, which begin from the end @@ -11987,7 +11987,7 @@ int UtcDaliAnimationSetLoopingModeP(void) // Setting a negative speed factor is to play the animation in reverse. // So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time, // the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 100% time progress */ ); @@ -11995,7 +11995,7 @@ int UtcDaliAnimationSetLoopingModeP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } animation.SetLooping( false ); @@ -12005,7 +12005,7 @@ int UtcDaliAnimationSetLoopingModeP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); } END_TEST; @@ -12056,7 +12056,7 @@ int UtcDaliAnimationSetLoopingModeP2(void) application.Render(static_cast(durationSeconds*intervalSeconds*1000.0f)); // AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition, // and arrives at the beginning. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); application.Render(static_cast(durationSeconds*intervalSeconds*1000.0f)); @@ -12074,7 +12074,7 @@ int UtcDaliAnimationSetLoopingModeP2(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); finishCheck.Reset(); } @@ -12122,7 +12122,7 @@ int UtcDaliAnimationSetLoopingModeP2(void) // Setting a negative speed factor is to play the animation in reverse. // So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time, // the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.Render(static_cast(durationSeconds*intervalSeconds*1000.0f)); @@ -12140,7 +12140,7 @@ int UtcDaliAnimationSetLoopingModeP2(void) application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); finishCheck.Reset(); } @@ -12185,13 +12185,13 @@ int UtcDaliAnimationSetLoopingModeP3(void) // AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition, // and arrives at the beginning. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 0.5f * 1000.0f )/* 100% time progress */ ); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 1.0f * 1000.0f ) + 1u /*just beyond the animation duration*/ ); @@ -12202,7 +12202,7 @@ int UtcDaliAnimationSetLoopingModeP3(void) finishCheck.CheckSignalReceived(); // After all animation finished, arrives at the beginning. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); finishCheck.Reset(); } @@ -12242,13 +12242,13 @@ int UtcDaliAnimationSetLoopingModeP3(void) // Setting a negative speed factor is to play the animation in reverse. // So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time, // the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 0.5f * 1000.0f )/* 100% time progress */ ); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); application.SendNotification(); application.Render( static_cast< unsigned int >( durationSeconds * 1.0f * 1000.0f ) + 1u /*just beyond the animation duration*/ ); @@ -12259,7 +12259,7 @@ int UtcDaliAnimationSetLoopingModeP3(void) finishCheck.CheckSignalReceived(); // After all animation finished, arrives at the target. - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); finishCheck.Reset(); } @@ -12328,7 +12328,7 @@ int UtcDaliAnimationProgressSignalConnectionWithoutProgressMarkerP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); tet_infoline( "Animation finished" ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-BaseHandle.cpp b/automated-tests/src/dali/utc-Dali-BaseHandle.cpp index 722cc85..94a5b4b 100644 --- a/automated-tests/src/dali/utc-Dali-BaseHandle.cpp +++ b/automated-tests/src/dali/utc-Dali-BaseHandle.cpp @@ -288,18 +288,18 @@ int UtcDaliBaseHandleStlVector(void) std::stringstream stream; stream << "Actor " << i+1; - actor.SetName(stream.str()); + actor.SetProperty( Actor::Property::NAME,stream.str()); myVector.push_back(actor); } DALI_TEST_EQUALS(TargetVectorSize, static_cast(myVector.size()), TEST_LOCATION); - DALI_TEST_CHECK(myVector[0].GetName() == "Actor 1"); - DALI_TEST_CHECK(myVector[1].GetName() == "Actor 2"); - DALI_TEST_CHECK(myVector[2].GetName() == "Actor 3"); - DALI_TEST_CHECK(myVector[3].GetName() == "Actor 4"); - DALI_TEST_CHECK(myVector[4].GetName() == "Actor 5"); + DALI_TEST_CHECK(myVector[0].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 1"); + DALI_TEST_CHECK(myVector[1].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 2"); + DALI_TEST_CHECK(myVector[2].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 3"); + DALI_TEST_CHECK(myVector[3].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 4"); + DALI_TEST_CHECK(myVector[4].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 5"); END_TEST; } @@ -318,8 +318,8 @@ int UtcDaliBaseHandleDoAction(void) DALI_TEST_CHECK(actorObject.DoAction("invalidCommand", attributes) == false); // Check that the actor is visible - actor.SetVisible(true); - DALI_TEST_CHECK(actor.IsVisible() == true); + actor.SetProperty( Actor::Property::VISIBLE,true); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); // Check the actor performed an action to hide itself DALI_TEST_CHECK(actorObject.DoAction("hide", attributes) == true); @@ -329,7 +329,7 @@ int UtcDaliBaseHandleDoAction(void) application.Render(); // Check that the actor is now invisible - DALI_TEST_CHECK(actor.IsVisible() == false); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false); // Check the actor performed an action to show itself DALI_TEST_CHECK(actorObject.DoAction("show", attributes) == true); @@ -339,7 +339,7 @@ int UtcDaliBaseHandleDoAction(void) application.Render(); // Check that the actor is now visible - DALI_TEST_CHECK(actor.IsVisible() == true); + DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); Stage::GetCurrent().Add(actor); @@ -390,7 +390,7 @@ int UtcDaliBaseHandleDoAction(void) // We expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); // play again signalReceived = false; @@ -418,8 +418,8 @@ int UtcDaliBaseHandleConnectSignal(void) // get the root layer Actor actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.SetPosition( 240, 400 ); actor.SetSize( 100, 100 ); diff --git a/automated-tests/src/dali/utc-Dali-BufferImage.cpp b/automated-tests/src/dali/utc-Dali-BufferImage.cpp index 28c2168..381499e 100644 --- a/automated-tests/src/dali/utc-Dali-BufferImage.cpp +++ b/automated-tests/src/dali/utc-Dali-BufferImage.cpp @@ -248,7 +248,7 @@ int UtcDaliBufferImageUpdate01(void) BufferImage image = BufferImage::New(buffer, 16, 16, Pixel::A8); Actor actor = CreateRenderableActor( image ); Stage::GetCurrent().Add(actor); - actor.SetVisible(true); + actor.SetProperty( Actor::Property::VISIBLE,true); std::vector ids; ids.push_back(200); @@ -293,7 +293,7 @@ int UtcDaliBufferImageUpdate02(void) BufferImage image = BufferImage::New(buffer, 16, 16, Pixel::A8); Actor actor = CreateRenderableActor( image ); Stage::GetCurrent().Add(actor); - actor.SetVisible(true); + actor.SetProperty( Actor::Property::VISIBLE,true); application.SendNotification(); application.Render(0); diff --git a/automated-tests/src/dali/utc-Dali-CameraActor.cpp b/automated-tests/src/dali/utc-Dali-CameraActor.cpp index 85d6465..26fe3c0 100644 --- a/automated-tests/src/dali/utc-Dali-CameraActor.cpp +++ b/automated-tests/src/dali/utc-Dali-CameraActor.cpp @@ -910,7 +910,7 @@ int UtcDaliCameraActorSetOrthographicProjectionP1(void) actor.GetProperty( CameraActor::Property::FIELD_OF_VIEW ).Get( defaultFieldOfView ); actor.GetProperty( CameraActor::Property::NEAR_PLANE_DISTANCE ).Get( defaultNearPlaneDistance ); actor.GetProperty( CameraActor::Property::FAR_PLANE_DISTANCE ).Get( defaultFarPlaneDistance ); - Vector3 defaultPos = actor.GetCurrentPosition(); + Vector3 defaultPos = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); actor.SetOrthographicProjection( Size( 1080.0f, 1920.0f ) ); @@ -938,7 +938,7 @@ int UtcDaliCameraActorSetOrthographicProjectionP1(void) actor.GetProperty( CameraActor::Property::BOTTOM_PLANE_DISTANCE ).Get( value ); DALI_TEST_EQUALS( -960.0f, value, FLOAT_EPSILON, TEST_LOCATION ); - Vector3 pos = actor.GetCurrentPosition(); + Vector3 pos = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); DALI_TEST_EQUALS( defaultPos.z, pos.z, 0.001f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION ); @@ -1467,7 +1467,7 @@ int UtcDaliCameraActorModelView(void) Actor actor = CreateRenderableActor(image); actor.SetSize( 100.0f, 100.0f ); actor.SetPosition( 20.0f, 30.0f, 40.0f ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -1476,7 +1476,7 @@ int UtcDaliCameraActorModelView(void) application.SendNotification(); Matrix resultMatrix( true ); - resultMatrix.SetTransformComponents( Vector3::ONE, Quaternion::IDENTITY, actor.GetCurrentPosition() ); + resultMatrix.SetTransformComponents( Vector3::ONE, Quaternion::IDENTITY, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) ); RenderTask task = Stage::GetCurrent().GetRenderTaskList().GetTask( 0 ); CameraActor cameraActor = task.GetCameraActor(); @@ -1552,7 +1552,7 @@ int UtcDaliCameraActorAnimatedProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 200.0f, 300.0f ), TEST_LOCATION); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 200.0f, 300.0f ), TEST_LOCATION); END_TEST; } @@ -1576,12 +1576,12 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews01(void) Vector2 stageSize = stage.GetSize(); CameraActor freeLookCameraActor = CameraActor::New( stageSize ); - freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); freeLookCameraActor.SetType( Camera::FREE_LOOK ); Vector3 targetPosition( 30.0f, 240.0f, -256.0f ); Actor target = Actor::New(); - target.SetParentOrigin( ParentOrigin::CENTER ); + target.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); target.SetPosition( targetPosition ); Constraint cameraOrientationConstraint = Constraint::New ( freeLookCameraActor, Actor::Property::ORIENTATION, &LookAt ); @@ -1593,7 +1593,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews01(void) CameraActor lookAtCameraActor = CameraActor::New( stageSize ); lookAtCameraActor.SetType( Camera::LOOK_AT_TARGET ); lookAtCameraActor.SetTargetPosition( targetPosition ); - lookAtCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + lookAtCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); stage.Add( target ); stage.Add( freeLookCameraActor ); @@ -1636,12 +1636,12 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void) Vector2 stageSize = stage.GetSize(); CameraActor freeLookCameraActor = CameraActor::New( stageSize ); - freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); freeLookCameraActor.SetType( Camera::FREE_LOOK ); Vector3 targetPosition( 30.0f, 240.0f, -256.0f ); Actor target = Actor::New(); - target.SetParentOrigin( ParentOrigin::CENTER ); + target.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); target.SetPosition( targetPosition ); Constraint cameraOrientationConstraint = Constraint::New ( freeLookCameraActor, Actor::Property::ORIENTATION, &LookAt ); @@ -1653,7 +1653,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void) CameraActor lookAtCameraActor = CameraActor::New( stageSize ); lookAtCameraActor.SetType( Camera::LOOK_AT_TARGET ); lookAtCameraActor.SetTargetPosition( targetPosition ); - lookAtCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + lookAtCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); stage.Add( target ); stage.Add( freeLookCameraActor ); @@ -1681,7 +1681,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void) Matrix freeLookViewMatrix; freeLookCameraActor.GetProperty( CameraActor::CameraActor::Property::VIEW_MATRIX ).Get( freeLookViewMatrix ); - Matrix freeLookWorld = freeLookCameraActor.GetCurrentWorldMatrix(); + Matrix freeLookWorld = freeLookCameraActor.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ); Matrix freeLookTest( false ); Matrix::Multiply( freeLookTest, freeLookViewMatrix, freeLookWorld ); @@ -1704,7 +1704,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews03(void) CameraActor freeLookCameraActor = CameraActor::New( stageSize ); freeLookCameraActor.SetType( Camera::FREE_LOOK ); - freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER ); + freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Quaternion cameraOrientation( Radian( Degree( 180.0f ) ), Vector3::YAXIS ); freeLookCameraActor.SetPosition( cameraOffset ); @@ -1730,7 +1730,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews03(void) Matrix freeLookViewMatrix; freeLookCameraActor.GetProperty( CameraActor::CameraActor::Property::VIEW_MATRIX ).Get( freeLookViewMatrix ); - Matrix freeLookWorld = freeLookCameraActor.GetCurrentWorldMatrix(); + Matrix freeLookWorld = freeLookCameraActor.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ); Matrix freeLookTest( false ); Matrix::Multiply( freeLookTest, freeLookViewMatrix, freeLookWorld ); diff --git a/automated-tests/src/dali/utc-Dali-Constrainer.cpp b/automated-tests/src/dali/utc-Dali-Constrainer.cpp index 30a006a..30d5388 100644 --- a/automated-tests/src/dali/utc-Dali-Constrainer.cpp +++ b/automated-tests/src/dali/utc-Dali-Constrainer.cpp @@ -124,31 +124,31 @@ int UtcPathConstrainerApply(void) Vector3 position, tangent; path.Sample(0.2f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); path.Sample(0.4f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 60% progress */); path.Sample(0.6f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); path.Sample(0.8f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 100% progress */); path.Sample(1.0f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* beyond the animation duration*/); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); END_TEST; } @@ -191,7 +191,7 @@ int UtcPathConstrainerApplyRange(void) actor.GetCurrentProperty( index ).Get(tValue); float currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); @@ -199,34 +199,34 @@ int UtcPathConstrainerApplyRange(void) currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); path.Sample(0.5, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); actor.GetCurrentProperty( index ).Get( tValue ); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 100% progress */); actor.GetCurrentProperty( index ).Get( tValue ); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* beyond the animation duration*/); actor.GetCurrentProperty( index ).Get( tValue ); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); // Ensure GetProperty also returns the final result actor.GetProperty( index ).Get( tValue ); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); END_TEST; } @@ -261,7 +261,7 @@ int UtcPathConstrainerDestroy(void) Vector3 position, tangent; path.Sample(0.5f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); } @@ -270,7 +270,7 @@ int UtcPathConstrainerDestroy(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); END_TEST; } @@ -304,7 +304,7 @@ int UtcPathConstrainerRemove(void) Vector3 position, tangent; path.Sample(0.5f, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION ); //Remove constraint pathConstrainer.Remove( actor ); @@ -312,7 +312,7 @@ int UtcPathConstrainerRemove(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); END_TEST; } @@ -453,23 +453,23 @@ int UtcLinearConstrainerApply(void) application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 100% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* beyond the animation duration*/); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); //Setup a LinearConstrainer specifying the progress for each value linearConstrainer.Remove(actor); @@ -481,23 +481,23 @@ int UtcLinearConstrainerApply(void) application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 2.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 2.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 100% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* beyond the animation duration*/); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); END_TEST; } @@ -530,23 +530,23 @@ int UtcLinearConstrainerApplyRange(void) application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 100% progress */); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* beyond the animation duration*/); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); END_TEST; } @@ -575,7 +575,7 @@ int UtcLinearConstrainerDestroy(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); } @@ -584,7 +584,7 @@ int UtcLinearConstrainerDestroy(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); END_TEST; } @@ -612,7 +612,7 @@ int UtcLinearConstrainerRemove(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION ); //Remove constraint linearConstrainer.Remove( actor ); @@ -620,7 +620,7 @@ int UtcLinearConstrainerRemove(void) application.SendNotification(); application.Render(static_cast(1.0f)); - DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION ); END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-Constraint.cpp b/automated-tests/src/dali/utc-Dali-Constraint.cpp index f8f8ac5..b741255 100644 --- a/automated-tests/src/dali/utc-Dali-Constraint.cpp +++ b/automated-tests/src/dali/utc-Dali-Constraint.cpp @@ -768,7 +768,7 @@ int UtcDaliConstraintBakeRemoveAction(void) // Should not equal position by default Vector3 position( 10.0f, 20.0f, 30.0f ); - DALI_TEST_CHECK( actor.GetCurrentPosition() != position ); + DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position ); // Create a constraint that constrains to position Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, SetValueFunctor< Vector3 >( position ) ); @@ -778,7 +778,7 @@ int UtcDaliConstraintBakeRemoveAction(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); // Remove the constraint, it should still be at position constraint.Remove(); @@ -786,7 +786,7 @@ int UtcDaliConstraintBakeRemoveAction(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); END_TEST; } @@ -804,11 +804,11 @@ int UtcDaliConstraintDiscardRemoveAction(void) application.Render(); // Get and store current position - Vector3 originalPosition = actor.GetCurrentPosition(); + Vector3 originalPosition = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); // Should not equal position by default Vector3 position( 10.0f, 20.0f, 30.0f ); - DALI_TEST_CHECK( actor.GetCurrentPosition() != position ); + DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position ); // Create a constraint that constrains to position Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, SetValueFunctor< Vector3 >( position ) ); @@ -818,7 +818,7 @@ int UtcDaliConstraintDiscardRemoveAction(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION ); // Remove the constraint, it should still be at position constraint.Remove(); @@ -826,8 +826,8 @@ int UtcDaliConstraintDiscardRemoveAction(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), originalPosition, TEST_LOCATION ); - DALI_TEST_CHECK( actor.GetCurrentPosition() != position ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), originalPosition, TEST_LOCATION ); + DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position ); END_TEST; } @@ -1258,7 +1258,7 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void) // Check initial value is fully opaque application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Create a constraint whose value is discarded when it is removed Constraint constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, SetHalfOpacity ); @@ -1268,12 +1268,12 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void) // Check value after one render, it should be constrained application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Render another frame, ensure the other value has also been updated application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Remove the actor from the stage and delete the constraint actor.Unparent(); @@ -1283,7 +1283,7 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void) // Check value while off-stage, it should be fully opaque application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Add the actor back to the stage and check the value, it should be fully opaque again Stage::GetCurrent().Add( actor ); @@ -1291,12 +1291,12 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void) // Check value when back on-stage, it should be fully opaque as the constraint is no longer applied to it. application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Render for another frame to ensure both buffers have the correct value application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); END_TEST; } @@ -1313,7 +1313,7 @@ int UtcDaliConstraintOnActorAddedAndRemoved(void) // Check initial value is fully opaque application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Create a constraint whose value is discarded when it is removed Constraint constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, SetHalfOpacity ); @@ -1323,12 +1323,12 @@ int UtcDaliConstraintOnActorAddedAndRemoved(void) // Check value after one render, it should be constrained application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Render another frame, ensure the other value has also been updated application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Remove the actor from the stage actor.Unparent(); @@ -1336,23 +1336,23 @@ int UtcDaliConstraintOnActorAddedAndRemoved(void) // Check value while off-stage, the constraint is no longer being applied as it's off-stage application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Check the other buffer, the constraint should not be applied to this either. application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION ); // Add the actor back to the stage and check the value, the constraint should have been re-applied Stage::GetCurrent().Add( actor ); application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); // Render for another frame to ensure both buffers have the correct value application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION ); END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-Constraints.cpp b/automated-tests/src/dali/utc-Dali-Constraints.cpp index 06c8a2e..9e0dfd2 100644 --- a/automated-tests/src/dali/utc-Dali-Constraints.cpp +++ b/automated-tests/src/dali/utc-Dali-Constraints.cpp @@ -333,7 +333,7 @@ int UtcDaliConstraintsLookAt(void) TestApplication application; Actor actor = Actor::New(); - DALI_TEST_EQUALS( actor.GetCurrentWorldOrientation(), Quaternion::IDENTITY, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion::IDENTITY, TEST_LOCATION ); Vector3 targetPosition; Vector3 cameraPosition; diff --git a/automated-tests/src/dali/utc-Dali-Context.cpp b/automated-tests/src/dali/utc-Dali-Context.cpp index 0b8e151..1a6f094 100644 --- a/automated-tests/src/dali/utc-Dali-Context.cpp +++ b/automated-tests/src/dali/utc-Dali-Context.cpp @@ -48,7 +48,7 @@ static Actor CreateBitmapActor() BufferImage image = BufferImage::New(4,4,Pixel::RGBA8888); Actor actor = CreateRenderableActor( image ); actor.SetSize( 100.0f, 100.0f ); - actor.SetName("Test Image Rendering Actor"); + actor.SetProperty( Actor::Property::NAME,"Test Image Rendering Actor"); return actor; } diff --git a/automated-tests/src/dali/utc-Dali-CustomActor.cpp b/automated-tests/src/dali/utc-Dali-CustomActor.cpp index ce6d317..e109d49 100644 --- a/automated-tests/src/dali/utc-Dali-CustomActor.cpp +++ b/automated-tests/src/dali/utc-Dali-CustomActor.cpp @@ -159,70 +159,83 @@ int UtcDaliCustomActorOnStageConnectionOrder(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::New(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); Test::TestCustomActor actorC = Test::TestCustomActor::New(); - actorC.SetName( "ActorC" ); + actorC.SetProperty( Actor::Property::NAME, "ActorC" ); actorA.Add( actorC ); Test::TestCustomActor actorD = Test::TestCustomActor::New(); - actorD.SetName( "ActorD" ); + actorD.SetProperty( Actor::Property::NAME, "ActorD" ); actorB.Add( actorD ); Test::TestCustomActor actorE = Test::TestCustomActor::New(); - actorE.SetName( "ActorE" ); + actorE.SetProperty( Actor::Property::NAME, "ActorE" ); actorB.Add( actorE ); Test::TestCustomActor actorF = Test::TestCustomActor::New(); - actorF.SetName( "ActorF" ); + actorF.SetProperty( Actor::Property::NAME, "ActorF" ); actorC.Add( actorF ); // add the custom actor to stage Stage::GetCurrent().Add( actorA ); - DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 2, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorC.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorC.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 3, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorC.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorC.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorC.GetMethodsCalled()[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 1, (int)(actorD.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorD.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorD.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorD.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorD.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 1, (int)(actorE.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorE.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorE.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorE.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorE.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 1, (int)(actorF.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorF.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorF.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorF.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorF.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // Check sequence is correct in MasterCallStack - DALI_TEST_EQUALS( 3+3+2+1+1+1, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 4+4+3+2+2+2, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorC: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorC: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorD: OnPropertySet", MasterCallStack[ 5 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 5 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 6 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorD: OnStageConnection", MasterCallStack[ 7 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorE: OnStageConnection", MasterCallStack[ 8 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorC: OnStageConnection", MasterCallStack[ 9 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorF: OnStageConnection", MasterCallStack[ 10 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorE: OnPropertySet", MasterCallStack[ 7 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 8 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorF: OnPropertySet", MasterCallStack[ 9 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorC: OnChildAdd", MasterCallStack[ 10 ], TEST_LOCATION ); + + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 11 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 12 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorD: OnStageConnection", MasterCallStack[ 13 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorE: OnStageConnection", MasterCallStack[ 14 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorC: OnStageConnection", MasterCallStack[ 15 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorF: OnStageConnection", MasterCallStack[ 16 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -251,27 +264,27 @@ int UtcDaliCustomActorOnStageDisconnectionOrder(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::New(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); Test::TestCustomActor actorC = Test::TestCustomActor::New(); - actorC.SetName( "ActorC" ); + actorC.SetProperty( Actor::Property::NAME, "ActorC" ); actorA.Add( actorC ); Test::TestCustomActor actorD = Test::TestCustomActor::New(); - actorD.SetName( "ActorD" ); + actorD.SetProperty( Actor::Property::NAME, "ActorD" ); actorB.Add( actorD ); Test::TestCustomActor actorE = Test::TestCustomActor::New(); - actorE.SetName( "ActorE" ); + actorE.SetProperty( Actor::Property::NAME, "ActorE" ); actorB.Add( actorE ); Test::TestCustomActor actorF = Test::TestCustomActor::New(); - actorF.SetName( "ActorF" ); + actorF.SetProperty( Actor::Property::NAME, "ActorF" ); actorC.Add( actorF ); // Excercise the message passing to Update thread @@ -342,26 +355,30 @@ int UtcDaliCustomActorAddDuringOnStageConnection(void) */ Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant1( actorB ); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); // Check callback sequence - DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // Called from within OnStageConnection() + DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // Called from within OnStageConnection() - DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 3, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 5, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); // Occurs during Actor::Add from within from within OnStageConnection() - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); // Occurs after Actor::Add from within from within OnStageConnection() + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); // Occurs during Actor::Add from within from within OnStageConnection() + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); // Occurs after Actor::Add from within from within OnStageConnection() // Excercise the message passing to Update thread @@ -392,40 +409,44 @@ int UtcDaliCustomActorRemoveDuringOnStageConnection(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant2(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); Test::TestCustomActor actorC = Test::TestCustomActor::New(); - actorC.SetName( "ActorC" ); + actorC.SetProperty( Actor::Property::NAME, "ActorC" ); actorA.Add( actorC ); stage.Add( actorA ); // Check callback sequence - DALI_TEST_EQUALS( 5, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 6, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // Called from within OnStageConnection() + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 4 ], TEST_LOCATION ); // Called from within OnStageConnection() + DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 5 ], TEST_LOCATION ); // Called from within OnStageConnection() - DALI_TEST_EQUALS( 5, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 8, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorC: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 5 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 7 ], TEST_LOCATION ); /* Actors B & C should be removed before the point where they could receive an OnStageConnection callback * Therefore they shouldn't receive either OnStageConnection or OnStageDisconnection */ - DALI_TEST_EQUALS( 0, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( 0, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 1, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 1, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION ); // Excercise the message passing to Update thread @@ -454,10 +475,10 @@ int UtcDaliCustomActorAddDuringOnStageDisconnection(void) */ Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant3( actorB ); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); // Excercise the message passing to Update thread @@ -507,11 +528,11 @@ int UtcDaliCustomActorRemoveDuringOnStageDisconnection(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant4(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); // Excercise the message passing to Update thread @@ -565,30 +586,34 @@ int UtcDaliCustomActorRemoveParentDuringOnStageConnection(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::New(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); Test::TestCustomActor actorB = Test::TestCustomActor::NewVariant5(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); stage.Add( actorA ); // Check callback sequence - DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageDisconnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageDisconnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 1, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 4, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageDisconnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageDisconnection", MasterCallStack[ 5 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -613,32 +638,36 @@ int UtcDaliCustomActorAddParentDuringOnStageDisconnection(void) */ Test::TestCustomActor actorA = Test::TestCustomActor::New(); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); Test::TestCustomActor actorB = Test::TestCustomActor::NewVariant6(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); stage.Remove( actorA ); // Check callback sequence - DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // Disconnect was interrupted, so we should only get one OnStageConnection() for actorB - DALI_TEST_EQUALS( 4, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 5 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -686,7 +715,7 @@ int UtcDaliCustomActorReparentDuringOnChildAdd(void) stage.Add( actorA ); Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); actorA.Add( actorB ); // Check hierarchy is as follows: @@ -704,7 +733,7 @@ int UtcDaliCustomActorReparentDuringOnChildAdd(void) DALI_TEST_CHECK( container ); if ( container ) { - DALI_TEST_EQUALS( "Container", container.GetName(), TEST_LOCATION ); + DALI_TEST_EQUALS( "Container", container.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION ); DALI_TEST_EQUALS( 1, (int)(container.GetChildCount()), TEST_LOCATION ); containerChild = container.GetChildAt(0); } @@ -712,33 +741,37 @@ int UtcDaliCustomActorReparentDuringOnChildAdd(void) DALI_TEST_CHECK( containerChild ); if ( containerChild ) { - DALI_TEST_EQUALS( "ActorB", containerChild.GetName(), TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB", containerChild.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION ); DALI_TEST_EQUALS( 0, (int)(containerChild.GetChildCount()), TEST_LOCATION ); } // Check callback sequence - DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); // The mContainer added to actorA - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // The actorB added to actorA - DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 5, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // The mContainer added to actorA + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // The actorB added to actorA + DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 4 ], TEST_LOCATION ); // mContainer will then receive OnChildAdd - DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 7, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 9, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 4 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 5 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 5 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 7 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 8 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -767,15 +800,15 @@ int UtcDaliCustomActorRemoveDuringOnChildRemove(void) */ Test::TestCustomActor actorB = Test::TestCustomActor::New(); - actorB.SetName( "ActorB" ); + actorB.SetProperty( Actor::Property::NAME, "ActorB" ); stage.Add( actorB ); Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant8( actorB ); - actorA.SetName( "ActorA" ); + actorA.SetProperty( Actor::Property::NAME, "ActorA" ); stage.Add( actorA ); Actor childActor = Actor::New(); - childActor.SetName( "Child" ); + childActor.SetProperty( Actor::Property::NAME, "Child" ); // Reparent from actorA to actorB actorA.Add( childActor ); actorB.Add( childActor ); @@ -794,32 +827,36 @@ int UtcDaliCustomActorRemoveDuringOnChildRemove(void) DALI_TEST_CHECK( child ); if ( child ) { - DALI_TEST_EQUALS( "Child", child.GetName(), TEST_LOCATION ); + DALI_TEST_EQUALS( "Child", child.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION ); } // Check callback sequence - DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); // The mContainer added to actorA - DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // The actorB added to actorA + DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // The mContainer added to actorA + DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // The actorB added to actorA // mContainer will then receive OnChildAdd - DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION ); + DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // The derived class are always notified, no matter the child is successfully removed or not - DALI_TEST_EQUALS( "OnChildRemove", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildRemove", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION ); - DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION ); + DALI_TEST_EQUALS( 8, (int)(MasterCallStack.size()), TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 2 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 5 ], TEST_LOCATION ); // The derived class are always notified, no matter the child is successfully removed or not - DALI_TEST_EQUALS( "ActorB: OnChildRemove", MasterCallStack[ 4 ], TEST_LOCATION ); - DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 5 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnChildRemove", MasterCallStack[ 6 ], TEST_LOCATION ); + DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 7 ], TEST_LOCATION ); // Excercise the message passing to Update thread @@ -1064,8 +1101,8 @@ int UtcDaliCustomActorDoAction(void) DALI_TEST_CHECK(customActorObject.DoAction("invalidCommand", attributes) == false); // Check that the custom actor is visible - custom.SetVisible(true); - DALI_TEST_CHECK(custom.IsVisible() == true); + custom.SetProperty( Actor::Property::VISIBLE,true); + DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); // Check the custom actor performed an action to hide itself DALI_TEST_CHECK(customActorObject.DoAction("hide", attributes) == true); @@ -1075,7 +1112,7 @@ int UtcDaliCustomActorDoAction(void) application.Render(); // Check that the custom actor is now invisible - DALI_TEST_CHECK(custom.IsVisible() == false); + DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false); // Check the custom actor performed an action to show itself DALI_TEST_CHECK(customActorObject.DoAction("show", attributes) == true); @@ -1085,7 +1122,7 @@ int UtcDaliCustomActorDoAction(void) application.Render(); // Check that the custom actor is now visible - DALI_TEST_CHECK(custom.IsVisible() == true); + DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true); END_TEST; } @@ -1447,11 +1484,11 @@ int UtcDaliCustomActorSetGetActorPropertyActionSignal(void) auto actorHandle = Actor::New(); DALI_TEST_EQUALS( custom.GetPropertyCount(), actorHandle.GetPropertyCount(), TEST_LOCATION ); - DALI_TEST_EQUALS( custom.IsVisible(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); custom.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); // IsVisible returns scene value - DALI_TEST_EQUALS( custom.IsVisible(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); // should have custom actor typename (as it has not registered itself) DALI_TEST_EQUALS( "CustomActor", custom.GetTypeName(), TEST_LOCATION ); @@ -1469,7 +1506,7 @@ int UtcDaliCustomActorSetGetActorPropertyActionSignal(void) application.Render(1000.f); DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetProperty( Actor::Property::POSITION ).Get(), TEST_LOCATION ); - DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION ); Dali::WeakHandle weakRef( custom ); // should have actor signals diff --git a/automated-tests/src/dali/utc-Dali-FrameCallbackInterface.cpp b/automated-tests/src/dali/utc-Dali-FrameCallbackInterface.cpp index d854148..85dae6a 100644 --- a/automated-tests/src/dali/utc-Dali-FrameCallbackInterface.cpp +++ b/automated-tests/src/dali/utc-Dali-FrameCallbackInterface.cpp @@ -311,10 +311,10 @@ int UtcDaliFrameCallbackGetters(void) Vector3 scale( 2.0f, 4.0f, 6.0f ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( actorSize ); - actor.SetColor( color ); + actor.SetProperty( Actor::Property::COLOR, color ); actor.SetPosition( position ); actor.SetScale( scale ); @@ -346,8 +346,8 @@ int UtcDaliFrameCallbackSetters(void) Vector2 actorSize( 200, 300 ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( actorSize ); Stage stage = Stage::GetCurrent(); @@ -410,8 +410,8 @@ int UtcDaliFrameCallbackBake(void) Vector2 actorSize( 200, 300 ); Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( actorSize ); Stage stage = Stage::GetCurrent(); @@ -506,57 +506,57 @@ int UtcDaliFrameCallbackMultipleActors(void) positions['H'] = Vector3( 20.0f, 21.0f, 22.0f ); Actor actorA = Actor::New(); - actorA.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actorA.SetSize( sizes['A'] ); actorA.SetPosition( positions['A'] ); stage.Add( actorA ); Actor actorB = Actor::New(); - actorB.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT ); - actorB.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT ); + actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actorB.SetSize( sizes['B'] ); actorB.SetPosition( positions['B'] ); actorA.Add( actorB ); Actor actorC = Actor::New(); - actorC.SetParentOrigin( ParentOrigin::BOTTOM_CENTER ); - actorC.SetAnchorPoint( AnchorPoint::TOP_CENTER ); + actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); + actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); actorC.SetSize( sizes['C'] ); actorC.SetPosition( positions['C'] ); actorB.Add( actorC ); Actor actorD = Actor::New(); - actorD.SetParentOrigin( ParentOrigin::CENTER_RIGHT ); - actorD.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + actorD.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_RIGHT ); + actorD.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); actorD.SetSize( sizes['D'] ); actorD.SetPosition( positions['D'] ); actorA.Add( actorD ); Actor actorE = Actor::New(); - actorE.SetParentOrigin( ParentOrigin::BOTTOM_LEFT ); - actorE.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); + actorE.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); + actorE.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); actorE.SetSize( sizes['E'] ); actorE.SetPosition( positions['E'] ); stage.Add( actorE ); Actor actorF = Actor::New(); - actorF.SetParentOrigin( ParentOrigin::TOP_CENTER ); - actorF.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER ); + actorF.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); + actorF.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); actorF.SetSize( sizes['F'] ); actorF.SetPosition( positions['F'] ); actorE.Add( actorF ); Actor actorG = Actor::New(); - actorG.SetParentOrigin( ParentOrigin::CENTER_RIGHT ); - actorG.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); + actorG.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_RIGHT ); + actorG.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); actorG.SetSize( sizes['G'] ); actorG.SetPosition( positions['G'] ); actorE.Add( actorG ); Actor actorH = Actor::New(); - actorH.SetParentOrigin( ParentOrigin::TOP_RIGHT ); - actorH.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); + actorH.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); + actorH.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); actorH.SetSize( sizes['H'] ); actorH.SetPosition( positions['H'] ); actorG.Add( actorH ); @@ -612,8 +612,8 @@ int UtcDaliFrameCallbackCheckActorNotAdded(void) TestApplication application; Actor actor = Actor::New(); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( 200, 300 ); Stage stage = Stage::GetCurrent(); diff --git a/automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp b/automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp index b65fe6e..fed4521 100644 --- a/automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp +++ b/automated-tests/src/dali/utc-Dali-HitTestAlgorithm.cpp @@ -40,11 +40,11 @@ bool IsActorHittableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType t case Dali::HitTestAlgorithm::CHECK_ACTOR: { // Check whether the actor is visible and not fully transparent. - if( actor.IsVisible() - && actor.GetCurrentWorldColor().a > 0.01f) // not FULLY_TRANSPARENT + if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) + && actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f) // not FULLY_TRANSPARENT { // Check whether the actor has the specific name "HittableActor" - if(actor.GetName() == "HittableActor") + if(actor.GetProperty< std::string >( Actor::Property::NAME ) == "HittableActor") { hittable = true; } @@ -53,7 +53,7 @@ bool IsActorHittableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType t } case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE: { - if( actor.IsVisible() ) // Actor is visible, if not visible then none of its children are visible. + if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ) // Actor is visible, if not visible then none of its children are visible. { hittable = true; } @@ -77,9 +77,9 @@ bool DefaultIsActorTouchableFunction(Dali::Actor actor, Dali::HitTestAlgorithm:: { case Dali::HitTestAlgorithm::CHECK_ACTOR: { - if( actor.IsVisible() && - actor.IsSensitive() && - actor.GetCurrentWorldColor().a > 0.01f) + if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) && + actor.GetProperty< bool >( Actor::Property::SENSITIVE ) && + actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f) { hittable = true; } @@ -87,8 +87,8 @@ bool DefaultIsActorTouchableFunction(Dali::Actor actor, Dali::HitTestAlgorithm:: } case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE: { - if( actor.IsVisible() && // Actor is visible, if not visible then none of its children are visible. - actor.IsSensitive()) // Actor is sensitive, if insensitive none of its children should be hittable either. + if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) && // Actor is visible, if not visible then none of its children are visible. + actor.GetProperty< bool >( Actor::Property::SENSITIVE )) // Actor is sensitive, if insensitive none of its children should be hittable either. { hittable = true; } @@ -116,8 +116,8 @@ int UtcDaliHitTestAlgorithmWithFunctor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - actor.SetName("NonHittableActor"); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::NAME,"NonHittableActor"); stage.Add(actor); // Render and notify @@ -133,7 +133,7 @@ int UtcDaliHitTestAlgorithmWithFunctor(void) Dali::HitTestAlgorithm::HitTest( stage, screenCoordinates, results, IsActorHittableFunction ); DALI_TEST_CHECK( results.actor != actor ); - actor.SetName("HittableActor"); + actor.SetProperty( Actor::Property::NAME,"HittableActor"); results.actor = Actor(); results.actorCoordinates = Vector2::ZERO; @@ -162,16 +162,16 @@ int UtcDaliHitTestAlgorithmOrtho01(void) Vector2 actorSize( stageSize * 0.5f ); // Create two actors with half the size of the stage and set them to be partially overlapping Actor blue = Actor::New(); - blue.SetName( "Blue" ); - blue.SetAnchorPoint( AnchorPoint::CENTER ); - blue.SetParentOrigin( Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) ); + blue.SetProperty( Actor::Property::NAME, "Blue" ); + blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) ); blue.SetSize( actorSize ); blue.SetZ(30.0f); Actor green = Actor::New( ); - green.SetName( "Green" ); - green.SetAnchorPoint( AnchorPoint::CENTER ); - green.SetParentOrigin( Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) ); + green.SetProperty( Actor::Property::NAME, "Green" ); + green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) ); green.SetSize( actorSize ); // Add the actors to the view @@ -218,16 +218,16 @@ int UtcDaliHitTestAlgorithmOrtho02(void) Vector2 actorSize( stageSize * 0.5f ); // Create two actors with half the size of the stage and set them to be partially overlapping Actor blue = Actor::New(); - blue.SetName( "Blue" ); - blue.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - blue.SetParentOrigin( Vector3(0.2f, 0.2f, 0.5f) ); + blue.SetProperty( Actor::Property::NAME, "Blue" ); + blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.2f, 0.2f, 0.5f) ); blue.SetSize( actorSize ); blue.SetZ(30.0f); Actor green = Actor::New( ); - green.SetName( "Green" ); - green.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - green.SetParentOrigin( Vector3(0.4f, 0.4f, 0.5f) ); + green.SetProperty( Actor::Property::NAME, "Green" ); + green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.4f, 0.4f, 0.5f) ); green.SetSize( actorSize ); // Add the actors to the view @@ -278,30 +278,30 @@ int UtcDaliHitTestAlgorithmClippingActor(void) Stage stage = Stage::GetCurrent(); Actor rootLayer = stage.GetRootLayer(); - rootLayer.SetName( "RootLayer" ); + rootLayer.SetProperty( Actor::Property::NAME, "RootLayer" ); // Create a layer Layer layer = Layer::New(); - layer.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - layer.SetParentOrigin( ParentOrigin::TOP_LEFT ); - layer.SetName( "layer" ); + layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + layer.SetProperty( Actor::Property::NAME, "layer" ); stage.Add( layer ); // Create a clipping actor and add it to the layer. Actor clippingActor = CreateRenderableActor( Dali::BufferImage::WHITE() ); - clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - clippingActor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); clippingActor.SetSize( 50.0f, 50.0f ); clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); - clippingActor.SetName( "clippingActor" ); + clippingActor.SetProperty( Actor::Property::NAME, "clippingActor" ); layer.Add( clippingActor ); // Create a renderable actor and add it to the clipping actor. Actor childActor = CreateRenderableActor( Dali::BufferImage::WHITE() ); childActor.SetSize( 100.0f, 100.0f ); - childActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - childActor.SetParentOrigin( ParentOrigin::TOP_LEFT ); - childActor.SetName( "childActor" ); + childActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + childActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); + childActor.SetProperty( Actor::Property::NAME, "childActor" ); clippingActor.Add( childActor ); // Render and notify @@ -312,12 +312,12 @@ int UtcDaliHitTestAlgorithmClippingActor(void) HitTestAlgorithm::Results results; HitTest( stage, Vector2( 10.0f, 10.0f ), results, &DefaultIsActorTouchableFunction ); DALI_TEST_CHECK( results.actor == childActor ); - tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetName().c_str() : "NULL" ) ); + tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetProperty< std::string >( Actor::Property::NAME ).c_str() : "NULL" ) ); // Hit within childActor but outside of clippingActor, should hit the root-layer instead. HitTest( stage, Vector2( 60.0f, 60.0f ), results, &DefaultIsActorTouchableFunction); DALI_TEST_CHECK( results.actor == rootLayer ); - tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetName().c_str() : "NULL" ) ); + tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetProperty< std::string >( Actor::Property::NAME ).c_str() : "NULL" ) ); END_TEST; } @@ -340,16 +340,16 @@ int UtcDaliHitTestAlgorithmOverlay(void) // Create two actors with half the size of the stage and set them to be partially overlapping Actor blue = Actor::New(); blue.SetDrawMode( DrawMode::OVERLAY_2D ); - blue.SetName( "Blue" ); - blue.SetAnchorPoint( AnchorPoint::CENTER ); - blue.SetParentOrigin( Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) ); + blue.SetProperty( Actor::Property::NAME, "Blue" ); + blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) ); blue.SetSize( actorSize ); blue.SetZ(30.0f); Actor green = Actor::New( ); - green.SetName( "Green" ); - green.SetAnchorPoint( AnchorPoint::CENTER ); - green.SetParentOrigin( Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) ); + green.SetProperty( Actor::Property::NAME, "Green" ); + green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) ); green.SetSize( actorSize ); // Add the actors to the view diff --git a/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp b/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp index df73182..9e543ac 100644 --- a/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp @@ -137,7 +137,7 @@ int UtcDaliHoverNormalProcessing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -206,8 +206,8 @@ int UtcDaliHoverOutsideCameraNearFarPlanes(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetParentOrigin(ParentOrigin::CENTER); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); stage.Add(actor); // Render and notify @@ -307,7 +307,7 @@ int UtcDaliHoverInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -344,7 +344,7 @@ int UtcDaliHoverParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -444,7 +444,7 @@ int UtcDaliHoverInterruptedParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -521,7 +521,7 @@ int UtcDaliHoverLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -534,7 +534,7 @@ int UtcDaliHoverLeave(void) actor.HoveredSignal().Connect( &application, functor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a started signal application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); @@ -560,7 +560,7 @@ int UtcDaliHoverLeave(void) data.Reset(); // We do not want to listen to leave events anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of actor, no signalling application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -576,7 +576,7 @@ int UtcDaliHoverLeaveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -594,8 +594,8 @@ int UtcDaliHoverLeaveParentConsumer(void) rootActor.HoveredSignal().Connect( &application, rootFunctor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); - rootActor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); + rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a started signal application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); @@ -640,7 +640,7 @@ int UtcDaliHoverLeaveParentConsumer(void) rootData.Reset(); // We do not want to listen to leave events of actor anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of root actor, only root signalled Vector2 stageSize( Stage::GetCurrent().GetSize() ); @@ -657,7 +657,7 @@ int UtcDaliHoverActorBecomesInsensitive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -676,7 +676,7 @@ int UtcDaliHoverActorBecomesInsensitive(void) data.Reset(); // Change actor to insensitive - actor.SetSensitive( false ); + actor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -693,7 +693,7 @@ int UtcDaliHoverActorBecomesInsensitiveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -729,7 +729,7 @@ int UtcDaliHoverActorBecomesInsensitiveParentConsumer(void) application.Render(); // Make root actor insensitive - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor) application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -750,12 +750,12 @@ int UtcDaliHoverMultipleLayers(void) Layer layer1 ( Layer::New() ); layer1.SetSize(100.0f, 100.0f); - layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer1 ); Actor actor1 ( Actor::New() ); actor1.SetSize( 100.0f, 100.0f ); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor1.SetZ( 1.0f ); // Should hit actor1 in this layer layer1.Add( actor1 ); @@ -774,37 +774,37 @@ int UtcDaliHoverMultipleLayers(void) data.Reset(); // Make layer1 insensitive, nothing should be hit - layer1.SetSensitive( false ); + layer1.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make layer1 sensitive again, again actor1 will be hit - layer1.SetSensitive( true ); + layer1.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.hoveredActor == actor1 ); data.Reset(); // Make rootActor insensitive, nothing should be hit - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make rootActor sensitive - rootActor.SetSensitive( true ); + rootActor.SetProperty( Actor::Property::SENSITIVE, true ); // Add another layer Layer layer2 ( Layer::New() ); layer2.SetSize(100.0f, 100.0f ); - layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2 Stage::GetCurrent().Add( layer2 ); Actor actor2 ( Actor::New() ); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.Add( actor2 ); // Render and notify @@ -822,21 +822,21 @@ int UtcDaliHoverMultipleLayers(void) data.Reset(); // Make layer2 insensitive, should hit actor1 - layer2.SetSensitive( false ); + layer2.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.hoveredActor == actor1 ); data.Reset(); // Make layer2 sensitive again, should hit layer2 - layer2.SetSensitive( true ); + layer2.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); //DALI_TEST_CHECK( data.hoveredActor == layer2 ); // TODO: Uncomment this after removing renderable hack! data.Reset(); // Make layer2 invisible, render and notify - layer2.SetVisible( false ); + layer2.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -847,7 +847,7 @@ int UtcDaliHoverMultipleLayers(void) data.Reset(); // Make rootActor invisible, render and notify - rootActor.SetVisible( false ); + rootActor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -866,7 +866,7 @@ int UtcDaliHoverMultipleRenderTasks(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Create render task @@ -910,12 +910,12 @@ int UtcDaliHoverMultipleRenderTasksWithChildLayer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.Add(layer); // Create render task @@ -964,14 +964,14 @@ int UtcDaliHoverOffscreenRenderTasks(void) // Create a renderable actor to display the FrameBufferImage Actor renderableActor = CreateRenderableActor( frameBufferImage ); - renderableActor.SetParentOrigin(ParentOrigin::CENTER); + renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); renderableActor.SetSize( stageSize.x, stageSize.y ); renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME stage.Add( renderableActor ); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add( actor ); application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects @@ -1011,12 +1011,12 @@ int UtcDaliHoverMultipleRenderableActors(void) Actor parent = CreateRenderableActor(); parent.SetSize( 100.0f, 100.0f ); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(parent); Actor actor = CreateRenderableActor(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1042,7 +1042,7 @@ int UtcDaliHoverActorRemovedInSignal(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1055,7 +1055,7 @@ int UtcDaliHoverActorRemovedInSignal(void) actor.HoveredSignal().Connect( &application, functor ); // Register for leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a started signal application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); @@ -1111,7 +1111,7 @@ int UtcDaliHoverActorSignalNotConsumed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1135,7 +1135,7 @@ int UtcDaliHoverActorUnStaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1173,11 +1173,11 @@ int UtcDaliHoverLeaveActorReadded(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Set actor to receive hover-events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Render and notify application.SendNotification(); @@ -1219,12 +1219,12 @@ int UtcDaliHoverClippingActor(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); stage.Add( actor ); Actor clippingActor = Actor::New(); clippingActor.SetSize( 50.0f, 50.0f ); - clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); stage.Add( clippingActor ); @@ -1232,7 +1232,7 @@ int UtcDaliHoverClippingActor(void) Actor clippingChild = Actor::New(); clippingChild.SetSize( 50.0f, 50.0f ); clippingChild.SetPosition( 25.0f, 25.0f ); - clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.Add( clippingChild ); // Render and notify. diff --git a/automated-tests/src/dali/utc-Dali-Layer.cpp b/automated-tests/src/dali/utc-Dali-Layer.cpp index 9b3e5a4..65abc00 100644 --- a/automated-tests/src/dali/utc-Dali-Layer.cpp +++ b/automated-tests/src/dali/utc-Dali-Layer.cpp @@ -265,9 +265,9 @@ int UtcDaliLayerSetSortFunction(void) Actor actor = CreateRenderableActor( img ); Actor actor2 = CreateRenderableActor( img ); actor.SetSize(1,1); - actor.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent + actor.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent actor2.SetSize(1,1); - actor2.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent + actor2.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent // add to stage Stage::GetCurrent().Add( actor ); @@ -609,8 +609,8 @@ Actor CreateActor( bool withAlpha ) } Actor actor = CreateRenderableActor( bufferImage ); - actor.SetParentOrigin( ParentOrigin::CENTER ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); return actor; } diff --git a/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp index 2f9773e..1c52e57 100644 --- a/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp @@ -197,7 +197,7 @@ int UtcDaliLongPressGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -278,7 +278,7 @@ int UtcDaliLongPressGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -306,7 +306,7 @@ int UtcDaliLongPressGestureSignalReceptionPositive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -335,7 +335,7 @@ int UtcDaliLongPressGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -390,7 +390,7 @@ int UtcDaliLongPressGestureSignalReceptionActorDestroyedDuringLongPress(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -478,7 +478,7 @@ int UtcDaliLongPressGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -486,8 +486,8 @@ int UtcDaliLongPressGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -533,13 +533,13 @@ int UtcDaliLongPressGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -590,7 +590,7 @@ int UtcDaliLongPressGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -610,7 +610,7 @@ int UtcDaliLongPressGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor becomes invisible - actor should not receive the next long press - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -630,7 +630,7 @@ int UtcDaliLongPressGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -664,7 +664,7 @@ int UtcDaliLongPressGestureSignalReceptionDifferentPossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -723,7 +723,7 @@ int UtcDaliLongPressGesturePossibleCancelled(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -751,7 +751,7 @@ int UtcDaliLongPressGestureDetachAfterStarted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -785,7 +785,7 @@ int UtcDaliLongPressGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -839,14 +839,14 @@ int UtcDaliLongPressGestureActorStagedAndDestroyed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); - dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify @@ -919,7 +919,7 @@ int UtcDaliLongPressGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a detector @@ -932,7 +932,7 @@ int UtcDaliLongPressGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); @@ -973,7 +973,7 @@ int UtcDaliLongPressGestureSetMinimumHoldingTime(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp index e07f1f6..0611107 100644 --- a/automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp @@ -123,7 +123,7 @@ int UtcDaliLongPressGestureRecognizerBasicNoAction(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -155,7 +155,7 @@ int UtcDaliLongPressGestureRecognizerBasic(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -187,7 +187,7 @@ int UtcDaliLongPressGestureRecognizerTooShortWait(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -219,7 +219,7 @@ int UtcDaliLongPressGestureRecognizerTooFewPoints(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -252,7 +252,7 @@ int UtcDaliLongPressGestureRecognizerTooManyPoints(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -288,7 +288,7 @@ int UtcDaliLongPressGestureRecognizerMultiplePointsMoving(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -328,7 +328,7 @@ int UtcDaliLongPressGestureRecognizerMultiplePointsLongPress(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -362,12 +362,12 @@ int UtcDaliLongPressGestureRecognizerMultipleDetectors(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor2.SetX(100.0f); Stage::GetCurrent().Add(actor2); diff --git a/automated-tests/src/dali/utc-Dali-NativeImage.cpp b/automated-tests/src/dali/utc-Dali-NativeImage.cpp index 089ab4e..94636d7 100644 --- a/automated-tests/src/dali/utc-Dali-NativeImage.cpp +++ b/automated-tests/src/dali/utc-Dali-NativeImage.cpp @@ -167,7 +167,7 @@ int UtcDaliNativeImageTestCreationFailure(void) nativeImageInterface->SetGlExtensionCreateResult( false ); Actor actor = CreateRenderableActor( nativeImage ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); Stage::GetCurrent().Add( actor ); TestGlAbstraction& gl = application.GetGlAbstraction(); diff --git a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp index dc0a402..3885dc0 100644 --- a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp @@ -256,7 +256,7 @@ int UtcDaliPanGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); detector.Attach(actor); Stage::GetCurrent().Add(actor); @@ -317,7 +317,7 @@ int UtcDaliPanGestureSetMinimumTouchesRequired(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -359,7 +359,7 @@ int UtcDaliPanGestureSetMaximumTouchesRequired(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -403,7 +403,7 @@ int UtcDaliPanGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -443,7 +443,7 @@ int UtcDaliPanGestureSignalReceptionDownMotionLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -518,7 +518,7 @@ int UtcDaliPanGestureSignalReceptionDownMotionUp(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -579,7 +579,7 @@ int UtcDaliPanGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -635,7 +635,7 @@ int UtcDaliPanGestureSignalReceptionDetachWhilePanning(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -690,7 +690,7 @@ int UtcDaliPanGestureSignalReceptionActorDestroyedWhilePanning(void) // is destroyed. Actor tempActor = Actor::New(); tempActor.SetSize(100.0f, 100.0f); - tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(tempActor); detector.Attach(tempActor); @@ -700,7 +700,7 @@ int UtcDaliPanGestureSignalReceptionActorDestroyedWhilePanning(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -810,7 +810,7 @@ int UtcDaliPanGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -818,8 +818,8 @@ int UtcDaliPanGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -873,13 +873,13 @@ int UtcDaliPanGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -936,7 +936,7 @@ int UtcDaliPanGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -965,7 +965,7 @@ int UtcDaliPanGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor become invisible - actor should not receive the next pan - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -986,12 +986,12 @@ int UtcDaliPanGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); // Render and notify @@ -1072,7 +1072,7 @@ int UtcDaliPanGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor1 = Actor::New(); actor1.SetSize(100.0f, 100.0f); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor1); SignalData data1; GestureReceivedFunctor functor1(data1); @@ -1082,8 +1082,8 @@ int UtcDaliPanGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); - actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); SignalData data2; GestureReceivedFunctor functor2(data2); @@ -1112,7 +1112,7 @@ int UtcDaliPanGestureSignalReceptionAttachActorAfterDown(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1160,13 +1160,13 @@ int UtcDaliPanGestureSignalReceptionAttachActorAfterDownAfterInitialPanToAnother Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( parent ); Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); parent.Add( child ); // Create detector for parent and attach @@ -1232,7 +1232,7 @@ int UtcDaliPanGestureSignalReceptionDifferentPossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1301,7 +1301,7 @@ int UtcDaliPanGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1401,14 +1401,14 @@ int UtcDaliPanGestureActorStagedAndDestroyed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); - dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify @@ -1642,12 +1642,12 @@ int UtcDaliPanGestureAngleProcessing(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::TOP_LEFT); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(child); // Render and notify @@ -1775,12 +1775,12 @@ int UtcDaliPanGestureDirectionProcessing(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::TOP_LEFT); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(child); // Render and notify @@ -1890,7 +1890,7 @@ int UtcDaliPanGestureNoPredictionNoSmoothing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -1953,7 +1953,7 @@ int UtcDaliPanGestureNoPredictionSmoothing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2017,7 +2017,7 @@ int UtcDaliPanGesturePredictionNoSmoothing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2080,7 +2080,7 @@ int UtcDaliPanGesturePredictionSmoothing01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2146,7 +2146,7 @@ int UtcDaliPanGesturePredictionSmoothing02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2253,7 +2253,7 @@ int UtcDaliPanGesturePrediction2SmoothingMultiTap01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2327,7 +2327,7 @@ int UtcDaliPanGesturePrediction2SmoothingMultiTap02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2432,7 +2432,7 @@ int UtcDaliPanGesturePrediction2Smoothing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2527,7 +2527,7 @@ int UtcDaliPanGestureSetProperties(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2591,7 +2591,7 @@ int UtcDaliPanGestureSetPropertiesAlreadyPanning(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2722,7 +2722,7 @@ int UtcDaliPanGestureGetPropertyWithSceneObject(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2758,7 +2758,7 @@ int UtcDaliPanGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector @@ -2771,7 +2771,7 @@ int UtcDaliPanGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); @@ -2811,7 +2811,7 @@ int UtcDaliPanGestureNoTimeDiff(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a pan detector diff --git a/automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp index 4d9f119..3292daf 100644 --- a/automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp @@ -119,7 +119,7 @@ int UtcDaliPanGestureRecognizerBasicNoAction(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -151,7 +151,7 @@ int UtcDaliPanGestureRecognizerBasic(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -183,7 +183,7 @@ int UtcDaliPanGestureRecognizerBasicInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -215,7 +215,7 @@ int UtcDaliPanGestureRecognizerBasicShortest(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -247,7 +247,7 @@ int UtcDaliPanGestureRecognizerBasicFailToStart(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -279,7 +279,7 @@ int UtcDaliPanGestureRecognizerBasicStationary(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -316,7 +316,7 @@ int UtcDaliPanGestureRecognizerNewParametersFail(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -351,7 +351,7 @@ int UtcDaliPanGestureRecognizerNewParametersSuccess(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -386,7 +386,7 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -422,7 +422,7 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -458,7 +458,7 @@ int UtcDaliPanGestureRecognizerNewParametersNoStart(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -493,7 +493,7 @@ int UtcDaliPanGestureRecognizerNewParametersSlowRelease(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -528,7 +528,7 @@ int UtcDaliPanGestureRecognizerOtherEvent(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -562,7 +562,7 @@ int UtcDaliPanGestureRecognizerSlowMoving(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -600,7 +600,7 @@ int UtcDaliPanGestureRecognizerNewParamsMinNum(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -637,7 +637,7 @@ int UtcDaliPanGestureRecognizerNewParamsMinDistance(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp index 448cecd..6842603 100644 --- a/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp @@ -169,7 +169,7 @@ int UtcDaliPinchGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -230,7 +230,7 @@ int UtcDaliPinchGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -272,7 +272,7 @@ int UtcDaliPinchGestureSignalReceptionDownMotionLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -333,7 +333,7 @@ int UtcDaliPinchGestureSignalReceptionDownMotionUp(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -384,7 +384,7 @@ int UtcDaliPinchGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -435,7 +435,7 @@ int UtcDaliPinchGestureSignalReceptionDetachWhilePinching(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -487,7 +487,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void) // is destroyed. Actor tempActor = Actor::New(); tempActor.SetSize(100.0f, 100.0f); - tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(tempActor); detector.Attach(tempActor); @@ -495,7 +495,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -606,7 +606,7 @@ int UtcDaliPinchGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -614,8 +614,8 @@ int UtcDaliPinchGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -670,13 +670,13 @@ int UtcDaliPinchGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -721,7 +721,7 @@ int UtcDaliPinchGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -747,7 +747,7 @@ int UtcDaliPinchGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor become invisible - actor should not receive the next pinch - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -767,12 +767,12 @@ int UtcDaliPinchGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); // Render and notify @@ -846,7 +846,7 @@ int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor1 = Actor::New(); actor1.SetSize(100.0f, 100.0f); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor1); SignalData data1; GestureReceivedFunctor functor1(data1); @@ -856,8 +856,8 @@ int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); - actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); SignalData data2; GestureReceivedFunctor functor2(data2); @@ -883,7 +883,7 @@ int UtcDaliPinchGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -974,14 +974,14 @@ int UtcDaliPinchGestureActorStagedAndDestroyed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); - dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify @@ -1066,7 +1066,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a detector @@ -1079,7 +1079,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); diff --git a/automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp index 08ae245..97db383 100644 --- a/automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp @@ -119,7 +119,7 @@ int UtcDaliPinchGestureRecognizerBasicNoAction(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -151,7 +151,7 @@ int UtcDaliPinchGestureRecognizerBasic(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -185,7 +185,7 @@ int UtcDaliPinchGestureRecognizerEndEarly01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -220,7 +220,7 @@ int UtcDaliPinchGestureRecognizerEndEarly02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -256,7 +256,7 @@ int UtcDaliPinchGestureRecognizerRealistic01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -297,7 +297,7 @@ int UtcDaliPinchGestureRecognizerRealistic02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -337,7 +337,7 @@ int UtcDaliPinchGestureRecognizerRealistic03(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -380,12 +380,12 @@ int UtcDaliPinchGestureRecognizerMultipleDetectors(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor2.SetX(100.0f); Stage::GetCurrent().Add(actor2); @@ -447,7 +447,7 @@ int UtcDaliPinchGestureRecognizerShortDistance01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -481,7 +481,7 @@ int UtcDaliPinchGestureRecognizerShortDistance02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -519,7 +519,7 @@ int UtcDaliPinchGestureRecognizerLongDistance01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -554,7 +554,7 @@ int UtcDaliPinchGestureRecognizerLongDistance02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -588,7 +588,7 @@ int UtcDaliPinchGestureRecognizerLongDistance03(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -623,7 +623,7 @@ int UtcDaliPinchGestureRecognizerLongDistance04(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -659,7 +659,7 @@ int UtcDaliPinchGestureRecognizerMinimumTouchEvents(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); // Render and notify @@ -702,7 +702,7 @@ int UtcDaliPinchGestureRecognizerMinimumTouchEventsAfterStart(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp b/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp index 522ddb9..74919df 100644 --- a/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp +++ b/automated-tests/src/dali/utc-Dali-PropertyNotification.cpp @@ -581,7 +581,7 @@ int UtcDaliPropertyNotificationVectorComponentGreaterThan(void) notification.NotifySignal().Connect( &TestCallback ); actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.0f)); Wait(application, DEFAULT_WAIT_PERIOD); // Move right to satisfy XAxis condition @@ -606,7 +606,7 @@ int UtcDaliPropertyNotificationVectorComponentGreaterThan(void) // Change alpha Colour to satisfy w/alpha component condition gCallBackCalled = false; Wait(application, DEFAULT_WAIT_PERIOD); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f)); Wait(application, DEFAULT_WAIT_PERIOD); DALI_TEST_CHECK( gCallBackCalled ); END_TEST; @@ -630,7 +630,7 @@ int UtcDaliPropertyNotificationVectorComponentLessThan(void) notification.NotifySignal().Connect( &TestCallback ); actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f)); Wait(application, DEFAULT_WAIT_PERIOD); // Move left to satisfy XAxis condition @@ -655,7 +655,7 @@ int UtcDaliPropertyNotificationVectorComponentLessThan(void) // Change alpha Colour to satisfy w/alpha component condition gCallBackCalled = false; Wait(application, DEFAULT_WAIT_PERIOD); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.0f)); Wait(application, DEFAULT_WAIT_PERIOD); DALI_TEST_CHECK( gCallBackCalled ); END_TEST; @@ -680,7 +680,7 @@ int UtcDaliPropertyNotificationVectorComponentInside(void) // set outside all conditions actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f)); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f)); Wait(application, DEFAULT_WAIT_PERIOD); // Move x to inside condition @@ -705,7 +705,7 @@ int UtcDaliPropertyNotificationVectorComponentInside(void) // change alpha to inside condition gCallBackCalled = false; Wait(application, DEFAULT_WAIT_PERIOD); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.5f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.5f)); Wait(application, DEFAULT_WAIT_PERIOD); DALI_TEST_CHECK( gCallBackCalled ); END_TEST; @@ -730,7 +730,7 @@ int UtcDaliPropertyNotificationVectorComponentOutside(void) // set inside all conditions actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.5f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.5f)); Wait(application, DEFAULT_WAIT_PERIOD); // Move x to outside condition @@ -755,7 +755,7 @@ int UtcDaliPropertyNotificationVectorComponentOutside(void) // change alpha to outside condition gCallBackCalled = false; Wait(application, DEFAULT_WAIT_PERIOD); - actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f)); Wait(application, DEFAULT_WAIT_PERIOD); DALI_TEST_CHECK( gCallBackCalled ); END_TEST; diff --git a/automated-tests/src/dali/utc-Dali-RenderTask.cpp b/automated-tests/src/dali/utc-Dali-RenderTask.cpp index e5ea26b..045e20f 100644 --- a/automated-tests/src/dali/utc-Dali-RenderTask.cpp +++ b/automated-tests/src/dali/utc-Dali-RenderTask.cpp @@ -2001,7 +2001,7 @@ int UtcDaliRenderTaskContinuous02(void) Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg"); Stage::GetCurrent().Add(secondRootActor); - secondRootActor.SetVisible(false); + secondRootActor.SetProperty( Actor::Property::VISIBLE,false); RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true); bool finished = false; @@ -2014,7 +2014,7 @@ int UtcDaliRenderTaskContinuous02(void) application.GetPlatform().ClearReadyResources(); // MAKE SOURCE ACTOR VISIBLE - expect continuous renders to start, no finished signal - secondRootActor.SetVisible(true); + secondRootActor.SetProperty( Actor::Property::VISIBLE,true); application.SendNotification(); // CONTINUE PROCESS/RENDER Input, Expected Input, Expected @@ -2558,7 +2558,7 @@ int UtcDaliRenderTaskFinishInvisibleSourceActor(void) BufferImage image = BufferImage::New( 10, 10 ); Actor rootActor = CreateRenderableActor( image ); rootActor.SetSize( 10, 10 ); - rootActor.SetVisible(false); + rootActor.SetProperty( Actor::Property::VISIBLE,false); Stage::GetCurrent().Add( rootActor ); RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList(); @@ -2678,8 +2678,8 @@ int UtcDaliRenderTaskWorldToViewport(void) actor.SetSize(100.0f, 100.0f); actor.SetPosition( Vector3(0.0, 0.0, 0.0) ); - actor.SetParentOrigin( Vector3(0.5, 0.5, 0.5) ); - actor.SetAnchorPoint( Vector3(0.5, 0.5, 0.5) ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.5, 0.5, 0.5) ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3(0.5, 0.5, 0.5) ); Stage::GetCurrent().Add(actor); @@ -2696,7 +2696,7 @@ int UtcDaliRenderTaskWorldToViewport(void) float screenX = 0.0; float screenY = 0.0; - bool ok = task.WorldToViewport(actor.GetCurrentWorldPosition(), screenX, screenY); + bool ok = task.WorldToViewport(actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), screenX, screenY); DALI_TEST_CHECK(ok == true); DALI_TEST_EQUALS(screenX, screenSize.x/2, Math::MACHINE_EPSILON_10000, TEST_LOCATION); @@ -2706,17 +2706,17 @@ int UtcDaliRenderTaskWorldToViewport(void) float actor2Size = 100.f; actor2.SetSize( actor2Size, actor2Size ); actor2.SetPosition( Vector3(0.0, 0.0, 0.0) ); - actor2.SetParentOrigin( Vector3(0.5, 0.5, 0.0) ); - actor2.SetAnchorPoint( Vector3(0.5, 0.5, 0.0) ); + actor2.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.5, 0.5, 0.0) ); + actor2.SetProperty( Actor::Property::ANCHOR_POINT, Vector3(0.5, 0.5, 0.0) ); Stage::GetCurrent().Add( actor2 ); actor2.Add(actor); - actor.SetParentOrigin( Vector3(0,0,0) ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0,0,0) ); application.SendNotification(); application.Render(); application.SendNotification(); - ok = task.WorldToViewport(actor.GetCurrentWorldPosition(), screenX, screenY); + ok = task.WorldToViewport(actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), screenX, screenY); DALI_TEST_CHECK(ok == true); DALI_TEST_EQUALS(screenX, screenSize.x/2 - actor2Size/2, Math::MACHINE_EPSILON_10000, TEST_LOCATION); @@ -2730,7 +2730,7 @@ int UtcDaliRenderTaskViewportToLocal(void) { TestApplication application; Actor actor = Actor::New(); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.SetSize(100.0f, 100.0f); actor.SetPosition(10.0f, 10.0f); Stage::GetCurrent().Add(actor); @@ -2768,7 +2768,7 @@ int UtcDaliRenderTaskOffscreenViewportToLocal(void) { TestApplication application; Actor actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); actor.SetSize( 100.0f, 100.0f ); actor.SetPosition( 10.0f, 10.0f ); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-Renderer.cpp b/automated-tests/src/dali/utc-Dali-Renderer.cpp index 3a12e96..47b3c7e 100644 --- a/automated-tests/src/dali/utc-Dali-Renderer.cpp +++ b/automated-tests/src/dali/utc-Dali-Renderer.cpp @@ -454,7 +454,7 @@ int UtcDaliRendererBlendOptions01(void) Actor actor = Actor::New(); // set a transparent actor color so that blending is enabled - actor.SetOpacity( 0.5f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.5f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -499,7 +499,7 @@ int UtcDaliRendererBlendOptions02(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.5f ); // enable blending + actor.SetProperty( DevelActor::Property::OPACITY, 0.5f ); // enable blending actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -570,7 +570,7 @@ int UtcDaliRendererBlendOptions04(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.1f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.1f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -615,7 +615,7 @@ int UtcDaliRendererSetBlendMode01(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.98f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.98f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -647,7 +647,7 @@ int UtcDaliRendererSetBlendMode01b(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.0f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.0f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -682,7 +682,7 @@ int UtcDaliRendererSetBlendMode02(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.15f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.15f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -714,7 +714,7 @@ int UtcDaliRendererSetBlendMode03(void) Renderer renderer = Renderer::New( geometry, shader ); Actor actor = Actor::New(); - actor.SetOpacity( 0.75f ); + actor.SetProperty( DevelActor::Property::OPACITY, 0.75f ); actor.AddRenderer(renderer); actor.SetSize(400, 400); Stage::GetCurrent().Add(actor); @@ -779,7 +779,7 @@ int UtcDaliRendererSetBlendMode04b(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); actor.SetSize(400, 400); - actor.SetColor( Vector4(1.0f, 0.0f, 1.0f, 0.5f) ); + actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) ); Stage::GetCurrent().Add(actor); renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO); @@ -811,7 +811,7 @@ int UtcDaliRendererSetBlendMode04c(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); actor.SetSize(400, 400); - actor.SetColor( Color::MAGENTA ); + actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA ); Stage::GetCurrent().Add(actor); renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO); @@ -1044,7 +1044,7 @@ int UtcDaliRendererPreMultipledAlpha(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); actor.SetSize(400, 400); - actor.SetColor( Vector4(1.0f, 0.0f, 1.0f, 0.5f) ); + actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) ); Stage::GetCurrent().Add(actor); Property::Value value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA ); @@ -1581,8 +1581,8 @@ Renderer CreateRenderer( Actor actor, Geometry geometry, Shader shader, int dept Actor CreateActor( Actor parent, int siblingOrder, const char* location ) { Actor actor = Actor::New(); - actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetParentOrigin(AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::PARENT_ORIGIN,AnchorPoint::CENTER); actor.SetPosition(0.0f,0.0f); actor.SetSize(100, 100); parent.Add(actor); @@ -2827,7 +2827,7 @@ int UtcDaliRendererOpacity(void) Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetSize( 400, 400 ); - actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); + actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); Stage::GetCurrent().Add( actor ); Property::Value value = renderer.GetProperty( DevelRenderer::Property::OPACITY ); @@ -2875,7 +2875,7 @@ int UtcDaliRendererOpacityAnimation(void) Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetSize( 400, 400 ); - actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); + actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -2955,7 +2955,7 @@ int UtcDaliRendererRenderingBehavior(void) Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetSize( 400, 400 ); - actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); + actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); Stage::GetCurrent().Add( actor ); Property::Value value = renderer.GetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR ); @@ -3023,7 +3023,7 @@ int UtcDaliRendererRegenerateUniformMap(void) Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetSize( 400, 400 ); - actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); + actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) ); Stage::GetCurrent().Add( actor ); application.SendNotification(); diff --git a/automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp index 8d27655..5e74c25 100644 --- a/automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp @@ -171,7 +171,7 @@ int UtcDaliRotationGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -232,7 +232,7 @@ int UtcDaliRotationGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -274,7 +274,7 @@ int UtcDaliRotationGestureSignalReceptionDownMotionLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -331,7 +331,7 @@ int UtcDaliRotationGestureSignalReceptionDownMotionUp(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -379,7 +379,7 @@ int UtcDaliRotationGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -430,7 +430,7 @@ int UtcDaliRotationGestureSignalReceptionDetachWhileRotationing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -482,7 +482,7 @@ int UtcDaliRotationGestureSignalReceptionActorDestroyedWhileRotationing(void) // is destroyed. Actor tempActor = Actor::New(); tempActor.SetSize(100.0f, 100.0f); - tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(tempActor); detector.Attach(tempActor); @@ -490,7 +490,7 @@ int UtcDaliRotationGestureSignalReceptionActorDestroyedWhileRotationing(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -598,7 +598,7 @@ int UtcDaliRotationGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -606,8 +606,8 @@ int UtcDaliRotationGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -660,13 +660,13 @@ int UtcDaliRotationGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -711,7 +711,7 @@ int UtcDaliRotationGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -737,7 +737,7 @@ int UtcDaliRotationGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor become invisible - actor should not receive the next rotation - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -757,12 +757,12 @@ int UtcDaliRotationGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); // Render and notify @@ -836,7 +836,7 @@ int UtcDaliRotationGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor1 = Actor::New(); actor1.SetSize(100.0f, 100.0f); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor1); SignalData data1; GestureReceivedFunctor functor1(data1); @@ -846,8 +846,8 @@ int UtcDaliRotationGestureSignalReceptionEnsureCorrectSignalling(void) Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT); - actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); + actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); SignalData data2; GestureReceivedFunctor functor2(data2); @@ -873,7 +873,7 @@ int UtcDaliRotationGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -964,14 +964,14 @@ int UtcDaliRotationGestureActorStagedAndDestroyed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); dummyActor.SetSize( 100.0f, 100.0f ); dummyActor.SetPosition( 100.0f, 100.0f ); - dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); // Render and notify @@ -1056,7 +1056,7 @@ int UtcDaliRotationGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a detector @@ -1069,7 +1069,7 @@ int UtcDaliRotationGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); diff --git a/automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp index 044fd47..7b4d06b 100644 --- a/automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp @@ -116,7 +116,7 @@ int UtcDaliRotationGestureRecognizerMinimumTouchEvents(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); application.SendNotification(); @@ -157,7 +157,7 @@ int UtcDaliRotationGestureRecognizerMinimumTouchEventsAfterStart(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); Stage::GetCurrent().Add( actor ); application.SendNotification(); diff --git a/automated-tests/src/dali/utc-Dali-Sampler.cpp b/automated-tests/src/dali/utc-Dali-Sampler.cpp index fb895a1..d403a29 100644 --- a/automated-tests/src/dali/utc-Dali-Sampler.cpp +++ b/automated-tests/src/dali/utc-Dali-Sampler.cpp @@ -133,7 +133,7 @@ int UtcSamplerSetFilterMode(void) renderer.SetTextures( textureSet ); Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize(400, 400); Stage::GetCurrent().Add( actor ); @@ -264,7 +264,7 @@ int UtcSamplerSetWrapMode1(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize(400, 400); Stage::GetCurrent().Add( actor ); @@ -353,7 +353,7 @@ int UtcSamplerSetWrapMode2(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize( 400, 400 ); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-Scene.cpp b/automated-tests/src/dali/utc-Dali-Scene.cpp index fd790b9..c2335ed 100644 --- a/automated-tests/src/dali/utc-Dali-Scene.cpp +++ b/automated-tests/src/dali/utc-Dali-Scene.cpp @@ -671,8 +671,8 @@ int UtcDaliSceneTouchSignalP(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); scene.Add( actor ); @@ -794,8 +794,8 @@ int UtcDaliSceneTouchSignalN(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); scene.Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-Scripting.cpp b/automated-tests/src/dali/utc-Dali-Scripting.cpp index a4ec104..890dbc6 100644 --- a/automated-tests/src/dali/utc-Dali-Scripting.cpp +++ b/automated-tests/src/dali/utc-Dali-Scripting.cpp @@ -501,18 +501,18 @@ int UtcDaliScriptingNewActorProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( handle.GetCurrentSize(), Vector3::ONE, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentPosition(), Vector3::XAXIS, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.IsVisible(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetName(), "MyActor", TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::XAXIS, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::MAGENTA, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< std::string >( Actor::Property::NAME ), "MyActor", TEST_LOCATION ); DALI_TEST_EQUALS( handle.GetColorMode(), USE_PARENT_COLOR, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.IsSensitive(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetLeaveRequired(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::SENSITIVE ), false, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ), true, TEST_LOCATION ); DALI_TEST_EQUALS( handle.GetDrawMode(), DrawMode::OVERLAY_2D, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.IsOrientationInherited(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.IsScaleInherited(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::INHERIT_ORIENTATION ), false, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), false, TEST_LOCATION ); Stage::GetCurrent().Remove( handle ); } @@ -528,8 +528,8 @@ int UtcDaliScriptingNewActorProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( handle.GetCurrentParentOrigin(), ParentOrigin::TOP_CENTER, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentAnchorPoint(), AnchorPoint::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_CENTER, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::TOP_LEFT, TEST_LOCATION ); Stage::GetCurrent().Remove( handle ); } @@ -545,8 +545,8 @@ int UtcDaliScriptingNewActorProperties(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( handle.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION ); - DALI_TEST_EQUALS( handle.GetCurrentAnchorPoint(), AnchorPoint::CENTER_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::CENTER_LEFT, TEST_LOCATION ); Stage::GetCurrent().Remove( handle ); } @@ -572,8 +572,8 @@ int UtcDaliScriptingNewAnimation(void) Scripting::NewAnimation( map, data ); Actor actor = Actor::New(); - actor.SetName("Actor1"); - actor.SetColor(Color::CYAN); + actor.SetProperty( Actor::Property::NAME,"Actor1"); + actor.SetProperty( Actor::Property::COLOR,Color::CYAN); Stage::GetCurrent().Add(actor); Animation anim = data.CreateAnimation( actor, 0.5f ); @@ -584,11 +584,11 @@ int UtcDaliScriptingNewAnimation(void) application.Render(500); // Start animation application.Render(500); // Halfway thru anim application.SendNotification(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), (Color::MAGENTA+Color::CYAN)*0.5f, TEST_LOCATION); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), (Color::MAGENTA+Color::CYAN)*0.5f, TEST_LOCATION); application.Render(500); // Halfway thru anim application.SendNotification(); - DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::MAGENTA, TEST_LOCATION ); END_TEST; } @@ -617,13 +617,13 @@ int UtcDaliScriptingNewActorChildren(void) application.SendNotification(); application.Render(); - DALI_TEST_EQUALS( handle.GetCurrentPosition(), Vector3::XAXIS, TEST_LOCATION ); + DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::XAXIS, TEST_LOCATION ); DALI_TEST_EQUALS( handle.GetChildCount(), 1u, TEST_LOCATION ); Actor child1 = handle.GetChildAt(0); DALI_TEST_CHECK( child1 ); DALI_TEST_CHECK( Layer::DownCast( child1 ) ); - DALI_TEST_EQUALS( child1.GetCurrentPosition(), Vector3::YAXIS, TEST_LOCATION ); + DALI_TEST_EQUALS( child1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::YAXIS, TEST_LOCATION ); DALI_TEST_EQUALS( child1.GetChildCount(), 0u, TEST_LOCATION ); Stage::GetCurrent().Remove( handle ); @@ -667,15 +667,15 @@ int UtcDaliScriptingCreatePropertyMapActor(void) actor.SetSize( Vector3::ONE ); actor.SetPosition( Vector3::XAXIS ); actor.SetScale( Vector3::ZAXIS ); - actor.SetVisible( false ); - actor.SetColor( Color::MAGENTA ); - actor.SetName( "MyActor" ); - actor.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_RIGHT ); - actor.SetSensitive( false ); - actor.SetLeaveRequired( true ); - actor.SetInheritOrientation( false ); - actor.SetInheritScale( false ); + actor.SetProperty( Actor::Property::VISIBLE, false ); + actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA ); + actor.SetProperty( Actor::Property::NAME, "MyActor" ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); + actor.SetProperty( Actor::Property::SENSITIVE, false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); + actor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false ); + actor.SetProperty( Actor::Property::INHERIT_SCALE, false ); actor.SetSizeModeFactor( Vector3::ONE ); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-Stage.cpp b/automated-tests/src/dali/utc-Dali-Stage.cpp index a3fb8f2..3cf546a 100755 --- a/automated-tests/src/dali/utc-Dali-Stage.cpp +++ b/automated-tests/src/dali/utc-Dali-Stage.cpp @@ -1029,8 +1029,8 @@ int UtcDaliStageTouchedSignalP(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); stage.Add( actor ); @@ -1154,8 +1154,8 @@ int UtcDaliStageTouchedSignalN(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); stage.Add( actor ); @@ -1244,8 +1244,8 @@ int UtcDaliStageTouchSignalP(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); stage.Add( actor ); @@ -1375,8 +1375,8 @@ int UtcDaliStageTouchSignalN(void) // Add an actor to the scene. Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); actor.TouchedSignal().Connect( &DummyTouchCallback ); stage.Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp index cef34fd..f6fb1be 100644 --- a/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp @@ -178,7 +178,7 @@ int UtcDaliTapGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -243,7 +243,7 @@ int UtcDaliTapGestureSetTapsRequiredMinMaxCheck(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -284,7 +284,7 @@ int UtcDaliTapGestureSignalReceptionNegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -310,7 +310,7 @@ int UtcDaliTapGestureSignalReceptionPositive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -339,7 +339,7 @@ int UtcDaliTapGestureSignalReceptionDetach(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -394,7 +394,7 @@ int UtcDaliTapGestureSignalReceptionActorDestroyedWhileTapping(void) { Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -481,7 +481,7 @@ int UtcDaliTapGestureSignalReceptionChildHit(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); // Set child to completely cover parent. @@ -489,8 +489,8 @@ int UtcDaliTapGestureSignalReceptionChildHit(void) // conversion of the parent actor is correct. Actor child = Actor::New(); child.SetSize(100.0f, 100.0f); - child.SetAnchorPoint(AnchorPoint::CENTER); - child.SetParentOrigin(ParentOrigin::CENTER); + child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); parent.Add(child); @@ -534,13 +534,13 @@ int UtcDaliTapGestureSignalReceptionAttachDetachMany(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); second.SetX(100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); // Render and notify @@ -587,7 +587,7 @@ int UtcDaliTapGestureSignalReceptionActorBecomesUntouchable(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -606,7 +606,7 @@ int UtcDaliTapGestureSignalReceptionActorBecomesUntouchable(void) DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION); // Actor become invisible - actor should not receive the next pan - actor.SetVisible(false); + actor.SetProperty( Actor::Property::VISIBLE,false); // Render and notify application.SendNotification(); @@ -625,12 +625,12 @@ int UtcDaliTapGestureSignalReceptionMultipleGestureDetectors(void) Actor first = Actor::New(); first.SetSize(100.0f, 100.0f); - first.SetAnchorPoint(AnchorPoint::TOP_LEFT); + first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); second.SetSize(100.0f, 100.0f); - second.SetAnchorPoint(AnchorPoint::TOP_LEFT); + second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); second.SetX(100.0f); first.Add(second); @@ -686,7 +686,7 @@ int UtcDaliTapGestureSignalReceptionMultipleDetectorsOnActor(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -720,7 +720,7 @@ int UtcDaliTapGestureSignalReceptionDifferentPossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -776,7 +776,7 @@ int UtcDaliTapGestureActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -802,7 +802,7 @@ int UtcDaliTapGestureDetectorRemovedWhilePossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -832,7 +832,7 @@ int UtcDaliTapGestureActorRemovedWhilePossible(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -867,7 +867,7 @@ int UtcDaliTapGestureLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Add a detector @@ -880,7 +880,7 @@ int UtcDaliTapGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); diff --git a/automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp b/automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp index 6afd4a2..ccdefa3 100644 --- a/automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp +++ b/automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp @@ -117,7 +117,7 @@ int UtcDaliTapGestureRecognizerBasic(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -150,7 +150,7 @@ int UtcDaliTapGestureRecognizerGapTooLong(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -183,7 +183,7 @@ int UtcDaliTapGestureRecognizerInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -218,7 +218,7 @@ int UtcDaliTapGestureRecognizerMoveTooFar(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -251,7 +251,7 @@ int UtcDaliTapGestureRecognizerStartDouble(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -284,7 +284,7 @@ int UtcDaliTapGestureRecognizerEndDouble(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -319,7 +319,7 @@ int UtcDaliTapGestureRecognizerDoubleTap(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -360,7 +360,7 @@ int UtcDaliTapGestureRecognizerDoubleTapMoveTooFar(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -413,7 +413,7 @@ int UtcDaliTapGestureRecognizerDoubleTapWaitTooLong(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -464,12 +464,12 @@ int UtcDaliTapGestureRecognizerMultipleDetectors(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor2.SetX(100.0f); Stage::GetCurrent().Add(actor2); diff --git a/automated-tests/src/dali/utc-Dali-TextureSet.cpp b/automated-tests/src/dali/utc-Dali-TextureSet.cpp index 3daa753..a8f33fd 100644 --- a/automated-tests/src/dali/utc-Dali-TextureSet.cpp +++ b/automated-tests/src/dali/utc-Dali-TextureSet.cpp @@ -55,7 +55,7 @@ Actor CreateActor( SetSampler setSamplerOption ) Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize(400, 400); return actor; @@ -253,7 +253,7 @@ int UtcDaliTextureSetSetSampler(void) Actor actor = Actor::New(); actor.AddRenderer(renderer); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); actor.SetSize(400, 400); Stage::GetCurrent().Add( actor ); diff --git a/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp b/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp index 812a992..4019cbd 100755 --- a/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp @@ -301,7 +301,7 @@ int UtcDaliTouchDataNormalProcessing01(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -365,7 +365,7 @@ int UtcDaliTouchDataNormalProcessing02(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -399,7 +399,7 @@ int UtcDaliTouchDataAPINegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -438,8 +438,8 @@ int UtcDaliTouchDataOutsideCameraNearFarPlanes(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetParentOrigin(ParentOrigin::CENTER); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); stage.Add(actor); // Render and notify @@ -539,7 +539,7 @@ int UtcDaliTouchDataInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -576,7 +576,7 @@ int UtcDaliTouchDataParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -676,7 +676,7 @@ int UtcDaliTouchDataInterruptedParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -755,7 +755,7 @@ int UtcDaliTouchDataLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -768,7 +768,7 @@ int UtcDaliTouchDataLeave(void) actor.TouchSignal().Connect( &application, functor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); @@ -794,7 +794,7 @@ int UtcDaliTouchDataLeave(void) data.Reset(); // We do not want to listen to leave events anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of actor, no signalling application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) ); @@ -810,7 +810,7 @@ int UtcDaliTouchDataLeaveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -828,8 +828,8 @@ int UtcDaliTouchDataLeaveParentConsumer(void) rootActor.TouchSignal().Connect( &application, rootFunctor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); - rootActor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); + rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); @@ -874,7 +874,7 @@ int UtcDaliTouchDataLeaveParentConsumer(void) rootData.Reset(); // We do not want to listen to leave events of actor anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of root actor, only root signalled Vector2 stageSize( Stage::GetCurrent().GetSize() ); @@ -891,7 +891,7 @@ int UtcDaliTouchDataActorBecomesInsensitive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -910,7 +910,7 @@ int UtcDaliTouchDataActorBecomesInsensitive(void) data.Reset(); // Change actor to insensitive - actor.SetSensitive( false ); + actor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) ); @@ -927,7 +927,7 @@ int UtcDaliTouchDataActorBecomesInsensitiveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -960,7 +960,7 @@ int UtcDaliTouchDataActorBecomesInsensitiveParentConsumer(void) application.Render(); // Make root actor insensitive - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor) application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) ); @@ -982,12 +982,12 @@ int UtcDaliTouchDataMultipleLayers(void) Layer layer1 ( Layer::New() ); layer1.SetSize(100.0f, 100.0f); - layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer1 ); Actor actor1 ( Actor::New() ); actor1.SetSize( 100.0f, 100.0f ); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor1.SetZ( 1.0f ); // Should hit actor1 in this layer layer1.Add( actor1 ); @@ -1006,37 +1006,37 @@ int UtcDaliTouchDataMultipleLayers(void) data.Reset(); // Make layer1 insensitive, nothing should be hit - layer1.SetSensitive( false ); + layer1.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make layer1 sensitive again, again actor1 will be hit - layer1.SetSensitive( true ); + layer1.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.touchedActor == actor1 ); data.Reset(); // Make rootActor insensitive, nothing should be hit - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make rootActor sensitive - rootActor.SetSensitive( true ); + rootActor.SetProperty( Actor::Property::SENSITIVE, true ); // Add another layer Layer layer2 ( Layer::New() ); layer2.SetSize(100.0f, 100.0f ); - layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2 Stage::GetCurrent().Add( layer2 ); Actor actor2 ( Actor::New() ); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.Add( actor2 ); // Render and notify @@ -1054,21 +1054,21 @@ int UtcDaliTouchDataMultipleLayers(void) data.Reset(); // Make layer2 insensitive, should hit actor1 - layer2.SetSensitive( false ); + layer2.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.touchedActor == actor1 ); data.Reset(); // Make layer2 sensitive again, should hit layer2 - layer2.SetSensitive( true ); + layer2.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); //DALI_TEST_CHECK( data.touchedActor == layer2 ); // TODO: Uncomment this after removing renderable hack! data.Reset(); // Make layer2 invisible, render and notify - layer2.SetVisible( false ); + layer2.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -1079,7 +1079,7 @@ int UtcDaliTouchDataMultipleLayers(void) data.Reset(); // Make rootActor invisible, render and notify - rootActor.SetVisible( false ); + rootActor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -1098,7 +1098,7 @@ int UtcDaliTouchDataMultipleRenderTasks(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Create render task @@ -1142,12 +1142,12 @@ int UtcDaliTouchDataMultipleRenderTasksWithChildLayer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.Add(layer); // Create render task @@ -1196,14 +1196,14 @@ int UtcDaliTouchDataOffscreenRenderTasks(void) // Create a renderable actor to display the FrameBufferImage Actor renderableActor = CreateRenderableActor( frameBufferImage ); - renderableActor.SetParentOrigin(ParentOrigin::CENTER); + renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); renderableActor.SetSize( stageSize.x, stageSize.y ); renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME stage.Add( renderableActor ); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add( actor ); application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects @@ -1243,12 +1243,12 @@ int UtcDaliTouchDataMultipleRenderableActors(void) Actor parent = CreateRenderableActor(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(parent); Actor actor = CreateRenderableActor(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1274,7 +1274,7 @@ int UtcDaliTouchDataActorRemovedInSignal(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1287,7 +1287,7 @@ int UtcDaliTouchDataActorRemovedInSignal(void) actor.TouchSignal().Connect( &application, functor ); // Register for leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); @@ -1343,7 +1343,7 @@ int UtcDaliTouchDataActorSignalNotConsumed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1367,7 +1367,7 @@ int UtcDaliTouchDataActorUnStaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1405,7 +1405,7 @@ int UtcDaliTouchDataLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1420,7 +1420,7 @@ int UtcDaliTouchDataLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); @@ -1457,11 +1457,11 @@ int UtcDaliTouchDataLeaveActorReadded(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Set actor to receive touch-events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Render and notify application.SendNotification(); @@ -1503,12 +1503,12 @@ int UtcDaliTouchDataClippedActor(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); stage.Add( actor ); Actor clippingActor = Actor::New(); clippingActor.SetSize( 50.0f, 50.0f ); - clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); stage.Add( clippingActor ); @@ -1516,7 +1516,7 @@ int UtcDaliTouchDataClippedActor(void) Actor clippingChild = Actor::New(); clippingChild.SetSize( 50.0f, 50.0f ); clippingChild.SetPosition( 25.0f, 25.0f ); - clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.Add( clippingChild ); // Render and notify. @@ -1554,7 +1554,7 @@ int UtcDaliTouchDataActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1592,12 +1592,12 @@ int UtcDaliTouchDataParentUnstaged(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1635,12 +1635,12 @@ int UtcDaliTouchDataActorUnstagedDifferentConsumer(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1728,12 +1728,12 @@ int UtcDaliTouchDataInterruptedDifferentConsumer(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1799,7 +1799,7 @@ int UtcDaliTouchDataGetRadius(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1830,7 +1830,7 @@ int UtcDaliTouchDataGetEllipseRadius(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1861,7 +1861,7 @@ int UtcDaliTouchDataGetAngle(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1890,7 +1890,7 @@ int UtcDaliTouchDataGetPressure(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1919,7 +1919,7 @@ int UtcDaliTouchDataAndEventUsage(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1950,7 +1950,7 @@ int UtcDaliTouchDataGetDeviceAPINegative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1981,7 +1981,7 @@ int UtcDaliTouchDataGetMouseButtonPositive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -2010,7 +2010,7 @@ int UtcDaliTouchDataGetMouseButtonNagative(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp b/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp index 2f6d2ba..a139394 100755 --- a/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp @@ -138,7 +138,7 @@ int UtcDaliTouchNormalProcessing(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -207,8 +207,8 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetParentOrigin(ParentOrigin::CENTER); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); + actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); stage.Add(actor); // Render and notify @@ -308,7 +308,7 @@ int UtcDaliTouchInterrupted(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -345,7 +345,7 @@ int UtcDaliTouchParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -445,7 +445,7 @@ int UtcDaliTouchInterruptedParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -524,7 +524,7 @@ int UtcDaliTouchLeave(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -537,7 +537,7 @@ int UtcDaliTouchLeave(void) actor.TouchedSignal().Connect( &application, functor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); @@ -563,7 +563,7 @@ int UtcDaliTouchLeave(void) data.Reset(); // We do not want to listen to leave events anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of actor, no signalling application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -579,7 +579,7 @@ int UtcDaliTouchLeaveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -597,8 +597,8 @@ int UtcDaliTouchLeaveParentConsumer(void) rootActor.TouchedSignal().Connect( &application, rootFunctor ); // Set actor to require leave events - actor.SetLeaveRequired( true ); - rootActor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); + rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); @@ -643,7 +643,7 @@ int UtcDaliTouchLeaveParentConsumer(void) rootData.Reset(); // We do not want to listen to leave events of actor anymore - actor.SetLeaveRequired( false ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false ); // Another motion event outside of root actor, only root signalled Vector2 stageSize( Stage::GetCurrent().GetSize() ); @@ -660,7 +660,7 @@ int UtcDaliTouchActorBecomesInsensitive(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -679,7 +679,7 @@ int UtcDaliTouchActorBecomesInsensitive(void) data.Reset(); // Change actor to insensitive - actor.SetSensitive( false ); + actor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -696,7 +696,7 @@ int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -729,7 +729,7 @@ int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void) application.Render(); // Make root actor insensitive - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); // Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor) application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) ); @@ -751,12 +751,12 @@ int UtcDaliTouchMultipleLayers(void) Layer layer1 ( Layer::New() ); layer1.SetSize(100.0f, 100.0f); - layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer1 ); Actor actor1 ( Actor::New() ); actor1.SetSize( 100.0f, 100.0f ); - actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor1.SetZ( 1.0f ); // Should hit actor1 in this layer layer1.Add( actor1 ); @@ -775,37 +775,37 @@ int UtcDaliTouchMultipleLayers(void) data.Reset(); // Make layer1 insensitive, nothing should be hit - layer1.SetSensitive( false ); + layer1.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make layer1 sensitive again, again actor1 will be hit - layer1.SetSensitive( true ); + layer1.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.touchedActor == actor1 ); data.Reset(); // Make rootActor insensitive, nothing should be hit - rootActor.SetSensitive( false ); + rootActor.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); data.Reset(); // Make rootActor sensitive - rootActor.SetSensitive( true ); + rootActor.SetProperty( Actor::Property::SENSITIVE, true ); // Add another layer Layer layer2 ( Layer::New() ); layer2.SetSize(100.0f, 100.0f ); - layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2 Stage::GetCurrent().Add( layer2 ); Actor actor2 ( Actor::New() ); actor2.SetSize(100.0f, 100.0f); - actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); layer2.Add( actor2 ); // Render and notify @@ -823,21 +823,21 @@ int UtcDaliTouchMultipleLayers(void) data.Reset(); // Make layer2 insensitive, should hit actor1 - layer2.SetSensitive( false ); + layer2.SetProperty( Actor::Property::SENSITIVE, false ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); DALI_TEST_CHECK( data.touchedActor == actor1 ); data.Reset(); // Make layer2 sensitive again, should hit layer2 - layer2.SetSensitive( true ); + layer2.SetProperty( Actor::Property::SENSITIVE, true ); application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); //DALI_TEST_CHECK( data.touchedActor == layer2 ); // TODO: Uncomment this after removing renderable hack! data.Reset(); // Make layer2 invisible, render and notify - layer2.SetVisible( false ); + layer2.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -848,7 +848,7 @@ int UtcDaliTouchMultipleLayers(void) data.Reset(); // Make rootActor invisible, render and notify - rootActor.SetVisible( false ); + rootActor.SetProperty( Actor::Property::VISIBLE, false ); application.SendNotification(); application.Render(); @@ -867,7 +867,7 @@ int UtcDaliTouchMultipleRenderTasks(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Create render task @@ -911,12 +911,12 @@ int UtcDaliTouchMultipleRenderTasksWithChildLayer(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); actor.Add(layer); // Create render task @@ -965,14 +965,14 @@ int UtcDaliTouchOffscreenRenderTasks(void) // Create a renderable actor to display the FrameBufferImage Actor renderableActor = CreateRenderableActor( frameBufferImage ); - renderableActor.SetParentOrigin(ParentOrigin::CENTER); + renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); renderableActor.SetSize( stageSize.x, stageSize.y ); renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME stage.Add( renderableActor ); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add( actor ); application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects @@ -1043,12 +1043,12 @@ int UtcDaliTouchMultipleRenderableActors(void) Actor parent = CreateRenderableActor(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(parent); Actor actor = CreateRenderableActor(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1074,7 +1074,7 @@ int UtcDaliTouchActorRemovedInSignal(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1087,7 +1087,7 @@ int UtcDaliTouchActorRemovedInSignal(void) actor.TouchedSignal().Connect( &application, functor ); // Register for leave events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Emit a down signal application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); @@ -1143,7 +1143,7 @@ int UtcDaliTouchActorSignalNotConsumed(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1167,7 +1167,7 @@ int UtcDaliTouchActorUnStaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1205,7 +1205,7 @@ int UtcDaliTouchLayerConsumesTouch(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1220,7 +1220,7 @@ int UtcDaliTouchLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); layer.SetSize(100.0f, 100.0f); - layer.SetAnchorPoint(AnchorPoint::TOP_LEFT); + layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop(); @@ -1257,11 +1257,11 @@ int UtcDaliTouchLeaveActorReadded(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); stage.Add(actor); // Set actor to receive touch-events - actor.SetLeaveRequired( true ); + actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Render and notify application.SendNotification(); @@ -1303,12 +1303,12 @@ int UtcDaliTouchClippingActor(void) Actor actor = Actor::New(); actor.SetSize( 100.0f, 100.0f ); - actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); stage.Add( actor ); Actor clippingActor = Actor::New(); clippingActor.SetSize( 50.0f, 50.0f ); - clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); stage.Add( clippingActor ); @@ -1316,7 +1316,7 @@ int UtcDaliTouchClippingActor(void) Actor clippingChild = Actor::New(); clippingChild.SetSize( 50.0f, 50.0f ); clippingChild.SetPosition( 25.0f, 25.0f ); - clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT ); + clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); clippingActor.Add( clippingChild ); // Render and notify. @@ -1354,7 +1354,7 @@ int UtcDaliTouchActorUnstaged(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify @@ -1392,12 +1392,12 @@ int UtcDaliTouchParentUnstaged(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1435,12 +1435,12 @@ int UtcDaliTouchActorUnstagedDifferentConsumer(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1528,12 +1528,12 @@ int UtcDaliTouchInterruptedDifferentConsumer(void) Actor parent = Actor::New(); parent.SetSize(100.0f, 100.0f); - parent.SetAnchorPoint(AnchorPoint::TOP_LEFT); + parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); parent.Add(actor); // Render and notify @@ -1599,7 +1599,7 @@ int UtcDaliTouchDataConvert(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify diff --git a/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp b/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp index fd6d4cb..5b3c990 100644 --- a/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp +++ b/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp @@ -510,7 +510,7 @@ public: BaseHandle CreateNamedActorType() { Actor actor = Actor::New(); - actor.SetName( "NamedActor" ); + actor.SetProperty( Actor::Property::NAME, "NamedActor" ); return actor; } @@ -770,7 +770,7 @@ int UtcDaliTypeRegistryTypeRegistrationForNamedTypeP(void) Actor namedActor( Actor::DownCast( namedHandle ) ); DALI_TEST_CHECK( namedActor ); - DALI_TEST_CHECK( namedActor.GetName() == "NamedActor" ); + DALI_TEST_CHECK( namedActor.GetProperty< std::string >( Actor::Property::NAME ) == "NamedActor" ); DALI_TEST_CHECK( type.GetName() == "MyNamedActor" ); DALI_TEST_CHECK( type.GetBaseName() == "Actor" ); @@ -1875,11 +1875,11 @@ int UtcDaliTypeRegistryActionViaBaseHandle(void) Actor a = Actor::DownCast(hdl); DALI_TEST_CHECK( a ); - a.SetVisible(false); + a.SetProperty( Actor::Property::VISIBLE,false); application.SendNotification(); application.Render(0); - DALI_TEST_CHECK(!a.IsVisible()); + DALI_TEST_CHECK(!a.GetCurrentProperty< bool >( Actor::Property::VISIBLE )); Property::Map attributes; @@ -1887,7 +1887,7 @@ int UtcDaliTypeRegistryActionViaBaseHandle(void) application.SendNotification(); application.Render(0); - DALI_TEST_CHECK(a.IsVisible()); + DALI_TEST_CHECK(a.GetCurrentProperty< bool >( Actor::Property::VISIBLE )); DALI_TEST_CHECK(!hdl.DoAction("unknownAction", attributes)); END_TEST; @@ -2066,7 +2066,7 @@ int UtcDaliLongPressGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type @@ -2104,7 +2104,7 @@ int UtcDaliPanGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type @@ -2140,7 +2140,7 @@ int UtcDaliPinchGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type @@ -2177,7 +2177,7 @@ int UtcDaliRotationGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type @@ -2214,7 +2214,7 @@ int UtcDaliTapGestureDetectorTypeRegistry(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Register Type diff --git a/automated-tests/src/dali/utc-Dali-WheelEvent.cpp b/automated-tests/src/dali/utc-Dali-WheelEvent.cpp index 9722454..9c7c223 100644 --- a/automated-tests/src/dali/utc-Dali-WheelEvent.cpp +++ b/automated-tests/src/dali/utc-Dali-WheelEvent.cpp @@ -215,7 +215,7 @@ int UtcDaliWheelEventSignalling(void) Actor actor = Actor::New(); actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); + actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Render and notify diff --git a/dali/integration-api/debug.cpp b/dali/integration-api/debug.cpp index 84c9cdf..3eda626 100644 --- a/dali/integration-api/debug.cpp +++ b/dali/integration-api/debug.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -169,6 +169,13 @@ void Filter::DisableGlobalTrace() } } +void Filter::SetGlobalLogLevel( LogLevel level ) +{ + for(FilterIter iter = GetActiveFilters()->begin(); iter != GetActiveFilters()->end(); iter++) + { + (*iter)->SetLogLevel( level ); + } +} void Filter::Log(LogLevel level, const char* format, ...) { diff --git a/dali/integration-api/debug.h b/dali/integration-api/debug.h index d1313a8..06f4da2 100755 --- a/dali/integration-api/debug.h +++ b/dali/integration-api/debug.h @@ -2,7 +2,7 @@ #define DALI_INTEGRATION_DEBUG_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -250,12 +250,19 @@ public: /** * Enable trace on all filters. */ - void EnableGlobalTrace(); + static void EnableGlobalTrace(); /** * Disable trace on all filters. */ - void DisableGlobalTrace(); + static void DisableGlobalTrace(); + + /** + * Set log level for all filters. + * + * @param[in] level The log level + */ + static void SetGlobalLogLevel( LogLevel level ); private: diff --git a/dali/internal/event/events/hover-event-processor.cpp b/dali/internal/event/events/hover-event-processor.cpp index 8fbacbc..ca18f50 100644 --- a/dali/internal/event/events/hover-event-processor.cpp +++ b/dali/internal/event/events/hover-event-processor.cpp @@ -240,7 +240,7 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even DALI_LOG_INFO( gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n", TOUCH_POINT_STATE[iter->GetState()], iter->GetScreenPosition().x, iter->GetScreenPosition().y, ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ), - ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ), + ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ), hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y ); // Only set the currentRenderTask for the primary hit actor. @@ -263,8 +263,8 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even Dali::Actor primaryHitActor = primaryPoint.hitActor; TouchPoint::State primaryPointState = primaryPoint.state; - DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryPoint.hitActor ? reinterpret_cast< void* >( &primaryPoint.hitActor.GetBaseObject() ) : NULL, primaryPoint.hitActor ? primaryPoint.hitActor.GetName().c_str() : "" ); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryPoint.hitActor ? reinterpret_cast< void* >( &primaryPoint.hitActor.GetBaseObject() ) : NULL, primaryPoint.hitActor ? primaryPoint.hitActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); if ( ( primaryPointState == TouchPoint::Started ) && ( hoverEvent.GetPointCount() == 1 ) && diff --git a/dali/internal/event/events/multi-point-event-util.cpp b/dali/internal/event/events/multi-point-event-util.cpp index d762508..e475c2f 100644 --- a/dali/internal/event/events/multi-point-event-util.cpp +++ b/dali/internal/event/events/multi-point-event-util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,11 +31,11 @@ namespace Internal #if defined(DEBUG_ENABLED) -static bool HIERARCHY_GEOMETRY(false); -static bool HIERARCHY_SENSITIVITY(false); -static bool HIERARCHY_TOUCH_REQUIRED(false); -static bool HIERARCHY_HOVER_REQUIRED(false); -static bool HIERARCHY_HITTABLE(false); +static bool HIERARCHY_GEOMETRY(true); +static bool HIERARCHY_SENSITIVITY(true); +static bool HIERARCHY_TOUCH_REQUIRED(true); +static bool HIERARCHY_HOVER_REQUIRED(true); +static bool HIERARCHY_HITTABLE(true); static const Debug::LogLevel HIERARCHY_DEBUG_LOG_LEVEL( Debug::Verbose ); @@ -48,11 +48,11 @@ void PrintChildren( Debug::Filter* logFilter, Dali::Actor actor, int level ) output << " | "; } - output << actor.GetName() << "(" << actor.GetTypeName() << ", " << actor.GetObjectPtr() << ")"; + output << actor.GetProperty< std::string >( Dali::Actor::Property::NAME ) << "(" << actor.GetTypeName() << ", " << actor.GetObjectPtr() << ")"; if ( HIERARCHY_GEOMETRY ) { - output << " Pos: " << actor.GetCurrentWorldPosition() << " Size: " << actor.GetCurrentSize() << " Scale: " << actor.GetCurrentWorldScale(); + output << " Pos: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::WORLD_POSITION ) << " Size: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::SIZE ) << " Scale: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::WORLD_SCALE ); } if ( HIERARCHY_SENSITIVITY ) diff --git a/dali/internal/event/events/touch-event-processor.cpp b/dali/internal/event/events/touch-event-processor.cpp index fb024a3..145f1ad 100644 --- a/dali/internal/event/events/touch-event-processor.cpp +++ b/dali/internal/event/events/touch-event-processor.cpp @@ -255,7 +255,7 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even DALI_LOG_INFO( gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n", TOUCH_POINT_STATE[iter->GetState()], iter->GetScreenPosition().x, iter->GetScreenPosition().y, ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ), - ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ), + ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ), hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y ); // Only set the currentRenderTask for the primary hit actor. @@ -278,8 +278,8 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even Dali::Actor primaryHitActor = primaryPoint.GetHitActor(); PointState::Type primaryPointState = primaryPoint.GetState(); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast< void* >( &primaryHitActor.GetBaseObject() ) : NULL, primaryHitActor ? primaryHitActor.GetName().c_str() : "" ); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast< void* >( &primaryHitActor.GetBaseObject() ) : NULL, primaryHitActor ? primaryHitActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); if ( ( primaryPointState == PointState::DOWN ) && ( touchEvent.GetPointCount() == 1 ) && diff --git a/dali/internal/event/events/wheel-event-processor.cpp b/dali/internal/event/events/wheel-event-processor.cpp index 107bd27..d2a7645 100644 --- a/dali/internal/event/events/wheel-event-processor.cpp +++ b/dali/internal/event/events/wheel-event-processor.cpp @@ -104,7 +104,7 @@ bool IsActorWheelableFunction(Dali::Actor actor, Dali::HitTestAlgorithm::Travers } case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE: { - if( actor.IsVisible() ) // Actor is visible, if not visible then none of its children are visible. + if( actor.GetProperty< bool >( Dali::Actor::Property::VISIBLE ) ) // Actor is visible, if not visible then none of its children are visible. { hittable = true; } @@ -143,14 +143,14 @@ void WheelEventProcessor::ProcessWheelEvent( const Integration::WheelEvent& even DALI_LOG_INFO( gLogFilter, Debug::General, " Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n", event.point.x, event.point.y, ( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ), - ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ), + ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ), hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y ); // Recursively deliver events to the actor and its parents, until the event is consumed or the stage is reached. Dali::Actor consumedActor = EmitWheelSignals( hitTestResults.actor, wheelEvent ); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "HitActor: (%p) %s\n", hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL, hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ); - DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "HitActor: (%p) %s\n", hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL, hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ); } else { diff --git a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp index 87d8645..140930e 100644 --- a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp +++ b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp @@ -61,9 +61,9 @@ void PrintChildren( Dali::Actor actor, int level ) output << actor.GetTypeName(); - output << ", " << actor.GetName(); + output << ", " << actor.GetProperty< std::string >( Dali::Actor::Property::NAME ); - output << " - Pos: " << actor.GetCurrentPosition() << " Size: " << actor.GetTargetSize(); + output << " - Pos: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ) << " Size: " << actor.GetTargetSize(); output << ", Dirty: (" << ( GetImplementation( actor ).IsLayoutDirty( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutDirty( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")"; output << ", Negotiated: (" << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")"; @@ -460,7 +460,7 @@ void RelayoutController::Relayout() if( actorImpl.RelayoutRequired() ) { - DALI_LOG_INFO( gLogFilter, Debug::General, "[Internal::RelayoutController::Relayout] Negotiating %p %s %s (%.2f, %.2f)\n", &actorImpl, actor.GetTypeName().c_str(), actor.GetName().c_str(), size.width, size.height ); + DALI_LOG_INFO( gLogFilter, Debug::General, "[Internal::RelayoutController::Relayout] Negotiating %p %s %s (%.2f, %.2f)\n", &actorImpl, actor.GetTypeName().c_str(), actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str(), size.width, size.height ); // 3. Negotiate the size with the current actor. Pass it an empty container which the actor // has to fill with all the actors it has not done any size negotiation for. -- 2.7.4 From 1f6620e2137b3c48448b12a433800f4835a72bdb Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Mon, 25 May 2020 14:25:10 +0900 Subject: [PATCH 02/16] DALi Version 1.5.13 Change-Id: I4113aaab64cb2cc77a1dd3fd062d18874a283b2b --- dali/public-api/dali-core-version.cpp | 2 +- packaging/dali.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dali/public-api/dali-core-version.cpp b/dali/public-api/dali-core-version.cpp index fc20f72..e0b974a 100644 --- a/dali/public-api/dali-core-version.cpp +++ b/dali/public-api/dali-core-version.cpp @@ -28,7 +28,7 @@ namespace Dali const uint32_t CORE_MAJOR_VERSION = 1; const uint32_t CORE_MINOR_VERSION = 5; -const uint32_t CORE_MICRO_VERSION = 12; +const uint32_t CORE_MICRO_VERSION = 13; const char * const CORE_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/packaging/dali.spec b/packaging/dali.spec index abd7acf..a55c4fb 100644 --- a/packaging/dali.spec +++ b/packaging/dali.spec @@ -1,6 +1,6 @@ Name: dali Summary: DALi 3D Engine -Version: 1.5.12 +Version: 1.5.13 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT -- 2.7.4 From 5956229f13fff31d436ffa36ff9d314894c162e9 Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Mon, 25 May 2020 15:32:47 +0900 Subject: [PATCH 03/16] Fix documentation of FrameBuffer Change-Id: I2769eb346761de6b33c3dc893d41b166f1841a62 Signed-off-by: Seungho, Baek --- dali/devel-api/rendering/frame-buffer-devel.h | 48 +++++++++++----------- dali/internal/render/common/render-manager.h | 6 +-- .../render/renderers/render-frame-buffer.h | 6 +-- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dali/devel-api/rendering/frame-buffer-devel.h b/dali/devel-api/rendering/frame-buffer-devel.h index 8ffe17c..3d5f5df 100644 --- a/dali/devel-api/rendering/frame-buffer-devel.h +++ b/dali/devel-api/rendering/frame-buffer-devel.h @@ -33,55 +33,55 @@ namespace DevelFrameBuffer constexpr uint8_t MAX_COLOR_ATTACHMENTS = 8; /** - * @brief Attach the base LOD of a depth texture to the framebuffer. + * @brief Attaches the base LOD of a depth texture to the frame buffer. * @note This causes a depth attachment to be added. * - * @param[in] frameBuffer A handle to the framebuffer + * @param[in] frameBuffer A handle to the FrameBuffer * @param[in] texture The texture that will be used as output when rendering - * @note The texture has to have same size as that of FrameBuffer - * otherwise it won't be attached. + * @note The size of the texture has to be same as that of the frame buffer. + * Otherwise, it won't be attached. */ void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture ); /** - * @brief Attach a depth texture to the framebuffer. + * @brief Attaches a depth texture to the frame buffer. * @note This causes a depth attachment to be added. * - * @param[in] frameBuffer A handle to the framebuffer + * @param[in] frameBuffer A handle to the FrameBuffer * @param[in] texture The texture that will be used as output when rendering * @param[in] mipmapLevel The mipmap of the texture to be attached - * @note The mipmapped texture has to have same size as that of FrameBuffer - * otherwise it won't be attached. + * @note The size of the mipmapped texture has to be same as that of the frame buffer. + * Otherwise, it won't be attached. */ void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mipmapLevel ); /** - * @brief Attach the base LOD of a stencil texture to the framebuffer. + * @brief Attaches the base LOD of a stencil texture to the frame buffer. * @note This causes a stencil attachment to be added. * - * @param[in] frameBuffer A handle to the framebuffer + * @param[in] frameBuffer A handle to the FrameBuffer * @param[in] texture The texture that will be used as output when rendering - * @note The texture has to have same size as that of FrameBuffer - * otherwise it won't be attached. + * @note The size of the texture has to be same as that of the frame buffer. + * Otherwise, it won't be attached. */ void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture ); /** - * @brief Attach a depth/stencil texture to the framebuffer. + * @brief Attaches a depth/stencil texture to the frame buffer. * @note This causes a depth/stencil attachment to be added. * - * @param[in] frameBuffer A handle to the framebuffer + * @param[in] frameBuffer A handle to the FrameBuffer * @param[in] texture The texture that will be used as output when rendering * @param[in] mipmapLevel The mipmap of the texture to be attached - * @note The mipmapped texture has to have same size as that of FrameBuffer - * otherwise it won't be attached. + * @note The size of the mipmapped texture has to be same as that of the frame buffer. + * Otherwise, it won't be attached. */ void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mipmapLevel ); /** - * @brief Gets the color texture at the given @a index used as output in the FrameBuffer. + * @brief Gets the color texture at the given @a index used as output in the frame buffer. * - * @param[in] frameBuffer A handle to the framebuffer + * @param[in] frameBuffer A handle to the FrameBuffer * @param[in] index The index required * * @return A handle to the texture used as color output, or an uninitialized handle @@ -92,20 +92,20 @@ void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture, uint3 Texture GetColorTexture( const FrameBuffer frameBuffer, uint8_t index ); /** - * @brief Gets the depth texture used as output in the FrameBuffer. + * @brief Gets the depth texture used as output in the frame buffer. * - * @param[in] frameBuffer A handle to the framebuffer + * @param[in] frameBuffer The FrameBuffer handle * - * @return A handle to the texture used as depth output, or an uninitialized handle + * @return A handle of the texture used as depth output, or an uninitialized handle */ Texture GetDepthTexture( FrameBuffer frameBuffer ); /** - * @brief Gets the depth/stencil texture used as output in the FrameBuffer. + * @brief Gets the depth/stencil texture used as output in the frame buffer. * - * @param[in] frameBuffer A handle to the framebuffer + * @param[in] frameBuffer The FrameBuffer handle * - * @return A handle to the texture used as stencil output, or an uninitialized handle + * @return A handle of the texture used as depth/stencil output, or an uninitialized handle */ Texture GetDepthStencilTexture( FrameBuffer frameBuffer ); diff --git a/dali/internal/render/common/render-manager.h b/dali/internal/render/common/render-manager.h index b91984d..396495e 100644 --- a/dali/internal/render/common/render-manager.h +++ b/dali/internal/render/common/render-manager.h @@ -284,7 +284,7 @@ public: void RemoveFrameBuffer( Render::FrameBuffer* frameBuffer ); /** - * Attach a texture as color output to an existing FrameBuffer + * Attaches a texture as color output to the existing frame buffer * @param[in] frameBuffer The FrameBuffer * @param[in] texture The texture that will be used as output when rendering * @param[in] mipmapLevel The mipmap of the texture to be attached @@ -293,7 +293,7 @@ public: void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer ); /** - * Attach a texture as depth output to an existing FrameBuffer + * Attaches a texture as depth output to the existing frame buffer * @param[in] frameBuffer The FrameBuffer * @param[in] texture The texture that will be used as output when rendering * @param[in] mipmapLevel The mipmap of the texture to be attached @@ -301,7 +301,7 @@ public: void AttachDepthTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel ); /** - * Attach a texture as depth/stencil output to an existing FrameBuffer + * Attaches a texture as depth/stencil output to the existing frame buffer * @param[in] frameBuffer The FrameBuffer * @param[in] texture The texture that will be used as output when rendering * @param[in] mipmapLevel The mipmap of the texture to be attached diff --git a/dali/internal/render/renderers/render-frame-buffer.h b/dali/internal/render/renderers/render-frame-buffer.h index d88bb8a..5dbbc32 100644 --- a/dali/internal/render/renderers/render-frame-buffer.h +++ b/dali/internal/render/renderers/render-frame-buffer.h @@ -84,7 +84,7 @@ public: virtual uint32_t GetHeight() const; /** - * @brief Attach a texture for color rendering. Valid only for Framebuffers with COLOR attachments. + * @brief Attaches a texture for the color rendering. This API is valid only for frame buffer with COLOR attachments. * @param[in] context The GL context * @param[in] texture The texture that will be used as output when rendering * @param[in] mipmapLevel The mipmap of the texture to be attached @@ -94,7 +94,7 @@ public: void AttachColorTexture( Context& context, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer ); /** - * @brief Attach a texture for depth rendering. Valid only for Framebuffers with DEPTH attachments. + * @brief Attaches a texture for the depth rendering. This API is valid only for frame buffer with DEPTH attachments. * @param[in] context The GL context * @param[in] texture The texture that will be used as output when rendering * @param[in] mipmapLevel The mipmap of the texture to be attached @@ -102,7 +102,7 @@ public: void AttachDepthTexture( Context& context, Render::Texture* texture, uint32_t mipmapLevel ); /** - * @brief Attach a texture for depth/stencil rendering. Valid only for Framebuffers with DEPTH_STENCIL attachments. + * @brief Attaches a texture for the depth/stencil rendering. This API is valid only for frame buffer with DEPTH_STENCIL attachments. * @param[in] context The GL context * @param[in] texture The texture that will be used as output when rendering * @param[in] mipmapLevel The mipmap of the texture to be attached -- 2.7.4 From da3511c7849b526c338d5ae95ecfc4a4770c609a Mon Sep 17 00:00:00 2001 From: Sunghyun Kim Date: Thu, 21 May 2020 11:23:27 +0900 Subject: [PATCH 04/16] Call SetClearEnabled() for clearing background Default window already set Background because it is base on stage But extra Window doesn't set background. Change-Id: I0cada60409361bd31e4b01f2b2fd8333c2fe671b --- dali/internal/event/common/scene-impl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dali/internal/event/common/scene-impl.cpp b/dali/internal/event/common/scene-impl.cpp index 2cc2cdc..d7b80d6 100644 --- a/dali/internal/event/common/scene-impl.cpp +++ b/dali/internal/event/common/scene-impl.cpp @@ -133,8 +133,9 @@ void Scene::Initialize( Size size ) // Create the list of render-tasks mRenderTaskList = RenderTaskList::New(); - // Create the default render-task - mRenderTaskList->CreateTask( mRootLayer.Get(), mDefaultCamera.Get() ); + // Create the default render-task and ensure clear is enabled on it to show the background color + RenderTaskPtr renderTask = mRenderTaskList->CreateTask( mRootLayer.Get(), mDefaultCamera.Get() ); + renderTask->SetClearEnabled(true); SurfaceResized( size.width, size.height ); -- 2.7.4 From d120946c5c9b663c5c9f8046825a7acf01a8cf98 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Fri, 29 May 2020 11:05:28 +0900 Subject: [PATCH 05/16] Fix actor size issue SetSize() was ignored if Actor::SetSize() and the size animation was used at the same time because the mRelayoutData->preferredSize was updated in OnNotifyDefaultPropertyAnimation(). Do not change mRelayoutData->preferredSize in OnNotifyDefaultPropertyAnimation() and keep the animated size value as a separate value while the animation is playing. Change-Id: I2de604e9e10c22e970dbc5902826cd67eb306f54 --- automated-tests/src/dali/utc-Dali-Actor.cpp | 64 +++++++++++++++---- dali/internal/event/actors/actor-impl.cpp | 99 ++++++++++++++++------------- dali/internal/event/actors/actor-impl.h | 13 ++++ 3 files changed, 117 insertions(+), 59 deletions(-) diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index 4cc24d0..2a9e110 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -7268,36 +7268,52 @@ int utcDaliEnsureRenderWhenMakingLastActorInvisible(void) int utcDaliActorGetSizeAfterAnimation(void) { TestApplication application; - tet_infoline( "Check the actor size when an animation is finished" ); + tet_infoline( "Check the actor size before / after an animation is finished" ); - Vector3 vector( 100.0f, 100.0f, 0.0f ); + Vector3 actorSize( 100.0f, 100.0f, 0.0f ); Actor actor = Actor::New(); - actor.SetSize( vector.x, vector.y ); + actor.SetSize( actorSize ); actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); Stage::GetCurrent().Add( actor ); + // Size should be updated without rendering. + Vector3 size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); + DALI_TEST_EQUALS( size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + application.SendNotification(); application.Render(); - Vector3 size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); - DALI_TEST_EQUALS( size, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION ); - DALI_TEST_EQUALS( vector.width, actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), TEST_LOCATION ); - DALI_TEST_EQUALS( vector.height, actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION ); - DALI_TEST_EQUALS( vector.depth, actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), TEST_LOCATION ); + // Size and current size should be updated. + size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); + DALI_TEST_EQUALS( size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + DALI_TEST_EQUALS( actorSize.width, actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), TEST_LOCATION ); + DALI_TEST_EQUALS( actorSize.height, actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION ); + DALI_TEST_EQUALS( actorSize.depth, actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), TEST_LOCATION ); Vector3 currentSize = actor.GetCurrentProperty( Actor::Property::SIZE ).Get< Vector3 >(); - DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION ); - DALI_TEST_EQUALS( vector.width, actor.GetCurrentProperty< float >( Actor::Property::SIZE_WIDTH ), TEST_LOCATION ); - DALI_TEST_EQUALS( vector.height, actor.GetCurrentProperty< float >( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION ); - DALI_TEST_EQUALS( vector.depth, actor.GetCurrentProperty< float >( Actor::Property::SIZE_DEPTH ), TEST_LOCATION ); + DALI_TEST_EQUALS( currentSize, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + DALI_TEST_EQUALS( actorSize.width, actor.GetCurrentProperty< float >( Actor::Property::SIZE_WIDTH ), TEST_LOCATION ); + DALI_TEST_EQUALS( actorSize.height, actor.GetCurrentProperty< float >( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION ); + DALI_TEST_EQUALS( actorSize.depth, actor.GetCurrentProperty< float >( Actor::Property::SIZE_DEPTH ), TEST_LOCATION ); + + // Set size again + actorSize = Vector3( 200.0f, 200.0f, 0.0f ); + actor.SetSize( actorSize ); - Vector3 targetValue( 10.0f, 20.0f, 30.0f ); + size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); + DALI_TEST_EQUALS( size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + + Vector3 targetValue( 10.0f, 20.0f, 0.0f ); Animation animation = Animation::New( 1.0f ); animation.AnimateTo( Property( actor, Actor::Property::SIZE ), targetValue ); animation.Play(); + // Size should be updated without rendering. + size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); + DALI_TEST_EQUALS( size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + application.SendNotification(); application.Render( 1100 ); // After the animation @@ -7355,7 +7371,7 @@ int utcDaliActorGetSizeAfterAnimation(void) DALI_TEST_EQUALS( targetValue.height, actor.GetCurrentProperty< float >( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION ); DALI_TEST_EQUALS( targetValue.depth, actor.GetCurrentProperty< float >( Actor::Property::SIZE_DEPTH ), TEST_LOCATION ); - Vector3 offset( 10.0f, 20.0f, 30.0f ); + Vector3 offset( 10.0f, 20.0f, 0.0f ); animation.Clear(); animation.AnimateBy( Property( actor, Actor::Property::SIZE ), offset ); @@ -7424,5 +7440,25 @@ int utcDaliActorGetSizeAfterAnimation(void) DALI_TEST_EQUALS( targetValue.height, actor.GetCurrentProperty< float >( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION ); DALI_TEST_EQUALS( targetValue.depth, actor.GetCurrentProperty< float >( Actor::Property::SIZE_DEPTH ), TEST_LOCATION ); + // Set size again + actorSize = Vector3( 300.0f, 300.0f, 0.0f ); + + actor.SetSize( actorSize ); + + size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); + DALI_TEST_EQUALS( size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + + currentSize = actor.GetCurrentProperty( Actor::Property::SIZE ).Get< Vector3 >(); + DALI_TEST_EQUALS( currentSize, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + + application.SendNotification(); + application.Render(); + + size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >(); + DALI_TEST_EQUALS( size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + + currentSize = actor.GetCurrentProperty( Actor::Property::SIZE ).Get< Vector3 >(); + DALI_TEST_EQUALS( currentSize, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION ); + END_TEST; } diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index ae02f5d..4dfa789 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -1154,6 +1154,8 @@ void Actor::SetWidth( float width ) SceneGraph::NodeTransformComponentMessage::Send( GetEventThreadServices(), &GetNode(), &GetNode().mSize, &SceneGraph::TransformManagerPropertyHandler::BakeX, width ); } + mUseAnimatedSize &= ~AnimatedSizeFlag::WIDTH; + RelayoutRequest(); } @@ -1172,6 +1174,8 @@ void Actor::SetHeight( float height ) SceneGraph::NodeTransformComponentMessage::Send( GetEventThreadServices(), &GetNode(), &GetNode().mSize, &SceneGraph::TransformManagerPropertyHandler::BakeY, height ); } + mUseAnimatedSize &= ~AnimatedSizeFlag::HEIGHT; + RelayoutRequest(); } @@ -1179,6 +1183,8 @@ void Actor::SetDepth( float depth ) { mTargetSize.depth = depth; + mUseAnimatedSize &= ~AnimatedSizeFlag::DEPTH; + // node is being used in a separate thread; queue a message to set the value & base value SceneGraph::NodeTransformComponentMessage::Send( GetEventThreadServices(), &GetNode(), &GetNode().mSize, &SceneGraph::TransformManagerPropertyHandler::BakeZ, depth ); } @@ -1187,14 +1193,35 @@ Vector3 Actor::GetTargetSize() const { Vector3 size = mTargetSize; - // Should return preferred size if size is fixed as set by SetSize - if( GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) + if( mUseAnimatedSize & AnimatedSizeFlag::WIDTH ) + { + // Should return animated size if size is animated + size.width = mAnimatedSize.width; + } + else + { + // Should return preferred size if size is fixed as set by SetSize + if( GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) + { + size.width = GetPreferredSize().width; + } + } + + if( mUseAnimatedSize & AnimatedSizeFlag::HEIGHT ) { - size.width = GetPreferredSize().width; + size.height = mAnimatedSize.height; + } + else + { + if( GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) + { + size.height = GetPreferredSize().height; + } } - if( GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) + + if( mUseAnimatedSize & AnimatedSizeFlag::DEPTH ) { - size.height = GetPreferredSize().height; + size.depth = mAnimatedSize.depth; } return size; @@ -2031,9 +2058,11 @@ Actor::Actor( DerivedType derivedType, const SceneGraph::Node& node ) mTargetSize( Vector3::ZERO ), mTargetPosition( Vector3::ZERO ), mTargetScale( Vector3::ONE ), + mAnimatedSize( Vector3::ZERO ), mName(), mSortedDepth( 0u ), mDepth( 0u ), + mUseAnimatedSize( AnimatedSizeFlag::CLEAR ), mIsRoot( ROOT_LAYER == derivedType ), mIsLayer( LAYER == derivedType || ROOT_LAYER == derivedType ), mIsOnStage( false ), @@ -2930,18 +2959,8 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( value.Get( mTargetSize ) ) { - if( mRelayoutData ) - { - if( GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) - { - mRelayoutData->preferredSize.width = mTargetSize.width; - } - - if( GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) - { - mRelayoutData->preferredSize.height = mTargetSize.height; - } - } + mAnimatedSize = mTargetSize; + mUseAnimatedSize = AnimatedSizeFlag::WIDTH | AnimatedSizeFlag::HEIGHT | AnimatedSizeFlag::DEPTH; // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); @@ -2953,10 +2972,8 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( value.Get( mTargetSize.width ) ) { - if( mRelayoutData && GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) - { - mRelayoutData->preferredSize.width = mTargetSize.width; - } + mAnimatedSize.width = mTargetSize.width; + mUseAnimatedSize |= AnimatedSizeFlag::WIDTH; // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); @@ -2968,10 +2985,8 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( value.Get( mTargetSize.height ) ) { - if( mRelayoutData && GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) - { - mRelayoutData->preferredSize.height = mTargetSize.height; - } + mAnimatedSize.height = mTargetSize.height; + mUseAnimatedSize |= AnimatedSizeFlag::HEIGHT; // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); @@ -2983,6 +2998,9 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( value.Get( mTargetSize.depth ) ) { + mAnimatedSize.depth = mTargetSize.depth; + mUseAnimatedSize |= AnimatedSizeFlag::DEPTH; + // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); } @@ -3097,18 +3115,8 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( AdjustValue< Vector3 >( mTargetSize, value ) ) { - if( mRelayoutData ) - { - if( GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) - { - mRelayoutData->preferredSize.width = mTargetSize.width; - } - - if( GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) - { - mRelayoutData->preferredSize.height = mTargetSize.height; - } - } + mAnimatedSize = mTargetSize; + mUseAnimatedSize = AnimatedSizeFlag::WIDTH | AnimatedSizeFlag::HEIGHT | AnimatedSizeFlag::DEPTH; // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); @@ -3120,10 +3128,8 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( AdjustValue< float >( mTargetSize.width, value ) ) { - if( mRelayoutData && GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) - { - mRelayoutData->preferredSize.width = mTargetSize.width; - } + mAnimatedSize.width = mTargetSize.width; + mUseAnimatedSize |= AnimatedSizeFlag::WIDTH; // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); @@ -3135,10 +3141,8 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( AdjustValue< float >( mTargetSize.height, value ) ) { - if( mRelayoutData && GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) - { - mRelayoutData->preferredSize.height = mTargetSize.height; - } + mAnimatedSize.height = mTargetSize.height; + mUseAnimatedSize |= AnimatedSizeFlag::HEIGHT; // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); @@ -3150,6 +3154,9 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( AdjustValue< float >( mTargetSize.depth, value ) ) { + mAnimatedSize.depth = mTargetSize.depth; + mUseAnimatedSize |= AnimatedSizeFlag::DEPTH; + // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); } @@ -4709,6 +4716,8 @@ void Actor::SetPreferredSize( const Vector2& size ) mRelayoutData->preferredSize = size; + mUseAnimatedSize = AnimatedSizeFlag::CLEAR; + RelayoutRequest(); } diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h index 92e6ab8..bf58f23 100755 --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -1740,6 +1740,17 @@ private: }; }; + struct AnimatedSizeFlag + { + enum Type + { + CLEAR = 0, + WIDTH = 1, + HEIGHT = 2, + DEPTH = 4 + }; + }; + // Remove default constructor and copy constructor Actor() = delete; Actor( const Actor& ) = delete; @@ -1970,10 +1981,12 @@ protected: Vector3 mTargetSize; ///< Event-side storage for size (not a pointer as most actors will have a size) Vector3 mTargetPosition; ///< Event-side storage for position (not a pointer as most actors will have a position) Vector3 mTargetScale; ///< Event-side storage for scale + Vector3 mAnimatedSize; ///< Event-side storage for size animation std::string mName; ///< Name of the actor uint32_t mSortedDepth; ///< The sorted depth index. A combination of tree traversal and sibling order. int16_t mDepth; ///< The depth in the hierarchy of the actor. Only 32,767 levels of depth are supported + uint16_t mUseAnimatedSize; ///< Whether the size is animated. const bool mIsRoot : 1; ///< Flag to identify the root actor const bool mIsLayer : 1; ///< Flag to identify that this is a layer -- 2.7.4 From 6b5d6c23dedaab3b022d5bfe5bc7e09d885c234d Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Tue, 2 Jun 2020 15:17:57 +0900 Subject: [PATCH 06/16] DALi Version 1.5.14 Change-Id: I32390d338ed30ba615c59511e0ded5a556b7e075 --- dali/public-api/dali-core-version.cpp | 2 +- packaging/dali.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dali/public-api/dali-core-version.cpp b/dali/public-api/dali-core-version.cpp index e0b974a..a6cbf30 100644 --- a/dali/public-api/dali-core-version.cpp +++ b/dali/public-api/dali-core-version.cpp @@ -28,7 +28,7 @@ namespace Dali const uint32_t CORE_MAJOR_VERSION = 1; const uint32_t CORE_MINOR_VERSION = 5; -const uint32_t CORE_MICRO_VERSION = 13; +const uint32_t CORE_MICRO_VERSION = 14; const char * const CORE_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/packaging/dali.spec b/packaging/dali.spec index a55c4fb..218dd70 100644 --- a/packaging/dali.spec +++ b/packaging/dali.spec @@ -1,6 +1,6 @@ Name: dali Summary: DALi 3D Engine -Version: 1.5.13 +Version: 1.5.14 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT -- 2.7.4 From 514d5a10c9349236ac74d0e20f7eaf612d86a3ff Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 19 May 2020 17:27:08 +0900 Subject: [PATCH 07/16] Ensure not rendering before a Renderer is added Change-Id: Ia933e3058e90ca563d035f8d041fc062a96625e3 --- .../dali-test-suite-utils/test-application.cpp | 17 ++++++-- .../dali/dali-test-suite-utils/test-application.h | 1 + automated-tests/src/dali/utc-Dali-Scene.cpp | 49 ++++++++++++++++++++++ dali/integration-api/core.cpp | 4 +- dali/integration-api/core.h | 3 +- dali/internal/common/core-impl.cpp | 4 +- dali/internal/common/core-impl.h | 2 +- dali/internal/render/common/render-manager.cpp | 11 ++--- dali/internal/render/common/render-manager.h | 3 +- 9 files changed, 76 insertions(+), 18 deletions(-) diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp index f85f14d..e8c0d12 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp @@ -188,9 +188,13 @@ bool TestApplication::Render( uint32_t intervalMilliseconds, const char* locatio { DoUpdate( intervalMilliseconds, location ); + // Reset the status + mRenderStatus.SetNeedsUpdate( false ); + mRenderStatus.SetNeedsPostRender( false ); + mCore->PreRender( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); - mCore->RenderScene( mScene, true /*render the off-screen buffers*/); - mCore->RenderScene( mScene, false /*render the surface*/); + mCore->RenderScene( mRenderStatus, mScene, true /*render the off-screen buffers*/); + mCore->RenderScene( mRenderStatus, mScene, false /*render the surface*/); mCore->PostRender( false /*do not skip rendering*/ ); mFrame++; @@ -214,12 +218,17 @@ bool TestApplication::GetRenderNeedsUpdate() return mRenderStatus.NeedsUpdate(); } +bool TestApplication::GetRenderNeedsPostRender() +{ + return mRenderStatus.NeedsPostRender(); +} + bool TestApplication::RenderOnly( ) { // Update Time values mCore->PreRender( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); - mCore->RenderScene( mScene, true /*render the off-screen buffers*/); - mCore->RenderScene( mScene, false /*render the surface*/); + mCore->RenderScene( mRenderStatus, mScene, true /*render the off-screen buffers*/); + mCore->RenderScene( mRenderStatus, mScene, false /*render the surface*/); mCore->PostRender( false /*do not skip rendering*/ ); mFrame++; diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.h b/automated-tests/src/dali/dali-test-suite-utils/test-application.h index a922e23..e96f759 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.h @@ -74,6 +74,7 @@ public: bool RenderOnly( ); void ResetContext(); bool GetRenderNeedsUpdate(); + bool GetRenderNeedsPostRender(); uint32_t Wait( uint32_t durationToWait ); static void EnableLogging( bool enabled ) { diff --git a/automated-tests/src/dali/utc-Dali-Scene.cpp b/automated-tests/src/dali/utc-Dali-Scene.cpp index c2335ed..b52e2c2 100644 --- a/automated-tests/src/dali/utc-Dali-Scene.cpp +++ b/automated-tests/src/dali/utc-Dali-Scene.cpp @@ -1166,3 +1166,52 @@ int UtcDaliSceneEnsureReplacedSurfaceKeepsClearColor(void) END_TEST; } + +int UtcDaliSceneEmptySceneRendering(void) +{ + tet_infoline( "Ensure not rendering before a Renderer is added" ); + + TestApplication application; + TestGlAbstraction& glAbstraction = application.GetGlAbstraction(); + + // Render without any renderer + application.SendNotification(); + application.Render(); + + // Check the clear count and the render status + DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), 0, TEST_LOCATION ); + DALI_TEST_EQUALS( application.GetRenderNeedsPostRender(), false, TEST_LOCATION ); + + // Add a Renderer + Geometry geometry = CreateQuadGeometry(); + Shader shader = CreateShader(); + Renderer renderer = Renderer::New( geometry, shader ); + + Actor actor = Actor::New(); + actor.AddRenderer( renderer ); + actor.SetSize( 400, 400 ); + Stage::GetCurrent().Add( actor ); + + // Render + application.SendNotification(); + application.Render(); + + // Check the clear count and the render status + DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), 1, TEST_LOCATION ); + DALI_TEST_EQUALS( application.GetRenderNeedsPostRender(), true, TEST_LOCATION ); + + // Remove the Renderer + Stage::GetCurrent().Remove( actor ); + actor.Reset(); + renderer.Reset(); + + // Render + application.SendNotification(); + application.Render(); + + // Check the clear count and the render status + DALI_TEST_EQUALS( glAbstraction.GetClearCountCalled(), 2, TEST_LOCATION ); // Should be cleared + DALI_TEST_EQUALS( application.GetRenderNeedsPostRender(), true, TEST_LOCATION ); + + END_TEST; +} diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index d15cd28..47eb713 100644 --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.cpp @@ -116,9 +116,9 @@ void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly ) mImpl->PreRender( status, forceClear, uploadOnly ); } -void Core::RenderScene( Integration::Scene& scene, bool renderToFbo ) +void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo ) { - mImpl->RenderScene( scene, renderToFbo ); + mImpl->RenderScene( status, scene, renderToFbo ); } void Core::PostRender( bool uploadOnly ) diff --git a/dali/integration-api/core.h b/dali/integration-api/core.h index f2a9f7a..f1a7e63 100644 --- a/dali/integration-api/core.h +++ b/dali/integration-api/core.h @@ -354,10 +354,11 @@ public: * and the second pass to render the surface. * Multi-threading note: this method should be called from a dedicated rendering thread. * @pre The GL context must have been created, and made current. + * @param[out] status Contains the rendering flags. * @param[in] scene The scene to be rendered. * @param[in] renderToFbo True to render off-screen frame buffers only if any, and False to render the surface only. */ - void RenderScene( Integration::Scene& scene, bool renderToFbo ); + void RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo ); /** diff --git a/dali/internal/common/core-impl.cpp b/dali/internal/common/core-impl.cpp index f1c6cd4..5da52a4 100644 --- a/dali/internal/common/core-impl.cpp +++ b/dali/internal/common/core-impl.cpp @@ -221,9 +221,9 @@ void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly ) mRenderManager->PreRender( status, forceClear, uploadOnly ); } -void Core::RenderScene( Integration::Scene& scene, bool renderToFbo ) +void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo ) { - mRenderManager->RenderScene( scene, renderToFbo ); + mRenderManager->RenderScene( status, scene, renderToFbo ); } void Core::PostRender( bool uploadOnly ) diff --git a/dali/internal/common/core-impl.h b/dali/internal/common/core-impl.h index 9272e16..cbe41a4 100644 --- a/dali/internal/common/core-impl.h +++ b/dali/internal/common/core-impl.h @@ -136,7 +136,7 @@ public: /** * @copydoc Dali::Integration::Core::RenderScene() */ - void RenderScene( Integration::Scene& scene, bool renderToFbo ); + void RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo ); /** * @copydoc Dali::Integration::Core::Render() diff --git a/dali/internal/render/common/render-manager.cpp b/dali/internal/render/common/render-manager.cpp index 5a0d3c1..77f6088 100644 --- a/dali/internal/render/common/render-manager.cpp +++ b/dali/internal/render/common/render-manager.cpp @@ -507,12 +507,6 @@ void RenderManager::PreRender( Integration::RenderStatus& status, bool forceClea { DALI_LOG_INFO( gLogFilter, Debug::General, "Render: Processing\n" ); - if ( !uploadOnly ) - { - // Mark that we will require a post-render step to be performed (includes swap-buffers). - status.SetNeedsPostRender( true ); - } - // Switch to the shared context if ( mImpl->currentContext != &mImpl->context ) { @@ -570,7 +564,7 @@ void RenderManager::PreRender( Integration::RenderStatus& status, bool forceClea } -void RenderManager::RenderScene( Integration::Scene& scene, bool renderToFbo ) +void RenderManager::RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo ) { Internal::Scene& sceneInternal = GetImplementation( scene ); SceneGraph::Scene* sceneObject = sceneInternal.GetSceneObject(); @@ -586,6 +580,9 @@ void RenderManager::RenderScene( Integration::Scene& scene, bool renderToFbo ) continue; // skip } + // Mark that we will require a post-render step to be performed (includes swap-buffers). + status.SetNeedsPostRender( true ); + Rect viewportRect; Vector4 clearColor; diff --git a/dali/internal/render/common/render-manager.h b/dali/internal/render/common/render-manager.h index 396495e..5ed4296 100644 --- a/dali/internal/render/common/render-manager.h +++ b/dali/internal/render/common/render-manager.h @@ -367,10 +367,11 @@ public: * and the second pass to render the surface. * Multi-threading note: this method should be called from a dedicated rendering thread. * @pre The GL context must have been created, and made current. + * @param[out] status contains the rendering flags. * @param[in] scene The scene to be rendered. * @param[in] renderToFbo True to render off-screen frame buffers only if any, and False to render the surface only. */ - void RenderScene( Integration::Scene& scene, bool renderToFbo ); + void RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo ); // This method should be called from Core::PostRender() -- 2.7.4 From 02dfc0279ff46255d6ef965bcb28e525d2c3812d Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Tue, 2 Jun 2020 15:29:18 +0900 Subject: [PATCH 08/16] Return Animation information Change-Id: Icc69c676d45ae5205bfa8a30bdae83aa9bff01a4 Signed-off-by: Seungho, Baek --- automated-tests/src/dali/utc-Dali-Animation.cpp | 39 ++++++++++++++++++++++ dali/devel-api/animation/animation-devel.cpp | 16 ++++++++- dali/devel-api/animation/animation-devel.h | 18 ++++++++-- .../event/animation/animation-playlist.cpp | 17 +++++++++- dali/internal/event/animation/animation-playlist.h | 17 +++++++++- 5 files changed, 102 insertions(+), 5 deletions(-) diff --git a/automated-tests/src/dali/utc-Dali-Animation.cpp b/automated-tests/src/dali/utc-Dali-Animation.cpp index 0c53693..8446f3d 100644 --- a/automated-tests/src/dali/utc-Dali-Animation.cpp +++ b/automated-tests/src/dali/utc-Dali-Animation.cpp @@ -13528,3 +13528,42 @@ int UtcDaliAnimationCombineToAndByWithStop(void) END_TEST; } + +int UtcDaliAnimationCountAndGetAnimationAt(void) +{ + tet_infoline( "UtcDaliAnimationCountAndGetAnimationAt"); + + TestApplication application; + + auto actor = Actor::New(); + actor.SetPosition( 100.0f, 100.0f ); + Stage::GetCurrent().Add( actor ); + + auto animation = Animation::New( 1.0f ); + const float origY = actor.GetProperty( Actor::Property::POSITION_Y ).Get< float >(); + animation.AnimateTo( Property( actor, Actor::Property::POSITION ), Vector3( 150.0f, origY, 0.0f ), TimePeriod( 1.0f ) ); + animation.Play(); + + application.SendNotification(); + application.Render( 500 ); + + uint32_t animationCount = Dali::DevelAnimation::GetAnimationCount(); + DALI_TEST_EQUALS( animationCount, 1, TEST_LOCATION ); + + DALI_TEST_CHECK( !Dali::DevelAnimation::GetAnimationAt( 5 ) ); + + Dali::Animation animationReturned = Dali::DevelAnimation::GetAnimationAt( 0 ); + DALI_TEST_EQUALS( animationReturned.GetState(), Dali::Animation::State::PLAYING, TEST_LOCATION ); + + DALI_TEST_EQUALS( animation.GetDuration(), animationReturned.GetDuration(), TEST_LOCATION ); + DALI_TEST_EQUALS( animation.GetLoopCount(), animationReturned.GetLoopCount(), TEST_LOCATION ); + DALI_TEST_EQUALS( animation.IsLooping(), animationReturned.IsLooping(), TEST_LOCATION ); + DALI_TEST_EQUALS( animation.GetEndAction(), animationReturned.GetEndAction(), TEST_LOCATION ); + DALI_TEST_EQUALS( animation.GetState(), animationReturned.GetState(), TEST_LOCATION ); + + // Stop and clear the animation using the current values + animation.Stop(); + animation.Clear(); + + END_TEST; +} diff --git a/dali/devel-api/animation/animation-devel.cpp b/dali/devel-api/animation/animation-devel.cpp index 0840ae7..4fba68b 100644 --- a/dali/devel-api/animation/animation-devel.cpp +++ b/dali/devel-api/animation/animation-devel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,8 @@ // INTERNAL INCLUDES #include #include +#include +#include namespace Dali { @@ -40,6 +42,18 @@ Animation::AnimationSignalType& ProgressReachedSignal( Animation animation ) return GetImplementation( animation ).ProgressReachedSignal(); } +uint32_t GetAnimationCount() +{ + Dali::Internal::ThreadLocalStorage& tls = Dali::Internal::ThreadLocalStorage::Get(); + return tls.GetAnimationPlaylist().GetAnimationCount(); +} + +Animation GetAnimationAt( uint32_t index ) +{ + Dali::Internal::ThreadLocalStorage& tls = Dali::Internal::ThreadLocalStorage::Get(); + return tls.GetAnimationPlaylist().GetAnimationAt( index ); +} + } // namespace DevelAnimation } // namespace Dali diff --git a/dali/devel-api/animation/animation-devel.h b/dali/devel-api/animation/animation-devel.h index f003075..b7b6019 100644 --- a/dali/devel-api/animation/animation-devel.h +++ b/dali/devel-api/animation/animation-devel.h @@ -2,7 +2,7 @@ #define DALI_ANIMATION_DEVEL_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,10 +47,24 @@ DALI_CORE_API float GetProgressNotification( Animation animation ); * @brief Connects to this signal to be notified when an Animation's animations have reached set progress. * * @return A signal object to connect with - * */ DALI_CORE_API Animation::AnimationSignalType& ProgressReachedSignal( Animation animation ); +/** + * @brief Retrive the number of Animations. + * + * @return The number of Animations. + */ +DALI_CORE_API uint32_t GetAnimationCount(); + +/** + * @brief Retrieve an Animation by index. + * + * @param[in] index The index of the Animation to retrieve + * @return The animation for the given index or empty handle + */ +DALI_CORE_API Animation GetAnimationAt( uint32_t index ); + } // namespace DevelAnimation } // namespace Dali diff --git a/dali/internal/event/animation/animation-playlist.cpp b/dali/internal/event/animation/animation-playlist.cpp index 55c9b91..c39385f 100644 --- a/dali/internal/event/animation/animation-playlist.cpp +++ b/dali/internal/event/animation/animation-playlist.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,6 +127,21 @@ void AnimationPlaylist::NotifyProgressReached( const SceneGraph::Animation* scen } } +uint32_t AnimationPlaylist::GetAnimationCount() +{ + return mAnimations.Size(); +} + +Dali::Animation AnimationPlaylist::GetAnimationAt( uint32_t index ) +{ + if( index >= mAnimations.Size() ) + { + DALI_LOG_ERROR( "Animation index is out of bounds.\n" ); + return Dali::Animation(); + } + return Dali::Animation( mAnimations[index] ); +} + } // namespace Internal } // namespace Dali diff --git a/dali/internal/event/animation/animation-playlist.h b/dali/internal/event/animation/animation-playlist.h index 2fa0787..c31c11d 100644 --- a/dali/internal/event/animation/animation-playlist.h +++ b/dali/internal/event/animation/animation-playlist.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_ANIMATION_PLAYLIST_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,6 +81,21 @@ public: */ void NotifyProgressReached( const SceneGraph::Animation* sceneGraphAnimation ); + /** + * @brief Retrive the number of Animations. + * + * @return The number of Animations. + */ + uint32_t GetAnimationCount(); + + /** + * @brief Retrieve an Animation by index. + * + * @param[in] index The index of the Animation to retrieve + * @return The Dali::Animation for the given index or empty handle + */ + Dali::Animation GetAnimationAt( uint32_t index ); + private: /** -- 2.7.4 From 5ec1b46e91b10fdcbb6787b2f00cae97cc870949 Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Thu, 4 Jun 2020 10:55:09 +0900 Subject: [PATCH 09/16] Add DALI_CORE_API at the DevelFrameBuffer apis Change-Id: I978ae6d7c2d0ec44e70253de13df7686aa82e015 Signed-off-by: Seungho, Baek --- dali/devel-api/rendering/frame-buffer-devel.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dali/devel-api/rendering/frame-buffer-devel.h b/dali/devel-api/rendering/frame-buffer-devel.h index 3d5f5df..64d58a4 100644 --- a/dali/devel-api/rendering/frame-buffer-devel.h +++ b/dali/devel-api/rendering/frame-buffer-devel.h @@ -41,7 +41,7 @@ constexpr uint8_t MAX_COLOR_ATTACHMENTS = 8; * @note The size of the texture has to be same as that of the frame buffer. * Otherwise, it won't be attached. */ -void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture ); +DALI_CORE_API void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture ); /** * @brief Attaches a depth texture to the frame buffer. @@ -53,7 +53,7 @@ void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture ); * @note The size of the mipmapped texture has to be same as that of the frame buffer. * Otherwise, it won't be attached. */ -void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mipmapLevel ); +DALI_CORE_API void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mipmapLevel ); /** * @brief Attaches the base LOD of a stencil texture to the frame buffer. @@ -64,7 +64,7 @@ void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mip * @note The size of the texture has to be same as that of the frame buffer. * Otherwise, it won't be attached. */ -void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture ); +DALI_CORE_API void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture ); /** * @brief Attaches a depth/stencil texture to the frame buffer. @@ -76,7 +76,7 @@ void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture ); * @note The size of the mipmapped texture has to be same as that of the frame buffer. * Otherwise, it won't be attached. */ -void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mipmapLevel ); +DALI_CORE_API void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mipmapLevel ); /** * @brief Gets the color texture at the given @a index used as output in the frame buffer. @@ -89,7 +89,7 @@ void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture, uint3 * @note A maximum of 8 color attachments are supported. Passing an invalid index will return * an uninitialized handle. */ -Texture GetColorTexture( const FrameBuffer frameBuffer, uint8_t index ); +DALI_CORE_API Texture GetColorTexture( const FrameBuffer frameBuffer, uint8_t index ); /** * @brief Gets the depth texture used as output in the frame buffer. @@ -98,7 +98,7 @@ Texture GetColorTexture( const FrameBuffer frameBuffer, uint8_t index ); * * @return A handle of the texture used as depth output, or an uninitialized handle */ -Texture GetDepthTexture( FrameBuffer frameBuffer ); +DALI_CORE_API Texture GetDepthTexture( FrameBuffer frameBuffer ); /** * @brief Gets the depth/stencil texture used as output in the frame buffer. @@ -107,7 +107,7 @@ Texture GetDepthTexture( FrameBuffer frameBuffer ); * * @return A handle of the texture used as depth/stencil output, or an uninitialized handle */ -Texture GetDepthStencilTexture( FrameBuffer frameBuffer ); +DALI_CORE_API Texture GetDepthStencilTexture( FrameBuffer frameBuffer ); } // namespace DevelFrameBuffer -- 2.7.4 From c54c871899894a8cf28f019979a908dd38168b88 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Mon, 8 Jun 2020 19:07:42 +0900 Subject: [PATCH 10/16] DALi Version 1.5.15 Change-Id: I96951aa940dad25db44221215c22dba64f156715 --- dali/public-api/dali-core-version.cpp | 2 +- packaging/dali.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dali/public-api/dali-core-version.cpp b/dali/public-api/dali-core-version.cpp index a6cbf30..81fdc88 100644 --- a/dali/public-api/dali-core-version.cpp +++ b/dali/public-api/dali-core-version.cpp @@ -28,7 +28,7 @@ namespace Dali const uint32_t CORE_MAJOR_VERSION = 1; const uint32_t CORE_MINOR_VERSION = 5; -const uint32_t CORE_MICRO_VERSION = 14; +const uint32_t CORE_MICRO_VERSION = 15; const char * const CORE_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/packaging/dali.spec b/packaging/dali.spec index 218dd70..83d8a5d 100644 --- a/packaging/dali.spec +++ b/packaging/dali.spec @@ -1,6 +1,6 @@ Name: dali Summary: DALi 3D Engine -Version: 1.5.14 +Version: 1.5.15 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT -- 2.7.4 From 5338e5b35bf2cbd6ca79dc04d227d5c57030e692 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Mon, 8 Jun 2020 17:39:43 +0900 Subject: [PATCH 11/16] Always throw an exception in GetEventThreadServices() if the Core is not running Change-Id: If6e77e7b61ba02319a39079c6619682d5bffd4a8 --- automated-tests/src/dali/utc-Dali-Actor.cpp | 40 ++++++++++++++++++++++++++++- dali/internal/event/actors/actor-impl.cpp | 3 +++ dali/internal/event/common/object-impl.h | 4 +-- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index 2a9e110..e96ab7a 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -3875,7 +3875,7 @@ int UtcDaliActorAddRendererP(void) END_TEST; } -int UtcDaliActorAddRendererN(void) +int UtcDaliActorAddRendererN01(void) { tet_infoline("Testing Actor::AddRenderer"); TestApplication application; @@ -3905,6 +3905,44 @@ int UtcDaliActorAddRendererN(void) END_TEST; } +int UtcDaliActorAddRendererN02(void) +{ + tet_infoline( "UtcDaliActorAddRendererN02" ); + + Actor actor; + Renderer renderer; + + { + TestApplication application; + + Geometry geometry = CreateQuadGeometry(); + Shader shader = CreateShader(); + renderer = Renderer::New( geometry, shader ); + + actor = Actor::New(); + } + + // try illegal AddRenderer + try + { + actor.AddRenderer( renderer ); + tet_printf( "Assertion test failed - no Exception\n" ); + tet_result( TET_FAIL ); + } + catch( Dali::DaliException& e ) + { + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_ASSERT( e, "EventThreadServices::IsCoreRunning()", TEST_LOCATION ); + } + catch(...) + { + tet_printf( "Assertion test failed - wrong Exception\n" ); + tet_result( TET_FAIL ); + } + + END_TEST; +} + int UtcDaliActorAddRendererOnStage(void) { tet_infoline("Testing Actor::AddRenderer"); diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index 4dfa789..7710dc5 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -415,6 +415,9 @@ const SceneGraph::Node* Actor::CreateNode() SceneGraph::Node* node = SceneGraph::Node::New(); OwnerPointer< SceneGraph::Node > transferOwnership( node ); Internal::ThreadLocalStorage* tls = Internal::ThreadLocalStorage::GetInternal(); + + DALI_ASSERT_ALWAYS( tls && "ThreadLocalStorage is null" ); + AddNodeMessage( tls->GetUpdateManager(), transferOwnership ); return node; diff --git a/dali/internal/event/common/object-impl.h b/dali/internal/event/common/object-impl.h index e2c5d9f..c9c1c00 100644 --- a/dali/internal/event/common/object-impl.h +++ b/dali/internal/event/common/object-impl.h @@ -532,7 +532,7 @@ protected: */ inline EventThreadServices& GetEventThreadServices() { - DALI_ASSERT_DEBUG( EventThreadServices::IsCoreRunning() ); + DALI_ASSERT_ALWAYS( EventThreadServices::IsCoreRunning() ); return mEventThreadServices; } @@ -545,7 +545,7 @@ protected: */ inline const EventThreadServices& GetEventThreadServices() const { - DALI_ASSERT_DEBUG( EventThreadServices::IsCoreRunning() ); + DALI_ASSERT_ALWAYS( EventThreadServices::IsCoreRunning() ); return mEventThreadServices; } -- 2.7.4 From 3db950f5f724cee94e5fc423ba111bf07fd68372 Mon Sep 17 00:00:00 2001 From: neostom432 Date: Tue, 16 Jun 2020 01:53:37 +0900 Subject: [PATCH 12/16] DALi Version 1.5.16 DALi Version 1.5.16 Change-Id: Ica410ef4f6a3f9c4b4e5c59fcc2c0e3ac49f6892 --- dali/public-api/dali-core-version.cpp | 2 +- packaging/dali.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dali/public-api/dali-core-version.cpp b/dali/public-api/dali-core-version.cpp index 81fdc88..e111d3c 100644 --- a/dali/public-api/dali-core-version.cpp +++ b/dali/public-api/dali-core-version.cpp @@ -28,7 +28,7 @@ namespace Dali const uint32_t CORE_MAJOR_VERSION = 1; const uint32_t CORE_MINOR_VERSION = 5; -const uint32_t CORE_MICRO_VERSION = 15; +const uint32_t CORE_MICRO_VERSION = 16; const char * const CORE_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/packaging/dali.spec b/packaging/dali.spec index 83d8a5d..65beae4 100644 --- a/packaging/dali.spec +++ b/packaging/dali.spec @@ -1,6 +1,6 @@ Name: dali Summary: DALi 3D Engine -Version: 1.5.15 +Version: 1.5.16 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT -- 2.7.4 From bcf9f81c3e92f80caea508421e9d981d6b099bbb Mon Sep 17 00:00:00 2001 From: Anton Obzhirov Date: Tue, 14 Apr 2020 15:59:45 +0100 Subject: [PATCH 13/16] Partial update implementation, first phase. Change-Id: I7d2a70c747247c057af6d00d8c147594bf6c7a3d --- .../dali-test-suite-utils/test-application.cpp | 38 ++- .../dali/dali-test-suite-utils/test-application.h | 6 +- automated-tests/src/dali/utc-Dali-Actor.cpp | 361 +++++++++++++++++++++ dali/devel-api/actors/actor-devel.h | 7 + dali/integration-api/core-enumerations.h | 9 + dali/integration-api/core.cpp | 16 +- dali/integration-api/core.h | 28 +- dali/internal/common/core-impl.cpp | 15 +- dali/internal/common/core-impl.h | 15 +- dali/internal/event/actors/actor-impl.cpp | 26 ++ dali/internal/event/actors/actor-impl.h | 12 + .../internal/event/common/property-buffer-impl.cpp | 15 + dali/internal/event/common/property-input-impl.h | 66 ++++ dali/internal/render/common/render-algorithms.cpp | 33 +- dali/internal/render/common/render-algorithms.h | 7 +- dali/internal/render/common/render-item.cpp | 10 +- dali/internal/render/common/render-item.h | 4 +- dali/internal/render/common/render-manager.cpp | 335 ++++++++++++++++++- dali/internal/render/common/render-manager.h | 28 +- dali/internal/render/renderers/render-renderer.cpp | 71 +++- dali/internal/render/renderers/render-renderer.h | 11 + .../update/animation/scene-graph-animator.h | 5 + dali/internal/update/common/property-owner.h | 18 + .../manager/render-instruction-processor.cpp | 87 +++-- dali/internal/update/nodes/node.cpp | 1 + dali/internal/update/nodes/node.h | 31 ++ .../update/render-tasks/scene-graph-camera.cpp | 5 + .../update/render-tasks/scene-graph-camera.h | 6 + dali/public-api/common/list-wrapper.h | 64 ++++ dali/public-api/file.list | 1 + dali/public-api/math/rect.h | 84 ++++- 31 files changed, 1327 insertions(+), 88 deletions(-) create mode 100644 dali/public-api/common/list-wrapper.h diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp index e8c0d12..b2a3fb9 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp @@ -26,13 +26,15 @@ TestApplication::TestApplication( uint32_t surfaceWidth, uint32_t surfaceHeight, uint32_t horizontalDpi, uint32_t verticalDpi, - bool initialize ) + bool initialize, + bool enablePartialUpdate ) : mCore( NULL ), mSurfaceWidth( surfaceWidth ), mSurfaceHeight( surfaceHeight ), mFrame( 0u ), mDpi{ horizontalDpi, verticalDpi }, - mLastVSyncTime(0u) + mLastVSyncTime(0u), + mPartialUpdateEnabled(enablePartialUpdate) { if( initialize ) { @@ -59,7 +61,8 @@ void TestApplication::CreateCore() mGlContextHelperAbstraction, Integration::RenderToFrameBuffer::FALSE, Integration::DepthBufferAvailable::TRUE, - Integration::StencilBufferAvailable::TRUE ); + Integration::StencilBufferAvailable::TRUE, + mPartialUpdateEnabled ? Integration::PartialUpdateAvailable::TRUE : Integration::PartialUpdateAvailable::FALSE ); mCore->ContextCreated(); @@ -193,8 +196,8 @@ bool TestApplication::Render( uint32_t intervalMilliseconds, const char* locatio mRenderStatus.SetNeedsPostRender( false ); mCore->PreRender( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); - mCore->RenderScene( mRenderStatus, mScene, true /*render the off-screen buffers*/); - mCore->RenderScene( mRenderStatus, mScene, false /*render the surface*/); + mCore->RenderScene( mRenderStatus, mScene, true /*render the off-screen buffers*/ ); + mCore->RenderScene( mRenderStatus, mScene, false /*render the surface*/ ); mCore->PostRender( false /*do not skip rendering*/ ); mFrame++; @@ -202,6 +205,27 @@ bool TestApplication::Render( uint32_t intervalMilliseconds, const char* locatio return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate(); } +bool TestApplication::PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location, std::vector>& damagedRects) +{ + DoUpdate(intervalMilliseconds, location); + + mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); + mCore->PreRender(mScene, damagedRects); + + return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate(); +} + +bool TestApplication::RenderWithPartialUpdate(std::vector>& damagedRects, Rect& clippingRect) +{ + mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/, clippingRect); + mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/, clippingRect); + mCore->PostRender(false /*do not skip rendering*/); + + mFrame++; + + return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate(); +} + uint32_t TestApplication::GetUpdateStatus() { return mStatus.KeepUpdating(); @@ -227,8 +251,8 @@ bool TestApplication::RenderOnly( ) { // Update Time values mCore->PreRender( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ ); - mCore->RenderScene( mRenderStatus, mScene, true /*render the off-screen buffers*/); - mCore->RenderScene( mRenderStatus, mScene, false /*render the surface*/); + mCore->RenderScene( mRenderStatus, mScene, true /*render the off-screen buffers*/ ); + mCore->RenderScene( mRenderStatus, mScene, false /*render the surface*/ ); mCore->PostRender( false /*do not skip rendering*/ ); mFrame++; diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.h b/automated-tests/src/dali/dali-test-suite-utils/test-application.h index e96f759..1df0743 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.h @@ -51,7 +51,8 @@ public: uint32_t surfaceHeight = DEFAULT_SURFACE_HEIGHT, uint32_t horizontalDpi = DEFAULT_HORIZONTAL_DPI, uint32_t verticalDpi = DEFAULT_VERTICAL_DPI, - bool initialize = true ); + bool initialize = true, + bool enablePartialUpdate = false ); void Initialize(); void CreateCore(); @@ -69,6 +70,8 @@ public: void ProcessEvent(const Integration::Event& event); void SendNotification(); bool Render( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location=NULL ); + bool PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location, std::vector>& damagedRects); + bool RenderWithPartialUpdate(std::vector>& damagedRects, Rect& clippingRect); uint32_t GetUpdateStatus(); bool UpdateOnly( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL ); bool RenderOnly( ); @@ -108,6 +111,7 @@ protected: struct { uint32_t x; uint32_t y; } mDpi; uint32_t mLastVSyncTime; + bool mPartialUpdateEnabled; static bool mLoggingEnabled; }; diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index e96ab7a..1550098 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -7500,3 +7500,364 @@ int utcDaliActorGetSizeAfterAnimation(void) END_TEST; } + +int utcDaliActorPartialUpdate(void) +{ + TestApplication application( + TestApplication::DEFAULT_SURFACE_WIDTH, + TestApplication::DEFAULT_SURFACE_HEIGHT, + TestApplication::DEFAULT_HORIZONTAL_DPI, + TestApplication::DEFAULT_VERTICAL_DPI, + true, + true); + + tet_infoline("Check the damaged area"); + + const TestGlAbstraction::ScissorParams& glScissorParams( application.GetGlAbstraction().GetScissorParams() ); + + std::vector> damagedRects; + Rect clippingRect; + application.SendNotification(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + + // First render pass, nothing to render, adaptor would just do swap buffer. + DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + + Actor actor = CreateRenderableActor(); + actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f)); + actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f)); + actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); + Stage::GetCurrent().Add(actor); + + application.SendNotification(); + + // 1. Actor added, damaged rect is added size of actor + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + // Aligned by 16 + clippingRect = Rect(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + // 2. Set new size + actor.SetProperty(Actor::Property::SIZE, Vector3(32.0f, 32.0f, 0)); + application.SendNotification(); + + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + // Aligned by 16 + clippingRect = Rect(16, 752, 48, 48); // in screen coordinates, includes 3 last frames updates + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + // 3. Set new position + actor.SetProperty(Actor::Property::POSITION, Vector3(32.0f, 32.0f, 0)); + application.SendNotification(); + + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + // Aligned by 16 + clippingRect = Rect(16, 736, 64, 64); // in screen coordinates, includes 3 last frames updates + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + Stage::GetCurrent().Remove(actor); + application.SendNotification(); + + // Actor removed, last 3 dirty rects are reported. Adaptor would merge them together. + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 3, TEST_LOCATION); + + clippingRect = damagedRects[0]; + clippingRect.Merge(damagedRects[1]); + clippingRect.Merge(damagedRects[2]); + + DALI_TEST_EQUALS(clippingRect.IsEmpty(), false, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.IsValid(), true, TEST_LOCATION); + DALI_TEST_EQUALS>(clippingRect, Rect(16, 736, 64, 64), TEST_LOCATION); + + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + END_TEST; +} + +int utcDaliActorPartialUpdateSetColor(void) +{ + TestApplication application( + TestApplication::DEFAULT_SURFACE_WIDTH, + TestApplication::DEFAULT_SURFACE_HEIGHT, + TestApplication::DEFAULT_HORIZONTAL_DPI, + TestApplication::DEFAULT_VERTICAL_DPI, + true, + true); + + tet_infoline("Check uniform update"); + + const TestGlAbstraction::ScissorParams& glScissorParams( application.GetGlAbstraction().GetScissorParams() ); + + std::vector> damagedRects; + Rect clippingRect; + application.SendNotification(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + + // First render pass, nothing to render, adaptor would just do swap buffer. + DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + + Actor actor = CreateRenderableActor(); + actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f)); + actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f)); + actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); + Stage::GetCurrent().Add(actor); + + application.SendNotification(); + + // 1. Actor added, damaged rect is added size of actor + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + // Aligned by 16 + clippingRect = Rect(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + // 2. Set new color + actor.SetProperty(Actor::Property::COLOR, Vector3(1.0f, 0.0f, 0.0f)); + application.SendNotification(); + + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + // Aligned by 16 + clippingRect = Rect(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + END_TEST; +} + +const std::string SHADER_LIGHT_CAMERA_PROJECTION_MATRIX_PROPERTY_NAME("uLightCameraProjectionMatrix"); +const std::string SHADER_LIGHT_CAMERA_VIEW_MATRIX_PROPERTY_NAME("uLightCameraViewMatrix"); +const std::string SHADER_SHADOW_COLOR_PROPERTY_NAME("uShadowColor"); +const char* const RENDER_SHADOW_VERTEX_SOURCE = + " uniform mediump mat4 uLightCameraProjectionMatrix;\n" + " uniform mediump mat4 uLightCameraViewMatrix;\n" + "\n" + "void main()\n" + "{\n" + " gl_Position = uProjection * uModelView * vec4(aPosition,1.0);\n" + " vec4 textureCoords = uLightCameraProjectionMatrix * uLightCameraViewMatrix * uModelMatrix * vec4(aPosition,1.0);\n" + " vTexCoord = 0.5 + 0.5 * (textureCoords.xy/textureCoords.w);\n" + "}\n"; + +const char* const RENDER_SHADOW_FRAGMENT_SOURCE = + "uniform lowp vec4 uShadowColor;\n" + "void main()\n" + "{\n" + " lowp float alpha;\n" + " alpha = texture2D(sTexture, vec2(vTexCoord.x, vTexCoord.y)).a;\n" + " gl_FragColor = vec4(uShadowColor.rgb, uShadowColor.a * alpha);\n" + "}\n"; + +int utcDaliActorPartialUpdateSetProperty(void) +{ + TestApplication application( + TestApplication::DEFAULT_SURFACE_WIDTH, + TestApplication::DEFAULT_SURFACE_HEIGHT, + TestApplication::DEFAULT_HORIZONTAL_DPI, + TestApplication::DEFAULT_VERTICAL_DPI, + true, + true); + + tet_infoline( "Set/Update property with partial update" ); + + const TestGlAbstraction::ScissorParams& glScissorParams(application.GetGlAbstraction().GetScissorParams()); + + std::vector> damagedRects; + Rect clippingRect; + application.SendNotification(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + + // First render pass, nothing to render, adaptor would just do swap buffer. + DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + + Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 4u, 4u); + Actor actor = CreateRenderableActor(image, RENDER_SHADOW_VERTEX_SOURCE, RENDER_SHADOW_FRAGMENT_SOURCE); + actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f)); + actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f)); + actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); + Stage::GetCurrent().Add(actor); + + actor.RegisterProperty(SHADER_SHADOW_COLOR_PROPERTY_NAME, Vector4(1.0f, 0.0f, 0.0f, 1.0f)); + + damagedRects.clear(); + application.SendNotification(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + // Aligned by 16 + clippingRect = Rect(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + Property::Index shadowColorPropertyIndex = actor.GetPropertyIndex( SHADER_SHADOW_COLOR_PROPERTY_NAME ); + actor.SetProperty(shadowColorPropertyIndex, Vector4(1.0f, 1.0f, 0.0f, 1.0f)); + + damagedRects.clear(); + application.SendNotification(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION); + + END_TEST; +} + +int utcDaliActorPartialUpdateTwoActors(void) +{ + TestApplication application( + TestApplication::DEFAULT_SURFACE_WIDTH, + TestApplication::DEFAULT_SURFACE_HEIGHT, + TestApplication::DEFAULT_HORIZONTAL_DPI, + TestApplication::DEFAULT_VERTICAL_DPI, + true, + true); + + tet_infoline("Check the damaged rects with partial update and two actors"); + + const TestGlAbstraction::ScissorParams& glScissorParams( application.GetGlAbstraction().GetScissorParams() ); + + Actor actor = CreateRenderableActor(); + actor.SetProperty(Actor::Property::POSITION, Vector3(100.0f, 100.0f, 0.0f)); + actor.SetProperty(Actor::Property::SIZE, Vector3(50.0f, 50.0f, 0.0f)); + actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); + Stage::GetCurrent().Add(actor); + + Actor actor2 = CreateRenderableActor(); + actor2.SetProperty(Actor::Property::POSITION, Vector3(150.0f, 150.0f, 0.0f)); + actor2.SetProperty(Actor::Property::SIZE, Vector3(100.0f, 100.0f, 0.0f)); + actor2.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); + Stage::GetCurrent().Add(actor2); + + application.SendNotification(); + std::vector> damagedRects; + application.PreRenderWithPartialUpdate(TestApplication::DEFAULT_RENDER_INTERVAL, nullptr, damagedRects); + + DALI_TEST_EQUALS(damagedRects.size(), 2, TEST_LOCATION); + DALI_TEST_EQUALS>(Rect(64, 672, 64, 64), damagedRects[0], TEST_LOCATION); + DALI_TEST_EQUALS>(Rect(96, 592, 112, 112), damagedRects[1], TEST_LOCATION); + + // in screen coordinates, adaptor would calculate it using previous frames information + Rect clippingRect = Rect(64, 592, 144, 192); + application.RenderWithPartialUpdate(damagedRects, clippingRect); + + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + END_TEST; +} + +int utcDaliActorPartialUpdateActorsWithSizeHint(void) +{ + TestApplication application( + TestApplication::DEFAULT_SURFACE_WIDTH, + TestApplication::DEFAULT_SURFACE_HEIGHT, + TestApplication::DEFAULT_HORIZONTAL_DPI, + TestApplication::DEFAULT_VERTICAL_DPI, + true, + true); + + tet_infoline( "Check the damaged rect with partial update and actor size hint" ); + + const TestGlAbstraction::ScissorParams& glScissorParams( application.GetGlAbstraction().GetScissorParams() ); + + Actor actor = CreateRenderableActor(); + actor.SetProperty(Actor::Property::POSITION, Vector3(75.0f, 150.0f, 0.0f)); + actor.SetProperty(Actor::Property::SIZE, Vector3(75.0f, 150.0f, 0.0f)); + actor.SetProperty(DevelActor::Property::UPDATE_SIZE_HINT, Vector3(150, 300, 0)); + actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); + Stage::GetCurrent().Add(actor); + + application.SendNotification(); + std::vector> damagedRects; + application.PreRenderWithPartialUpdate(TestApplication::DEFAULT_RENDER_INTERVAL, nullptr, damagedRects); + + DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION); + + Rect clippingRect = Rect(0, 496, 160, 320); + DALI_TEST_EQUALS>(clippingRect, damagedRects[0], TEST_LOCATION); + + application.RenderWithPartialUpdate(damagedRects, clippingRect); + + DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); + DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + + END_TEST; +} + diff --git a/dali/devel-api/actors/actor-devel.h b/dali/devel-api/actors/actor-devel.h index ff521de..1e4e049 100644 --- a/dali/devel-api/actors/actor-devel.h +++ b/dali/devel-api/actors/actor-devel.h @@ -128,6 +128,13 @@ enum Type * @note True means that the actor is out of the view frustum. */ CULLED = INHERIT_LAYOUT_DIRECTION + 5, + + /** + * @brief Sets the update size hint of the actor. + * @details Name "updateSizeHint", type Property::VECTOR2. + * @note Overrides the size used for the actor damaged area calculation. Affected by the actor model view matrix. + */ + UPDATE_SIZE_HINT = INHERIT_LAYOUT_DIRECTION + 6, }; } // namespace Property diff --git a/dali/integration-api/core-enumerations.h b/dali/integration-api/core-enumerations.h index e11dc63..ff6153c 100644 --- a/dali/integration-api/core-enumerations.h +++ b/dali/integration-api/core-enumerations.h @@ -59,6 +59,15 @@ enum class StencilBufferAvailable TRUE }; +/** + * @brief Enumerations to specify whether the stencil buffer is available. + */ +enum class PartialUpdateAvailable +{ + FALSE = 0, + TRUE +}; + } // namespace Integration } // namespace Dali diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index 47eb713..ee0b608 100644 --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.cpp @@ -41,7 +41,8 @@ Core* Core::New( RenderController& renderController, GlContextHelperAbstraction& glContextHelperAbstraction, RenderToFrameBuffer renderToFboEnabled, DepthBufferAvailable depthBufferAvailable, - StencilBufferAvailable stencilBufferAvailable ) + StencilBufferAvailable stencilBufferAvailable, + PartialUpdateAvailable partialUpdateAvailable ) { Core* instance = new Core; instance->mImpl = new Internal::Core( renderController, @@ -51,7 +52,8 @@ Core* Core::New( RenderController& renderController, glContextHelperAbstraction, renderToFboEnabled, depthBufferAvailable, - stencilBufferAvailable ); + stencilBufferAvailable, + partialUpdateAvailable ); return instance; } @@ -116,11 +118,21 @@ void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly ) mImpl->PreRender( status, forceClear, uploadOnly ); } +void Core::PreRender( Integration::Scene& scene, std::vector>& damagedRects ) +{ + mImpl->PreRender( scene, damagedRects ); +} + void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo ) { mImpl->RenderScene( status, scene, renderToFbo ); } +void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect ) +{ + mImpl->RenderScene( status, scene, renderToFbo, clippingRect ); +} + void Core::PostRender( bool uploadOnly ) { mImpl->PostRender( uploadOnly ); diff --git a/dali/integration-api/core.h b/dali/integration-api/core.h index f1a7e63..a897631 100644 --- a/dali/integration-api/core.h +++ b/dali/integration-api/core.h @@ -23,6 +23,8 @@ // INTERNAL INCLUDES #include +#include +#include #include #include @@ -228,6 +230,7 @@ public: * @param[in] renderToFboEnabled Whether rendering into the Frame Buffer Object is enabled. * @param[in] depthBufferAvailable Whether the depth buffer is available * @param[in] stencilBufferAvailable Whether the stencil buffer is available + * @param[in] partialUpdateAvailable Whether the partial update is available * @return A newly allocated Core. */ static Core* New( RenderController& renderController, @@ -237,7 +240,8 @@ public: GlContextHelperAbstraction& glContextHelperAbstraction, RenderToFrameBuffer renderToFboEnabled, DepthBufferAvailable depthBufferAvailable, - StencilBufferAvailable stencilBufferAvailable ); + StencilBufferAvailable stencilBufferAvailable, + PartialUpdateAvailable partialUpdateAvailable); /** * Non-virtual destructor. Core is not intended as a base class. @@ -349,6 +353,16 @@ public: void PreRender( RenderStatus& status, bool forceClear, bool uploadOnly ); /** + * This is called before rendering any scene in the next frame. This method should be preceded + * by a call up Update. + * Multi-threading note: this method should be called from a dedicated rendering thread. + * @pre The GL context must have been created, and made current. + * @param[in] scene The scene to be rendered. + * @param[out] damagedRects containing damaged render items rects for this pass. + */ + void PreRender( Integration::Scene& scene, std::vector>& damagedRects ); + + /** * Render a scene in the next frame. This method should be preceded by a call up PreRender. * This method should be called twice. The first pass to render off-screen frame buffers if any, * and the second pass to render the surface. @@ -360,6 +374,18 @@ public: */ void RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo ); + /** + * Render a scene in the next frame. This method should be preceded by a call up PreRender. + * This method should be called twice. The first pass to render off-screen frame buffers if any, + * and the second pass to render the surface. + * Multi-threading note: this method should be called from a dedicated rendering thread. + * @pre The GL context must have been created, and made current. + * @param[out] status Contains the rendering flags. + * @param[in] scene The scene to be rendered. + * @param[in] renderToFbo True to render off-screen frame buffers only if any, and False to render the surface only. + * @param[in] clippingRect The rect to clip rendered scene. + */ + void RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect ); /** * This is called after rendering all the scenes in the next frame. This method should be diff --git a/dali/internal/common/core-impl.cpp b/dali/internal/common/core-impl.cpp index 5da52a4..fd17bd2 100644 --- a/dali/internal/common/core-impl.cpp +++ b/dali/internal/common/core-impl.cpp @@ -87,7 +87,8 @@ Core::Core( RenderController& renderController, GlContextHelperAbstraction& glContextHelperAbstraction, Integration::RenderToFrameBuffer renderToFboEnabled, Integration::DepthBufferAvailable depthBufferAvailable, - Integration::StencilBufferAvailable stencilBufferAvailable ) + Integration::StencilBufferAvailable stencilBufferAvailable, + Integration::PartialUpdateAvailable partialUpdateAvailable ) : mRenderController( renderController ), mPlatform(platform), mProcessingEvent(false), @@ -107,7 +108,7 @@ Core::Core( RenderController& renderController, mRenderTaskProcessor = new SceneGraph::RenderTaskProcessor(); - mRenderManager = RenderManager::New( glAbstraction, glSyncAbstraction, glContextHelperAbstraction, depthBufferAvailable, stencilBufferAvailable ); + mRenderManager = RenderManager::New( glAbstraction, glSyncAbstraction, glContextHelperAbstraction, depthBufferAvailable, stencilBufferAvailable, partialUpdateAvailable ); RenderQueue& renderQueue = mRenderManager->GetRenderQueue(); @@ -221,11 +222,21 @@ void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly ) mRenderManager->PreRender( status, forceClear, uploadOnly ); } +void Core::PreRender( Integration::Scene& scene, std::vector>& damagedRects ) +{ + mRenderManager->PreRender( scene, damagedRects ); +} + void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo ) { mRenderManager->RenderScene( status, scene, renderToFbo ); } +void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect ) +{ + mRenderManager->RenderScene( status, scene, renderToFbo, clippingRect ); +} + void Core::PostRender( bool uploadOnly ) { mRenderManager->PostRender( uploadOnly ); diff --git a/dali/internal/common/core-impl.h b/dali/internal/common/core-impl.h index cbe41a4..f2b6b62 100644 --- a/dali/internal/common/core-impl.h +++ b/dali/internal/common/core-impl.h @@ -86,7 +86,8 @@ public: Integration::GlContextHelperAbstraction& glContextHelperAbstraction, Integration::RenderToFrameBuffer renderToFboEnabled, Integration::DepthBufferAvailable depthBufferAvailable, - Integration::StencilBufferAvailable stencilBufferAvailable ); + Integration::StencilBufferAvailable stencilBufferAvailable, + Integration::PartialUpdateAvailable partialUpdateAvailable ); /** * Destructor @@ -129,16 +130,26 @@ public: void Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, Integration::UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo ); /** - * @copydoc Dali::Integration::Core::Render() + * @copydoc Dali::Integration::Core::PreRender() */ void PreRender( Integration::RenderStatus& status, bool forceClear, bool uploadOnly ); /** + * @copydoc Dali::Integration::Core::PreRender() + */ + void PreRender( Integration::Scene& scene, std::vector>& damagedRects ); + + /** * @copydoc Dali::Integration::Core::RenderScene() */ void RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo ); /** + * @copydoc Dali::Integration::Core::RenderScene() + */ + void RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect ); + + /** * @copydoc Dali::Integration::Core::Render() */ void PostRender( bool uploadOnly ); diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index 7710dc5..b45c7e9 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -214,6 +214,7 @@ DALI_PROPERTY( "opacity", FLOAT, true, true, true, Dali: DALI_PROPERTY( "screenPosition", VECTOR2, false, false, false, Dali::DevelActor::Property::SCREEN_POSITION ) DALI_PROPERTY( "positionUsesAnchorPoint", BOOLEAN, true, false, false, Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT ) DALI_PROPERTY( "culled", BOOLEAN, false, false, true, Dali::DevelActor::Property::CULLED ) +DALI_PROPERTY( "updateSizeHint", VECTOR2, true, false, false, Dali::DevelActor::Property::UPDATE_SIZE_HINT ) DALI_PROPERTY_TABLE_END( DEFAULT_ACTOR_PROPERTY_START_INDEX, ActorDefaultProperties ) // Signals @@ -2759,6 +2760,12 @@ void Actor::SetDefaultProperty( Property::Index index, const Property::Value& pr break; } + case Dali::DevelActor::Property::UPDATE_SIZE_HINT: + { + SetUpdateSizeHint( property.Get< Vector2 >() ); + break; + } + default: { // this can happen in the case of a non-animatable default property so just do nothing @@ -4041,6 +4048,12 @@ bool Actor::GetCurrentPropertyValue( Property::Index index, Property::Value& val break; } + case Dali::DevelActor::Property::UPDATE_SIZE_HINT: + { + value = GetUpdateSizeHint(); + break; + } + default: { // Must be an event-side only property @@ -5110,6 +5123,19 @@ void Actor::InheritLayoutDirectionRecursively( ActorPtr actor, Dali::LayoutDirec } } +void Actor::SetUpdateSizeHint( const Vector2& updateSizeHint ) +{ + // node is being used in a separate thread; queue a message to set the value & base value + SceneGraph::NodePropertyMessage::Send( GetEventThreadServices(), &GetNode(), &GetNode().mUpdateSizeHint, &AnimatableProperty::Bake, Vector3(updateSizeHint.width, updateSizeHint.height, 0.f ) ); +} + +Vector2 Actor::GetUpdateSizeHint() const +{ + // node is being used in a separate thread, the value from the previous update is the same, set by user + Vector3 updateSizeHint = GetNode().GetUpdateSizeHint(); + return Vector2( updateSizeHint.width, updateSizeHint.height ); +} + } // namespace Internal } // namespace Dali diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h index bf58f23..4e57518 100755 --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -1946,6 +1946,18 @@ private: */ void InheritLayoutDirectionRecursively( ActorPtr actor, Dali::LayoutDirection::Type direction, bool set = false ); + /** + * @brief Sets the update size hint of an actor. + * @param [in] updateSizeHint The update size hint. + */ + void SetUpdateSizeHint( const Vector2& updateSizeHint ); + + /** + * @brief Return the update size hint of actor + * @return Return the update size hint + */ + Vector2 GetUpdateSizeHint() const; + protected: Scene* mScene; ///< The scene the actor is added to diff --git a/dali/internal/event/common/property-buffer-impl.cpp b/dali/internal/event/common/property-buffer-impl.cpp index c44df2c..242aa67 100644 --- a/dali/internal/event/common/property-buffer-impl.cpp +++ b/dali/internal/event/common/property-buffer-impl.cpp @@ -22,6 +22,21 @@ #include #include +#ifdef ANDROID +namespace std +{ + uint64_t _Hash_bytes(const void* bytes, uint64_t size, uint64_t seed) + { + for (uint64_t i = 0; i < size; i++) + { + seed = seed * 31 + reinterpret_cast(bytes)[i]; + } + + return seed; + } +} +#endif + namespace Dali { namespace Internal diff --git a/dali/internal/event/common/property-input-impl.h b/dali/internal/event/common/property-input-impl.h index ca46246..297332f 100644 --- a/dali/internal/event/common/property-input-impl.h +++ b/dali/internal/event/common/property-input-impl.h @@ -31,6 +31,15 @@ #include #include +#ifdef ANDROID +namespace std +{ + +uint64_t _Hash_bytes(const void* bytes, uint64_t size, uint64_t seed); + +} +#endif + namespace Dali { @@ -307,6 +316,63 @@ public: return false; } + std::uint64_t Hash(BufferIndex bufferIndex, uint64_t seed) const + { + switch ( GetType() ) + { + case Property::BOOLEAN: + { + return std::_Hash_bytes(&GetBoolean(bufferIndex), sizeof(bool), seed); + } + + case Property::INTEGER: + { + return std::_Hash_bytes(&GetInteger(bufferIndex), sizeof(int), seed); + } + + case Property::FLOAT: + { + return std::_Hash_bytes(&GetFloat(bufferIndex), sizeof(float), seed); + } + + case Property::VECTOR2: + { + return std::_Hash_bytes(&GetVector2(bufferIndex), sizeof(Vector2), seed); + } + + case Property::VECTOR3: + { + return std::_Hash_bytes(&GetVector3(bufferIndex), sizeof(Vector3), seed); + } + + case Property::VECTOR4: + { + return std::_Hash_bytes(&GetVector4(bufferIndex), sizeof(Vector4), seed); + } + + case Property::ROTATION: + { + return std::_Hash_bytes(&GetQuaternion(bufferIndex), sizeof(Quaternion), seed); + } + + case Property::MATRIX: + { + return std::_Hash_bytes(&GetMatrix(bufferIndex), sizeof(Matrix), seed); + } + + case Property::MATRIX3: + { + return std::_Hash_bytes(&GetMatrix3(bufferIndex), sizeof(Matrix3), seed); + } + + default: + break; // print nothing + } + + return seed; + } + + /** * Print the property value using a stream. * @param[in] debugStream The output stream. diff --git a/dali/internal/render/common/render-algorithms.cpp b/dali/internal/render/common/render-algorithms.cpp index 01bba05..cfd1f92 100644 --- a/dali/internal/render/common/render-algorithms.cpp +++ b/dali/internal/render/common/render-algorithms.cpp @@ -271,7 +271,7 @@ inline void RenderAlgorithms::SetupScissorClipping( const RenderItem& item, Cont // This is a clipping node. We generate the AABB for this node and intersect it with the previous intersection further up the tree. // Get the AABB bounding box for the current render item. - const ClippingBox scissorBox( item.CalculateViewportSpaceAABB( mViewportRectangle.width, mViewportRectangle.height ) ); + const ClippingBox scissorBox( item.CalculateViewportSpaceAABB( item.mSize, mViewportRectangle.width, mViewportRectangle.height ) ); // Get the AABB for the parent item that we must intersect with. const ClippingBox& parentBox( mScissorStack.back() ); @@ -391,7 +391,8 @@ inline void RenderAlgorithms::ProcessRenderList( const RenderList& renderList, Integration::DepthBufferAvailable depthBufferAvailable, Integration::StencilBufferAvailable stencilBufferAvailable, Vector& boundTextures, - const RenderInstruction& instruction + const RenderInstruction& instruction, + const Rect& rootClippingRect ) { DALI_PRINT_RENDER_LIST( renderList ); @@ -411,6 +412,21 @@ inline void RenderAlgorithms::ProcessRenderList( const RenderList& renderList, // Setup Scissor testing (for both viewport and per-node scissor) mScissorStack.clear(); + + // Add root clipping rect (set manually for Render function ny partial update for example) + // on the bottom of the stack + if (!rootClippingRect.IsEmpty()) + { + context.SetScissorTest( true ); + mScissorStack.push_back( rootClippingRect ); + } + // We are not performing a layer clip and no clipping rect set. Add the viewport as the root scissor rectangle. + else if (!renderList.IsClipping()) + { + context.SetScissorTest( false ); + mScissorStack.push_back( mViewportRectangle ); + } + if( renderList.IsClipping() ) { context.SetScissorTest( true ); @@ -419,12 +435,6 @@ inline void RenderAlgorithms::ProcessRenderList( const RenderList& renderList, mScissorStack.push_back( layerScissorBox ); mHasLayerScissor = true; } - else - { - // We are not performing a layer clip. Add the viewport as the root scissor rectangle. - context.SetScissorTest( false ); - mScissorStack.push_back( mViewportRectangle ); - } // Loop through all RenderList in the RenderList, set up any prerequisites to render them, then perform the render. for( uint32_t index = 0u; index < count; ++index ) @@ -466,7 +476,8 @@ void RenderAlgorithms::ProcessRenderInstruction( const RenderInstruction& instru BufferIndex bufferIndex, Integration::DepthBufferAvailable depthBufferAvailable, Integration::StencilBufferAvailable stencilBufferAvailable, - Vector& boundTextures ) + Vector& boundTextures, + const Rect& rootClippingRect ) { DALI_PRINT_RENDER_INSTRUCTION( instruction, bufferIndex ); @@ -496,8 +507,8 @@ void RenderAlgorithms::ProcessRenderInstruction( const RenderInstruction& instru depthBufferAvailable, stencilBufferAvailable, boundTextures, - instruction //added for reflection effect - ); + instruction, //added for reflection effect + rootClippingRect ); } } } diff --git a/dali/internal/render/common/render-algorithms.h b/dali/internal/render/common/render-algorithms.h index 26f4343..9d359b4 100644 --- a/dali/internal/render/common/render-algorithms.h +++ b/dali/internal/render/common/render-algorithms.h @@ -65,7 +65,8 @@ class RenderAlgorithms BufferIndex bufferIndex, Integration::DepthBufferAvailable depthBufferAvailable, Integration::StencilBufferAvailable stencilBufferAvailable, - Vector& boundTextures ); + Vector& boundTextures, + const Rect& rootClippingRect ); private: @@ -125,8 +126,8 @@ class RenderAlgorithms Integration::DepthBufferAvailable depthBufferAvailable, Integration::StencilBufferAvailable stencilBufferAvailable, Vector& boundTextures, - const Dali::Internal::SceneGraph::RenderInstruction& instruction // in the case of reflection, things like CullFace need to be adjusted for reflection world - ); + const Dali::Internal::SceneGraph::RenderInstruction& instruction, // in the case of reflection, things like CullFace need to be adjusted for reflection world + const Rect& rootClippingRect ); // Prevent copying: RenderAlgorithms( RenderAlgorithms& rhs ); diff --git a/dali/internal/render/common/render-item.cpp b/dali/internal/render/common/render-item.cpp index d47f808..d10e15e 100644 --- a/dali/internal/render/common/render-item.cpp +++ b/dali/internal/render/common/render-item.cpp @@ -50,7 +50,8 @@ RenderItem::RenderItem() mNode( NULL ), mTextureSet( NULL ), mDepthIndex( 0 ), - mIsOpaque( true ) + mIsOpaque( true ), + mIsUpdated( false ) { } @@ -59,11 +60,11 @@ RenderItem::~RenderItem() } -ClippingBox RenderItem::CalculateViewportSpaceAABB( const int viewportWidth, const int viewportHeight ) const +ClippingBox RenderItem::CalculateViewportSpaceAABB( const Vector3& size, const int viewportWidth, const int viewportHeight ) const { // Calculate extent vector of the AABB: - const float halfActorX = mSize.x * 0.5f; - const float halfActorY = mSize.y * 0.5f; + const float halfActorX = size.x * 0.5f; + const float halfActorY = size.y * 0.5f; // To transform the actor bounds to screen-space, We do a fast, 2D version of a matrix multiply optimized for 2D quads. // This reduces float multiplications from 64 (16 * 4) to 12 (4 * 3). @@ -121,7 +122,6 @@ void RenderItem::operator delete( void* ptr ) gRenderItemPool.Free( static_cast( ptr ) ); } - } // namespace SceneGraph } // namespace Internal diff --git a/dali/internal/render/common/render-item.h b/dali/internal/render/common/render-item.h index 7dbd3fb..77e1fac 100644 --- a/dali/internal/render/common/render-item.h +++ b/dali/internal/render/common/render-item.h @@ -67,7 +67,7 @@ struct RenderItem * @param[in] viewportHeight The height of the viewport to calculate for * @return The AABB coordinates in viewport-space (x, y, width, height) */ - ClippingBox CalculateViewportSpaceAABB( const int viewportWidth, const int viewportHeight ) const; + ClippingBox CalculateViewportSpaceAABB( const Vector3& size, const int viewportWidth, const int viewportHeight ) const; /** * Overriden delete operator. @@ -79,11 +79,13 @@ struct RenderItem Matrix mModelMatrix; Matrix mModelViewMatrix; Vector3 mSize; + Vector3 mUpdateSize; Render::Renderer* mRenderer; Node* mNode; const void* mTextureSet; //< Used for sorting only int mDepthIndex; bool mIsOpaque:1; + bool mIsUpdated:1; private: diff --git a/dali/internal/render/common/render-manager.cpp b/dali/internal/render/common/render-manager.cpp index 77f6088..905032a 100644 --- a/dali/internal/render/common/render-manager.cpp +++ b/dali/internal/render/common/render-manager.cpp @@ -62,6 +62,53 @@ Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_REN } // unnamed namespace #endif +struct DirtyRect +{ + DirtyRect(Node* node, Render::Renderer* renderer, int frame, Rect& rect) + : node(node), + renderer(renderer), + frame(frame), + rect(rect), + visited(true) + { + } + + DirtyRect() + : node(nullptr), + renderer(nullptr), + frame(0), + rect(), + visited(true) + { + } + + bool operator<(const DirtyRect& rhs) const + { + if (node == rhs.node) + { + if (renderer == rhs.renderer) + { + return frame > rhs.frame; // Most recent rects come first + } + else + { + return renderer < rhs.renderer; + } + } + else + { + return node < rhs.node; + } + } + + Node* node; + Render::Renderer* renderer; + int frame; + + Rect rect; + bool visited; +}; + /** * Structure to contain internal data */ @@ -71,7 +118,8 @@ struct RenderManager::Impl Integration::GlSyncAbstraction& glSyncAbstraction, Integration::GlContextHelperAbstraction& glContextHelperAbstraction, Integration::DepthBufferAvailable depthBufferAvailableParam, - Integration::StencilBufferAvailable stencilBufferAvailableParam ) + Integration::StencilBufferAvailable stencilBufferAvailableParam, + Integration::PartialUpdateAvailable partialUpdateAvailableParam ) : context( glAbstraction, &sceneContextContainer ), currentContext( &context ), glAbstraction( glAbstraction ), @@ -89,7 +137,9 @@ struct RenderManager::Impl lastFrameWasRendered( false ), programController( glAbstraction ), depthBufferAvailable( depthBufferAvailableParam ), - stencilBufferAvailable( stencilBufferAvailableParam ) + stencilBufferAvailable( stencilBufferAvailableParam ), + partialUpdateAvailable( partialUpdateAvailableParam ), + itemsCheckSum(0) { // Create thread pool with just one thread ( there may be a need to create more threads in the future ). threadPool = std::unique_ptr( new Dali::ThreadPool() ); @@ -176,24 +226,29 @@ struct RenderManager::Impl Integration::DepthBufferAvailable depthBufferAvailable; ///< Whether the depth buffer is available Integration::StencilBufferAvailable stencilBufferAvailable; ///< Whether the stencil buffer is available + Integration::PartialUpdateAvailable partialUpdateAvailable; ///< Whether the partial update is available std::unique_ptr threadPool; ///< The thread pool Vector boundTextures; ///< The textures bound for rendering Vector textureDependencyList; ///< The dependency list of binded textures + std::size_t itemsCheckSum; ///< The damaged render items checksum from previous prerender phase. + std::vector itemsDirtyRects; }; RenderManager* RenderManager::New( Integration::GlAbstraction& glAbstraction, Integration::GlSyncAbstraction& glSyncAbstraction, Integration::GlContextHelperAbstraction& glContextHelperAbstraction, Integration::DepthBufferAvailable depthBufferAvailable, - Integration::StencilBufferAvailable stencilBufferAvailable ) + Integration::StencilBufferAvailable stencilBufferAvailable, + Integration::PartialUpdateAvailable partialUpdateAvailable ) { RenderManager* manager = new RenderManager; manager->mImpl = new Impl( glAbstraction, glSyncAbstraction, glContextHelperAbstraction, depthBufferAvailable, - stencilBufferAvailable ); + stencilBufferAvailable, + partialUpdateAvailable ); return manager; } @@ -563,9 +618,233 @@ void RenderManager::PreRender( Integration::RenderStatus& status, bool forceClea } } +void RenderManager::PreRender( Integration::Scene& scene, std::vector>& damagedRects ) +{ + if (mImpl->partialUpdateAvailable != Integration::PartialUpdateAvailable::TRUE) + { + return; + } + + class DamagedRectsCleaner + { + public: + DamagedRectsCleaner(std::vector>& damagedRects) + : mDamagedRects(damagedRects), + mCleanOnReturn(true) + { + } + + void SetCleanOnReturn(bool cleanOnReturn) + { + mCleanOnReturn = cleanOnReturn; + } + + ~DamagedRectsCleaner() + { + if (mCleanOnReturn) + { + mDamagedRects.clear(); + } + } + + private: + std::vector>& mDamagedRects; + bool mCleanOnReturn; + }; + + Rect surfaceRect = Rect(0, 0, static_cast( scene.GetSize().width ), static_cast( scene.GetSize().height )); + + // Clean collected dirty/damaged rects on exit if 3d layer or 3d node or other conditions. + DamagedRectsCleaner damagedRectCleaner(damagedRects); + + // Mark previous dirty rects in the sorted array. The array is already sorted by node and renderer, frame number. + // so you don't need to sort: std::stable_sort(mImpl->itemsDirtyRects.begin(), mImpl->itemsDirtyRects.end()); + for (DirtyRect& dirtyRect : mImpl->itemsDirtyRects) + { + dirtyRect.visited = false; + } + + Internal::Scene& sceneInternal = GetImplementation(scene); + SceneGraph::Scene* sceneObject = sceneInternal.GetSceneObject(); + uint32_t count = sceneObject->GetRenderInstructions().Count( mImpl->renderBufferIndex ); + for (uint32_t i = 0; i < count; ++i) + { + RenderInstruction& instruction = sceneObject->GetRenderInstructions().At( mImpl->renderBufferIndex, i ); + + if (instruction.mFrameBuffer) + { + return; // TODO: reset, we don't deal with render tasks with framebuffers (for now) + } + + const Camera* camera = instruction.GetCamera(); + if (camera->mType == Camera::DEFAULT_TYPE && camera->mTargetPosition == Camera::DEFAULT_TARGET_POSITION) + { + const Node* node = instruction.GetCamera()->GetNode(); + if (node) + { + Vector3 position; + Vector3 scale; + Quaternion orientation; + node->GetWorldMatrix(mImpl->renderBufferIndex).GetTransformComponents(position, orientation, scale); + + Vector3 orientationAxis; + Radian orientationAngle; + orientation.ToAxisAngle( orientationAxis, orientationAngle ); + + if (position.x > Math::MACHINE_EPSILON_10000 || + position.y > Math::MACHINE_EPSILON_10000 || + orientationAxis != Vector3(0.0f, 1.0f, 0.0f) || + orientationAngle != ANGLE_180 || + scale != Vector3(1.0f, 1.0f, 1.0f)) + { + return; + } + } + } + else + { + return; + } + + Rect viewportRect; + if (instruction.mIsViewportSet) + { + const int32_t y = (surfaceRect.height - instruction.mViewport.height) - instruction.mViewport.y; + viewportRect.Set(instruction.mViewport.x, y, instruction.mViewport.width, instruction.mViewport.height); + if (viewportRect.IsEmpty() || !viewportRect.IsValid()) + { + return; // just skip funny use cases for now, empty viewport means it is set somewhere else + } + } + else + { + viewportRect = surfaceRect; + } + + const Matrix* viewMatrix = instruction.GetViewMatrix(mImpl->renderBufferIndex); + const Matrix* projectionMatrix = instruction.GetProjectionMatrix(mImpl->renderBufferIndex); + if (viewMatrix && projectionMatrix) + { + const RenderListContainer::SizeType count = instruction.RenderListCount(); + for (RenderListContainer::SizeType index = 0u; index < count; ++index) + { + const RenderList* renderList = instruction.GetRenderList( index ); + if (renderList && !renderList->IsEmpty()) + { + const std::size_t count = renderList->Count(); + for (uint32_t index = 0u; index < count; ++index) + { + RenderItem& item = renderList->GetItem( index ); + // If the item does 3D transformation, do early exit and clean the damaged rect array + if (item.mUpdateSize == Vector3::ZERO) + { + return; + } + + Rect rect; + DirtyRect dirtyRect(item.mNode, item.mRenderer, mImpl->frameCount, rect); + // If the item refers to updated node or renderer. + if (item.mIsUpdated || + (item.mNode && + (item.mNode->Updated() || (item.mRenderer && item.mRenderer->Updated(mImpl->renderBufferIndex, item.mNode))))) + { + item.mIsUpdated = false; + item.mNode->SetUpdated(false); + + rect = item.CalculateViewportSpaceAABB(item.mUpdateSize, viewportRect.width, viewportRect.height); + if (rect.IsValid() && rect.Intersect(viewportRect) && !rect.IsEmpty()) + { + const int left = rect.x; + const int top = rect.y; + const int right = rect.x + rect.width; + const int bottom = rect.y + rect.height; + rect.x = (left / 16) * 16; + rect.y = (top / 16) * 16; + rect.width = ((right + 16) / 16) * 16 - rect.x; + rect.height = ((bottom + 16) / 16) * 16 - rect.y; + + // Found valid dirty rect. + // 1. Insert it in the sorted array of the dirty rects. + // 2. Mark the related dirty rects as visited so they will not be removed below. + // 3. Keep only last 3 dirty rects for the same node and renderer (Tizen uses 3 back buffers, Ubuntu 1). + dirtyRect.rect = rect; + auto dirtyRectPos = std::lower_bound(mImpl->itemsDirtyRects.begin(), mImpl->itemsDirtyRects.end(), dirtyRect); + dirtyRectPos = mImpl->itemsDirtyRects.insert(dirtyRectPos, dirtyRect); + + int c = 1; + while (++dirtyRectPos != mImpl->itemsDirtyRects.end()) + { + if (dirtyRectPos->node != item.mNode || dirtyRectPos->renderer != item.mRenderer) + { + break; + } + + dirtyRectPos->visited = true; + Rect& dirtRect = dirtyRectPos->rect; + rect.Merge(dirtRect); + + c++; + if (c > 3) // no more then 3 previous rects + { + mImpl->itemsDirtyRects.erase(dirtyRectPos); + break; + } + } + + damagedRects.push_back(rect); + } + } + else + { + // 1. The item is not dirty, the node and renderer referenced by the item are still exist. + // 2. Mark the related dirty rects as visited so they will not be removed below. + auto dirtyRectPos = std::lower_bound(mImpl->itemsDirtyRects.begin(), mImpl->itemsDirtyRects.end(), dirtyRect); + while (dirtyRectPos != mImpl->itemsDirtyRects.end()) + { + if (dirtyRectPos->node != item.mNode || dirtyRectPos->renderer != item.mRenderer) + { + break; + } + + dirtyRectPos->visited = true; + dirtyRectPos++; + } + } + } + } + } + } + } + + // Check removed nodes or removed renderers dirty rects + auto i = mImpl->itemsDirtyRects.begin(); + auto j = mImpl->itemsDirtyRects.begin(); + while (i != mImpl->itemsDirtyRects.end()) + { + if (i->visited) + { + *j++ = *i; + } + else + { + Rect& dirtRect = i->rect; + damagedRects.push_back(dirtRect); + } + i++; + } + + mImpl->itemsDirtyRects.resize(j - mImpl->itemsDirtyRects.begin()); + damagedRectCleaner.SetCleanOnReturn(false); +} void RenderManager::RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo ) { + Rect clippingRect; + RenderScene( status, scene, renderToFbo, clippingRect); +} + +void RenderManager::RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect ) +{ Internal::Scene& sceneInternal = GetImplementation( scene ); SceneGraph::Scene* sceneObject = sceneInternal.GetSceneObject(); @@ -723,26 +1002,45 @@ void RenderManager::RenderScene( Integration::RenderStatus& status, Integration: clearFullFrameRect = ( surfaceRect == viewportRect ); } + if (!clippingRect.IsEmpty()) + { + if (!clippingRect.Intersect(viewportRect)) + { + DALI_LOG_ERROR("Invalid clipping rect %d %d %d %d\n", clippingRect.x, clippingRect.y, clippingRect.width, clippingRect.height); + clippingRect = Rect(); + } + clearFullFrameRect = false; + } + mImpl->currentContext->Viewport(viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height); - if( instruction.mIsClearColorSet ) + if (instruction.mIsClearColorSet) { - mImpl->currentContext->ClearColor( clearColor.r, - clearColor.g, - clearColor.b, - clearColor.a ); - - if( !clearFullFrameRect ) + mImpl->currentContext->ClearColor(clearColor.r, + clearColor.g, + clearColor.b, + clearColor.a); + if (!clearFullFrameRect) { - mImpl->currentContext->SetScissorTest( true ); - mImpl->currentContext->Scissor( viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height ); - mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR ); - mImpl->currentContext->SetScissorTest( false ); + if (!clippingRect.IsEmpty()) + { + mImpl->currentContext->SetScissorTest(true); + mImpl->currentContext->Scissor(clippingRect.x, clippingRect.y, clippingRect.width, clippingRect.height); + mImpl->currentContext->Clear(clearMask, Context::FORCE_CLEAR); + mImpl->currentContext->SetScissorTest(false); + } + else + { + mImpl->currentContext->SetScissorTest(true); + mImpl->currentContext->Scissor(viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height); + mImpl->currentContext->Clear(clearMask, Context::FORCE_CLEAR); + mImpl->currentContext->SetScissorTest(false); + } } else { - mImpl->currentContext->SetScissorTest( false ); - mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR ); + mImpl->currentContext->SetScissorTest(false); + mImpl->currentContext->Clear(clearMask, Context::FORCE_CLEAR); } } @@ -755,7 +1053,8 @@ void RenderManager::RenderScene( Integration::RenderStatus& status, Integration: mImpl->renderBufferIndex, depthBufferAvailable, stencilBufferAvailable, - mImpl->boundTextures ); + mImpl->boundTextures, + clippingRect ); // Synchronise the FBO/Texture access when there are multiple contexts if ( mImpl->currentContext->IsSurfacelessContextSupported() ) diff --git a/dali/internal/render/common/render-manager.h b/dali/internal/render/common/render-manager.h index 5ed4296..abc3c12 100644 --- a/dali/internal/render/common/render-manager.h +++ b/dali/internal/render/common/render-manager.h @@ -85,7 +85,8 @@ public: Integration::GlSyncAbstraction& glSyncAbstraction, Integration::GlContextHelperAbstraction& glContextHelperAbstraction, Integration::DepthBufferAvailable depthBufferAvailable, - Integration::StencilBufferAvailable stencilBufferAvailable ); + Integration::StencilBufferAvailable stencilBufferAvailable, + Integration::PartialUpdateAvailable partialUpdateAvailable ); /** * Non-virtual destructor; not intended as a base class @@ -359,6 +360,18 @@ public: */ void PreRender( Integration::RenderStatus& status, bool forceClear, bool uploadOnly ); + // This method should be called from Core::PreRender() + + /** + * This is called before rendering any scene in the next frame. This method should be preceded + * by a call up Update. + * Multi-threading note: this method should be called from a dedicated rendering thread. + * @pre The GL context must have been created, and made current. + * @param[in] scene The scene to be rendered. + * @param[out] damagedRects The list of damaged rects for the current render pass. + */ + void PreRender( Integration::Scene& scene, std::vector>& damagedRects ); + // This method should be called from Core::RenderScene() /** @@ -373,6 +386,19 @@ public: */ void RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo ); + /** + * Render a scene in the next frame. This method should be preceded by a call up PreRender. + * This method should be called twice. The first pass to render off-screen frame buffers if any, + * and the second pass to render the surface. + * Multi-threading note: this method should be called from a dedicated rendering thread. + * @pre The GL context must have been created, and made current. + * @param[out] status contains the rendering flags. + * @param[in] scene The scene to be rendered. + * @param[in] renderToFbo True to render off-screen frame buffers only if any, and False to render the surface only. + * @param[in] clippingRect The clipping rect for the rendered scene. + */ + void RenderScene( Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect ); + // This method should be called from Core::PostRender() /** diff --git a/dali/internal/render/renderers/render-renderer.cpp b/dali/internal/render/renderers/render-renderer.cpp index eea391a..7456616 100644 --- a/dali/internal/render/renderers/render-renderer.cpp +++ b/dali/internal/render/renderers/render-renderer.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include namespace Dali @@ -137,6 +138,7 @@ Renderer::Renderer( SceneGraph::RenderDataProvider* dataProvider, mGeometry( geometry ), mUniformIndexMap(), mAttributesLocation(), + mUniformsHash(), mStencilParameters( stencilParameters ), mBlendingOptions(), mIndexedDrawFirstElement( 0 ), @@ -147,7 +149,8 @@ Renderer::Renderer( SceneGraph::RenderDataProvider* dataProvider, mDepthTestMode( depthTestMode ), mUpdateAttributesLocation( true ), mPremultipledAlphaEnabled( preMultipliedAlphaEnabled ), - mShaderChanged( false ) + mShaderChanged( false ), + mUpdated( true ) { if( blendingBitmask != 0u ) { @@ -198,6 +201,8 @@ void Renderer::SetBlending( Context& context, bool blend ) context.BlendEquationSeparate( mBlendingOptions.GetBlendEquationRgb(), mBlendingOptions.GetBlendEquationAlpha() ); } + + mUpdated = true; } void Renderer::GlContextDestroyed() @@ -376,41 +381,49 @@ bool Renderer::BindTextures( Context& context, Program& program, Vector& void Renderer::SetFaceCullingMode( FaceCullingMode::Type mode ) { mFaceCullingMode = mode; + mUpdated = true; } void Renderer::SetBlendingBitMask( uint32_t bitmask ) { mBlendingOptions.SetBitmask( bitmask ); + mUpdated = true; } void Renderer::SetBlendColor( const Vector4& color ) { mBlendingOptions.SetBlendColor( color ); + mUpdated = true; } void Renderer::SetIndexedDrawFirstElement( uint32_t firstElement ) { mIndexedDrawFirstElement = firstElement; + mUpdated = true; } void Renderer::SetIndexedDrawElementsCount( uint32_t elementsCount ) { mIndexedDrawElementsCount = elementsCount; + mUpdated = true; } void Renderer::EnablePreMultipliedAlpha( bool enable ) { mPremultipledAlphaEnabled = enable; + mUpdated = true; } void Renderer::SetDepthWriteMode( DepthWriteMode::Type depthWriteMode ) { mDepthWriteMode = depthWriteMode; + mUpdated = true; } void Renderer::SetDepthTestMode( DepthTestMode::Type depthTestMode ) { mDepthTestMode = depthTestMode; + mUpdated = true; } DepthWriteMode::Type Renderer::GetDepthWriteMode() const @@ -426,6 +439,7 @@ DepthTestMode::Type Renderer::GetDepthTestMode() const void Renderer::SetDepthFunction( DepthFunction::Type depthFunction ) { mDepthFunction = depthFunction; + mUpdated = true; } DepthFunction::Type Renderer::GetDepthFunction() const @@ -436,6 +450,7 @@ DepthFunction::Type Renderer::GetDepthFunction() const void Renderer::SetRenderMode( RenderMode::Type renderMode ) { mStencilParameters.renderMode = renderMode; + mUpdated = true; } RenderMode::Type Renderer::GetRenderMode() const @@ -446,6 +461,7 @@ RenderMode::Type Renderer::GetRenderMode() const void Renderer::SetStencilFunction( StencilFunction::Type stencilFunction ) { mStencilParameters.stencilFunction = stencilFunction; + mUpdated = true; } StencilFunction::Type Renderer::GetStencilFunction() const @@ -456,6 +472,7 @@ StencilFunction::Type Renderer::GetStencilFunction() const void Renderer::SetStencilFunctionMask( int stencilFunctionMask ) { mStencilParameters.stencilFunctionMask = stencilFunctionMask; + mUpdated = true; } int Renderer::GetStencilFunctionMask() const @@ -466,6 +483,7 @@ int Renderer::GetStencilFunctionMask() const void Renderer::SetStencilFunctionReference( int stencilFunctionReference ) { mStencilParameters.stencilFunctionReference = stencilFunctionReference; + mUpdated = true; } int Renderer::GetStencilFunctionReference() const @@ -476,6 +494,7 @@ int Renderer::GetStencilFunctionReference() const void Renderer::SetStencilMask( int stencilMask ) { mStencilParameters.stencilMask = stencilMask; + mUpdated = true; } int Renderer::GetStencilMask() const @@ -486,6 +505,7 @@ int Renderer::GetStencilMask() const void Renderer::SetStencilOperationOnFail( StencilOperation::Type stencilOperationOnFail ) { mStencilParameters.stencilOperationOnFail = stencilOperationOnFail; + mUpdated = true; } StencilOperation::Type Renderer::GetStencilOperationOnFail() const @@ -496,6 +516,7 @@ StencilOperation::Type Renderer::GetStencilOperationOnFail() const void Renderer::SetStencilOperationOnZFail( StencilOperation::Type stencilOperationOnZFail ) { mStencilParameters.stencilOperationOnZFail = stencilOperationOnZFail; + mUpdated = true; } StencilOperation::Type Renderer::GetStencilOperationOnZFail() const @@ -506,6 +527,7 @@ StencilOperation::Type Renderer::GetStencilOperationOnZFail() const void Renderer::SetStencilOperationOnZPass( StencilOperation::Type stencilOperationOnZPass ) { mStencilParameters.stencilOperationOnZPass = stencilOperationOnZPass; + mUpdated = true; } StencilOperation::Type Renderer::GetStencilOperationOnZPass() const @@ -609,6 +631,8 @@ void Renderer::Render( Context& context, mAttributesLocation, mIndexedDrawFirstElement, mIndexedDrawElementsCount ); + + mUpdated = false; } } @@ -624,6 +648,51 @@ void Renderer::SetShaderChanged( bool value ) mShaderChanged = value; } +bool Renderer::Updated(BufferIndex bufferIndex, const SceneGraph::NodeDataProvider* node) +{ + if (mUpdated) + { + mUpdated = false; + return true; + } + + if (mShaderChanged || mUpdateAttributesLocation || mGeometry->AttributesChanged()) + { + return true; + } + + std::vector textures = mRenderDataProvider->GetTextures(); + for (Render::Texture* texture : textures) + { + if (texture && texture->IsNativeImage()) + { + return true; + } + } + + uint64_t hash = 0xc70f6907UL; + const SceneGraph::CollectedUniformMap& uniformMapNode = node->GetUniformMap( bufferIndex ); + for (const auto* uniformProperty : uniformMapNode) + { + hash = uniformProperty->propertyPtr->Hash(bufferIndex, hash); + } + + const SceneGraph::UniformMapDataProvider& uniformMapDataProvider = mRenderDataProvider->GetUniformMap(); + const SceneGraph::CollectedUniformMap& uniformMap = uniformMapDataProvider.GetUniformMap( bufferIndex ); + for (const auto* uniformProperty : uniformMap) + { + hash = uniformProperty->propertyPtr->Hash(bufferIndex, hash); + } + + if (mUniformsHash != hash) + { + mUniformsHash = hash; + return true; + } + + return false; +} + } // namespace SceneGraph } // namespace Internal diff --git a/dali/internal/render/renderers/render-renderer.h b/dali/internal/render/renderers/render-renderer.h index a544883..fccf372 100755 --- a/dali/internal/render/renderers/render-renderer.h +++ b/dali/internal/render/renderers/render-renderer.h @@ -384,6 +384,14 @@ public: */ void SetShaderChanged( bool value ); + /** + * Check if the renderer attributes/uniforms are updated and returns the flag + * + * @param[in] bufferIndex The current update buffer index. + * @param[in] node The node using this renderer + */ + bool Updated(BufferIndex bufferIndex, const SceneGraph::NodeDataProvider* node); + private: struct UniformIndexMap; @@ -445,6 +453,8 @@ private: UniformIndexMappings mUniformIndexMap; Vector mAttributesLocation; + uint64_t mUniformsHash; + StencilParameters mStencilParameters; ///< Struct containing all stencil related options BlendingOptions mBlendingOptions; ///< Blending options including blend color, blend func and blend equation @@ -458,6 +468,7 @@ private: bool mUpdateAttributesLocation:1; ///< Indicates attribute locations have changed bool mPremultipledAlphaEnabled:1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required bool mShaderChanged:1; ///< Flag indicating the shader changed and uniform maps have to be updated + bool mUpdated:1; }; diff --git a/dali/internal/update/animation/scene-graph-animator.h b/dali/internal/update/animation/scene-graph-animator.h index 0b3ff50..2de0fd7 100644 --- a/dali/internal/update/animation/scene-graph-animator.h +++ b/dali/internal/update/animation/scene-graph-animator.h @@ -519,6 +519,11 @@ public: progress = SetProgress( progress ); } + if( mPropertyOwner ) + { + mPropertyOwner->SetUpdated( true ); + } + float alpha = ApplyAlphaFunction( progress ); // PropertyType specific part diff --git a/dali/internal/update/common/property-owner.h b/dali/internal/update/common/property-owner.h index 843a19b..d9523e8 100644 --- a/dali/internal/update/common/property-owner.h +++ b/dali/internal/update/common/property-owner.h @@ -160,6 +160,23 @@ public: return mCustomProperties; } + /** + * Mark an property owner with the updated flag. + * @param[in] updated The updated flag + */ + virtual void SetUpdated(bool updated) + { + mUpdated = updated; + } + + /** + * Retrieve if the property owner is updated due to the property is being animating. + * @return An updated flag + */ + bool Updated() + { + return mUpdated; + } // Constraints @@ -226,6 +243,7 @@ protected: OwnedPropertyContainer mCustomProperties; ///< Properties provided with InstallCustomProperty() UniformMap mUniformMaps; ///< Container of owned uniform maps + bool mUpdated; private: diff --git a/dali/internal/update/manager/render-instruction-processor.cpp b/dali/internal/update/manager/render-instruction-processor.cpp index 1e41c12..37f9236 100644 --- a/dali/internal/update/manager/render-instruction-processor.cpp +++ b/dali/internal/update/manager/render-instruction-processor.cpp @@ -151,45 +151,53 @@ bool CompareItems3DWithClipping( const RenderInstructionProcessor::SortAttribute * @param isLayer3d Whether we are processing a 3D layer or not * @param cull Whether frustum culling is enabled or not */ -inline void AddRendererToRenderList( BufferIndex updateBufferIndex, - RenderList& renderList, - Renderable& renderable, - const Matrix& viewMatrix, - SceneGraph::Camera& camera, - bool isLayer3d, - bool cull ) +inline void AddRendererToRenderList(BufferIndex updateBufferIndex, + RenderList& renderList, + Renderable& renderable, + const Matrix& viewMatrix, + SceneGraph::Camera& camera, + bool isLayer3d, + bool cull) { - bool inside( true ); + bool inside(true); Node* node = renderable.mNode; - if( cull && renderable.mRenderer && !renderable.mRenderer->GetShader().HintEnabled( Dali::Shader::Hint::MODIFIES_GEOMETRY ) ) + if (cull && renderable.mRenderer && !renderable.mRenderer->GetShader().HintEnabled(Dali::Shader::Hint::MODIFIES_GEOMETRY)) { const Vector4& boundingSphere = node->GetBoundingSphere(); - inside = ( boundingSphere.w > Math::MACHINE_EPSILON_1000 ) && - ( camera.CheckSphereInFrustum( updateBufferIndex, Vector3( boundingSphere ), boundingSphere.w ) ); + inside = (boundingSphere.w > Math::MACHINE_EPSILON_1000) && + (camera.CheckSphereInFrustum(updateBufferIndex, Vector3(boundingSphere), boundingSphere.w)); } - if( inside ) + if (inside) { Renderer::OpacityType opacityType = renderable.mRenderer ? renderable.mRenderer->GetOpacityType( updateBufferIndex, *renderable.mNode ) : Renderer::OPAQUE; - if( opacityType != Renderer::TRANSPARENT || node->GetClippingMode() == ClippingMode::CLIP_CHILDREN ) + if (opacityType != Renderer::TRANSPARENT || node->GetClippingMode() == ClippingMode::CLIP_CHILDREN) { // Get the next free RenderItem. RenderItem& item = renderList.GetNextFreeItem(); + item.mIsUpdated = (item.mNode != renderable.mNode); item.mNode = renderable.mNode; - item.mIsOpaque = ( opacityType == Renderer::OPAQUE ); - item.mDepthIndex = 0; - if(!isLayer3d) + bool prevIsOpaque = item.mIsOpaque; + item.mIsOpaque = (opacityType == Renderer::OPAQUE); + item.mIsUpdated |= (prevIsOpaque != item.mIsOpaque); + + int prevDepthIndex = item.mDepthIndex; + item.mDepthIndex = 0; + if (!isLayer3d) { item.mDepthIndex = renderable.mNode->GetDepthIndex(); } - if( DALI_LIKELY( renderable.mRenderer ) ) + Render::Renderer* prevRenderer = item.mRenderer; + if (DALI_LIKELY(renderable.mRenderer)) { - item.mRenderer = &renderable.mRenderer->GetRenderer(); - item.mTextureSet = renderable.mRenderer->GetTextures(); + item.mRenderer = &renderable.mRenderer->GetRenderer(); + const void* prevTextureSet = item.mTextureSet; + item.mTextureSet = renderable.mRenderer->GetTextures(); + item.mIsUpdated |= (prevTextureSet != item.mTextureSet); item.mDepthIndex += renderable.mRenderer->GetDepthIndex(); } else @@ -197,17 +205,45 @@ inline void AddRendererToRenderList( BufferIndex updateBufferIndex, item.mRenderer = nullptr; } - // Save ModelView matrix onto the item. - node->GetWorldMatrixAndSize( item.mModelMatrix, item.mSize ); + item.mIsUpdated |= (prevDepthIndex != item.mDepthIndex); + item.mIsUpdated |= (prevRenderer != item.mRenderer); + item.mIsUpdated |= isLayer3d; - Matrix::Multiply( item.mModelViewMatrix, item.mModelMatrix, viewMatrix ); + if (!item.mIsUpdated) + { + Matrix prevModelViewMatrix = item.mModelViewMatrix; + Vector3 prevSize = item.mSize; + + // Save ModelView matrix onto the item. + node->GetWorldMatrixAndSize( item.mModelMatrix, item.mSize ); + Matrix::Multiply( item.mModelViewMatrix, item.mModelMatrix, viewMatrix ); + + item.mIsUpdated = ((prevSize != item.mSize) || (item.mModelViewMatrix != prevModelViewMatrix)); + } + else + { + // Save ModelView matrix onto the item. + node->GetWorldMatrixAndSize( item.mModelMatrix, item.mSize ); + Matrix::Multiply( item.mModelViewMatrix, item.mModelMatrix, viewMatrix ); + } + + item.mUpdateSize = node->GetUpdateSizeHint(); + if (item.mUpdateSize == Vector3::ZERO) + { + // RenderItem::CalculateViewportSpaceAABB cannot cope with z transform + // I don't use item.mModelMatrix.GetTransformComponents() for z transform, would be to slow + if (!isLayer3d && item.mModelMatrix.GetZAxis() == Vector3(0.0f, 0.0f, 1.0f)) + { + item.mUpdateSize = item.mSize; + } + } } - node->SetCulled( updateBufferIndex, false ); + node->SetCulled( updateBufferIndex, false ); } else { - node->SetCulled( updateBufferIndex, true ); + node->SetCulled( updateBufferIndex, true ); } } @@ -240,7 +276,7 @@ inline void AddRenderersToRenderList( BufferIndex updateBufferIndex, viewMatrix, camera, isLayer3d, - cull ); + cull); } } @@ -280,6 +316,7 @@ inline bool TryReuseCachedRenderers( Layer& layer, retValue = true; } } + return retValue; } diff --git a/dali/internal/update/nodes/node.cpp b/dali/internal/update/nodes/node.cpp index d80d7c4..32f6dee 100755 --- a/dali/internal/update/nodes/node.cpp +++ b/dali/internal/update/nodes/node.cpp @@ -90,6 +90,7 @@ Node::Node() mVisible( true ), mCulled( false ), mColor( Color::WHITE ), + mUpdateSizeHint( Vector3::ZERO ), mWorldPosition( TRANSFORM_PROPERTY_WORLD_POSITION, Vector3( 0.0f,0.0f,0.0f ) ), // Zero initialized by default mWorldScale( TRANSFORM_PROPERTY_WORLD_SCALE, Vector3( 1.0f,1.0f,1.0f ) ), mWorldOrientation(), // Initialized to identity by default diff --git a/dali/internal/update/nodes/node.h b/dali/internal/update/nodes/node.h index 5cd6073..6d24979 100755 --- a/dali/internal/update/nodes/node.h +++ b/dali/internal/update/nodes/node.h @@ -117,6 +117,21 @@ public: } /** + * Mark an node and its sub tree according to the updated flag. + * @param[in] updated The updated flag + * (used for partial rendering to mark an animating sub tree for example). + */ + virtual void SetUpdated(bool updated) + { + mUpdated = updated; + + for (Node* child : mChildren) + { + child->SetUpdated(updated); + } + } + + /** * This method sets clipping information on the node based on its hierarchy in the scene-graph. * A value is calculated that can be used during sorting to increase sort speed. * @param[in] clippingId The Clipping ID of the node to set @@ -614,6 +629,20 @@ public: } /** + * Retrieve the update size hint of the node. + * @return The update size hint. + */ + const Vector3& GetUpdateSizeHint() const + { + if( mTransformId != INVALID_TRANSFORM_ID ) + { + return mUpdateSizeHint.Get(0); + } + + return Vector3::ZERO; + } + + /** * Retrieve the bounding sphere of the node * @return A vector4 describing the bounding sphere. XYZ is the center and W is the radius */ @@ -881,6 +910,8 @@ public: // Default properties AnimatableProperty mVisible; ///< Visibility can be inherited from the Node hierachy AnimatableProperty mCulled; ///< True if the node is culled. This is not animatable. It is just double-buffered. AnimatableProperty mColor; ///< Color can be inherited from the Node hierarchy + AnimatableProperty mUpdateSizeHint; ///< Update size hint is provided for damaged area calculation. This is not animatable. It is just double-buffered. (Because all these bloody properties are). + // Inherited properties; read-only from public API diff --git a/dali/internal/update/render-tasks/scene-graph-camera.cpp b/dali/internal/update/render-tasks/scene-graph-camera.cpp index 71a2d52..aa44bd3 100644 --- a/dali/internal/update/render-tasks/scene-graph-camera.cpp +++ b/dali/internal/update/render-tasks/scene-graph-camera.cpp @@ -194,6 +194,11 @@ void Camera::SetNode( const Node* node ) mNode = node; } +const Node* Camera::GetNode() const +{ + return mNode; +} + void Camera::SetType( Dali::Camera::Type type ) { mType = type; diff --git a/dali/internal/update/render-tasks/scene-graph-camera.h b/dali/internal/update/render-tasks/scene-graph-camera.h index a3bc173..f75f81b 100644 --- a/dali/internal/update/render-tasks/scene-graph-camera.h +++ b/dali/internal/update/render-tasks/scene-graph-camera.h @@ -100,6 +100,12 @@ public: void SetNode( const Node* node ); /** + * Get the node this scene graph camera belongs to. + * @return node The owning node. + */ + const Node* GetNode() const; + + /** * @copydoc Dali::Internal::CameraActor::SetType */ void SetType( Dali::Camera::Type type ); diff --git a/dali/public-api/common/list-wrapper.h b/dali/public-api/common/list-wrapper.h new file mode 100644 index 0000000..a63e6c8 --- /dev/null +++ b/dali/public-api/common/list-wrapper.h @@ -0,0 +1,64 @@ +#ifndef DALI_LIST_WRAPPER_H +#define DALI_LIST_WRAPPER_H + +/* + * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef HIDE_DALI_INTERNALS + +#include + +#else + +// Ensure that default visibility is used with any class that is used as an exception type +#include +#include +#include + +#if defined(__clang__) + +#undef _LIBCPP_INLINE_VISIBILITY +#define _LIBCPP_INLINE_VISIBILITY +#undef _LIBCPP_EXTERN_TEMPLATE +#define _LIBCPP_EXTERN_TEMPLATE(...) + +#include + +#undef _LIBCPP_INLINE_VISIBILITY +#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__)) +#undef _LIBCPP_EXTERN_TEMPLATE +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; + +#else + +#include +#include +#undef _GLIBCXX_VISIBILITY_ATTR +#undef _GLIBCXX_VISIBILITY +#define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ ("hidden"))) +#define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ ("hidden"))) +#include +#undef _GLIBCXX_VISIBILITY_ATTR +#undef _GLIBCXX_VISIBILITY +#define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V))) // restore `_GLIBCXX_VISIBILITY_ATTR` +#define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V))) // restore `_GLIBCXX_VISIBILITY` + +#endif // #ifdef __clang__ + +#endif // #ifndef HIDE_DALI_INTERNALS + +#endif // DALI_LISt_WRAPPER_H diff --git a/dali/public-api/file.list b/dali/public-api/file.list index 01d7a75..d73e282 100644 --- a/dali/public-api/file.list +++ b/dali/public-api/file.list @@ -133,6 +133,7 @@ SET( public_api_core_common_header_files ${public_api_src_dir}/common/loading-state.h ${public_api_src_dir}/common/stage.h ${public_api_src_dir}/common/type-traits.h + ${public_api_src_dir}/common/list-wrapper.h ${public_api_src_dir}/common/vector-wrapper.h ${public_api_src_dir}/common/view-mode.h ) diff --git a/dali/public-api/math/rect.h b/dali/public-api/math/rect.h index 5560a8a..4569a98 100644 --- a/dali/public-api/math/rect.h +++ b/dali/public-api/math/rect.h @@ -135,6 +135,16 @@ struct Rect } /** + * @brief Determines whether or not this Rectangle is valid. + * + * @return True if width and height are not negative + */ + bool IsValid() const + { + return !(width < 0 || height < 0); + } + + /** * @brief Gets the left of the rectangle. * * @SINCE_1_0.0 @@ -197,10 +207,70 @@ struct Rect */ bool Intersects(const Rect& other) const { - return (other.x + other.width) > x && - other.x < (x + width) && - (other.y + other.height) > y && - other.y < (y + height); + return (other.x + other.width) > x && other.x < (x + width) && + (other.y + other.height) > y && other.y < (y + height); + } + + /** + * @brief Intersects this rectangle and the specified rectangle. + * The result of the intersection is stored in this rectangle. + * + * @param[in] rect The other rectangle to intersect with + */ + bool Intersect(const Rect& rect) + { + const int left = std::max(rect.x, x); + const int top = std::max(rect.y, y); + const int right = std::min(rect.x + rect.width, x + width); + const int bottom = std::min(rect.y + rect.height, y + height); + + const int width = right - left; + const int height = bottom - top; + if (!(width < 0 || height < 0)) + { + x = left; + y = top; + this->width = width; + this->height = height; + return true; + } + + return false; + } + + /** + * @brief Merges this rectangle and the specified rectangle. + * The result of the merge is stored in this rectangle. + * + * @param[in] rect The other rectangle to merge with + */ + void Merge(const Rect& rect) + { + const int left = std::min(rect.x, x); + const int top = std::min(rect.y, y); + const int right = std::max(rect.x + rect.width, x + width); + const int bottom = std::max(rect.y + rect.height, y + height); + x = left; + y = top; + width = right - left; + height = bottom - top; + } + + /** + * @brief Inset the rectangle by (dx,dy). If dx is positive, then the sides are moved inwards. + * If dx is negative, then the sides are moved outwards. + * The result of the inset is stored in this rectangle. + */ + void Inset(T dx, T dy) + { + const int left = x - dx; + const int top = y - dy; + const int right = x + width + dx; + const int bottom = y + height + dy; + x = left; + y = top; + width = right - left; + height = bottom - top; } /** @@ -212,10 +282,8 @@ struct Rect */ bool Contains(const Rect& other) const { - return other.x >= x && - (other.x + other.width) <= (x + width) && - other.y >= y && - (other.y + other.height) <= (y + height); + return other.x >= x && (other.x + other.width) <= (x + width) && + other.y >= y && (other.y + other.height) <= (y + height); } public: // Data -- 2.7.4 From 751df2f064170b9d2ca87e6170bfa47e6b0cf83f Mon Sep 17 00:00:00 2001 From: Sunghyun Kim Date: Mon, 22 Jun 2020 17:27:00 +0900 Subject: [PATCH 14/16] DALi Version 1.5.17 Change-Id: Icbc958456d46fb47cad0ccea8de98b413d2d95c6 --- dali/public-api/dali-core-version.cpp | 2 +- packaging/dali.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dali/public-api/dali-core-version.cpp b/dali/public-api/dali-core-version.cpp index e111d3c..9595678 100644 --- a/dali/public-api/dali-core-version.cpp +++ b/dali/public-api/dali-core-version.cpp @@ -28,7 +28,7 @@ namespace Dali const uint32_t CORE_MAJOR_VERSION = 1; const uint32_t CORE_MINOR_VERSION = 5; -const uint32_t CORE_MICRO_VERSION = 16; +const uint32_t CORE_MICRO_VERSION = 17; const char * const CORE_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/packaging/dali.spec b/packaging/dali.spec index 65beae4..690be26 100644 --- a/packaging/dali.spec +++ b/packaging/dali.spec @@ -1,6 +1,6 @@ Name: dali Summary: DALi 3D Engine -Version: 1.5.16 +Version: 1.5.17 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT -- 2.7.4 From a0c03119b12f807a438cedddb0525a50d693d270 Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Wed, 17 Jun 2020 11:17:15 +0900 Subject: [PATCH 15/16] Support WebP format - Add webp and libwebp-dev library on dali-env - Webp animation requires WEBP_DEMUX_ABI_VERSION 0x0107 or later Change-Id: I03d9adb70439b06bd6c47022b14913169e4881cd Signed-off-by: Seungho, Baek --- build/scripts/dali_env | 1 + 1 file changed, 1 insertion(+) diff --git a/build/scripts/dali_env b/build/scripts/dali_env index 47620bf..425fd10 100755 --- a/build/scripts/dali_env +++ b/build/scripts/dali_env @@ -56,6 +56,7 @@ my @system_packages = ( "libcairo2-dev", "libopencv-dev", "gettext", + "libwebp-dev", ); # Some packages like require building from source -- 2.7.4 From d6d7e11c9886d98eb9479fb85ae54a55d77dc363 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 30 Jun 2020 14:51:07 +0900 Subject: [PATCH 16/16] (Partial update) The color property should be checked Change-Id: If9f649a2312dd39fa6709b82a0e16292de23560b --- automated-tests/src/dali/utc-Dali-Actor.cpp | 6 ++++++ dali/internal/render/common/render-item.cpp | 1 + dali/internal/render/common/render-item.h | 1 + dali/internal/update/manager/render-instruction-processor.cpp | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index 1550098..010b564 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -7652,6 +7652,12 @@ int utcDaliActorPartialUpdateSetColor(void) DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION); DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION); + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + + damagedRects.clear(); + application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects); + // 2. Set new color actor.SetProperty(Actor::Property::COLOR, Vector3(1.0f, 0.0f, 0.0f)); application.SendNotification(); diff --git a/dali/internal/render/common/render-item.cpp b/dali/internal/render/common/render-item.cpp index d10e15e..c218b25 100644 --- a/dali/internal/render/common/render-item.cpp +++ b/dali/internal/render/common/render-item.cpp @@ -45,6 +45,7 @@ RenderItem* RenderItem::New() RenderItem::RenderItem() : mModelMatrix( false ), mModelViewMatrix( false ), + mColor( Vector4::ZERO ), mSize(), mRenderer( NULL ), mNode( NULL ), diff --git a/dali/internal/render/common/render-item.h b/dali/internal/render/common/render-item.h index 77e1fac..47fc386 100644 --- a/dali/internal/render/common/render-item.h +++ b/dali/internal/render/common/render-item.h @@ -78,6 +78,7 @@ struct RenderItem Matrix mModelMatrix; Matrix mModelViewMatrix; + Vector4 mColor; Vector3 mSize; Vector3 mUpdateSize; Render::Renderer* mRenderer; diff --git a/dali/internal/update/manager/render-instruction-processor.cpp b/dali/internal/update/manager/render-instruction-processor.cpp index 37f9236..b973fa9 100644 --- a/dali/internal/update/manager/render-instruction-processor.cpp +++ b/dali/internal/update/manager/render-instruction-processor.cpp @@ -184,6 +184,10 @@ inline void AddRendererToRenderList(BufferIndex updateBufferIndex, item.mIsOpaque = (opacityType == Renderer::OPAQUE); item.mIsUpdated |= (prevIsOpaque != item.mIsOpaque); + Vector4 prevColor = item.mColor; + item.mColor = renderable.mNode->GetColor(updateBufferIndex); + item.mIsUpdated |= (prevColor != item.mColor); + int prevDepthIndex = item.mDepthIndex; item.mDepthIndex = 0; if (!isLayer3d) -- 2.7.4