// 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 ) );
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();
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;
}
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 ) );
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();
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;
}
// 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 );
// 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();
// 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 );
// 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;
}
// 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 );
// 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();
// 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;
}