// Start the animation
Vector3 targetPosition(10.0f, 10.0f, 10.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
animation.Play();
bool signalReceived(false);
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(10.0f, 10.0f, 10.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
// Start the animation
animation.SetLooping(true);
DALI_TEST_CHECK(animation.GetEndAction() == Animation::Bake);
Vector3 targetPosition(10.0f, 10.0f, 10.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
// Start the animation
animation.Play();
DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::BakeFinal);
Vector3 targetPosition(10.0f, 10.0f, 10.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
// Start the animation
animation.Play();
animation.SetDisconnectAction( Animation::Bake );
Vector3 targetPosition(10.0f, 10.0f, 10.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
// Start the animation
animation.Play();
animation.SetDisconnectAction( Animation::Discard );
Vector3 targetPosition(10.0f, 10.0f, 10.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
// Start the animation
animation.Play();
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(10.0f, 10.0f, 10.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*0.5f*1000.0f)/*Only half the animation*/);
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
// Start the animation
animation.Play();
Animation animation = Animation::New(durationSeconds);
animation.SetDisconnectAction( Animation::Discard );
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
// Start the animation
animation.Play();
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
bool signalReceived(false);
AnimationFinishCheck finishCheck(signalReceived);
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
// Start the animation
animation.Play();
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
//PlayFrom with an argument outside the range [0..1] will be ignored
animation.PlayFrom(-1.0f);
application.SendNotification();
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
//Trying to set the current cursor outside the range [0..1] is ignored
animation.SetCurrentProgress( -1.0f);
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
Vector3 fiftyPercentProgress(targetPosition * 0.5f);
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
Vector3 fiftyPercentProgress(targetPosition * 0.5f);
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
Vector3 fiftyPercentProgress(targetPosition * 0.5f);
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(100.0f, 100.0f, 100.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear);
+ animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunctions::Linear);
Vector3 fiftyPercentProgress(targetPosition * 0.5f);
finishCheck.Reset();
actor.SetPosition(Vector3::ZERO);
Vector3 targetScale(3.0f, 3.0f, 3.0f);
- animation.ScaleTo(actor, targetScale, AlphaFunctions::Linear);
+ animation.AnimateTo( Property( actor, Actor::Property::SCALE ), targetScale, AlphaFunctions::Linear );
animation.Play();
application.SendNotification();
}
-int UtcDaliAnimationMoveByFloat3(void)
+int UtcDaliAnimationAnimateByPropertyPositionVector3(void)
{
TestApplication application;
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(20.0f, 20.0f, 20.0f);
Vector3 relativePosition(targetPosition - startPosition);
- animation.MoveBy(actor, relativePosition.x, relativePosition.y, relativePosition.z);
+ animation.AnimateBy( Property( actor, Actor::Property::POSITION ), Vector3( relativePosition.x, relativePosition.y, relativePosition.z ) );
Vector3 ninetyFivePercentProgress(startPosition + relativePosition*0.95f);
END_TEST;
}
-int UtcDaliAnimationMoveByVector3Alpha(void)
+int UtcDaliAnimationAnimateByPropertyPositionVector3Alpha(void)
{
TestApplication application;
Animation animation = Animation::New(durationSeconds);
Vector3 targetPosition(20.0f, 20.0f, 20.0f);
Vector3 relativePosition(targetPosition - startPosition);
- animation.MoveBy(actor, relativePosition, AlphaFunctions::EaseOut);
+ animation.AnimateBy( Property( actor, Actor::Property::POSITION ), relativePosition, AlphaFunctions::EaseOut );
Vector3 ninetyFivePercentProgress(startPosition + relativePosition*0.95f);
END_TEST;
}
-int UtcDaliAnimationMoveByVector3AlphaFloat2(void)
+int UtcDaliAnimationAnimateByPropertyPositionVector3AlphaTimePeriod(void)
{
TestApplication application;
Vector3 targetPosition(20.0f, 20.0f, 20.0f);
Vector3 relativePosition(targetPosition - startPosition);
float delay = 0.5f;
- animation.MoveBy(actor, relativePosition, AlphaFunctions::Linear, delay, durationSeconds - delay);
-
- Vector3 ninetyFivePercentProgress(startPosition + relativePosition*0.95f);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- 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(), startPosition, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(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(), targetPosition, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliAnimationMoveToFloat3(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Vector3 targetPosition(200.0f, 200.0f, 200.0f);
- animation.MoveTo(actor, targetPosition.x, targetPosition.y, targetPosition.z);
-
- Vector3 seventyFivePercentProgress(targetPosition * 0.75f);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*750.0f)/* 75% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.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 );
- END_TEST;
-}
-
-int UtcDaliAnimationMoveToVector3Alpha(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Vector3 targetPosition(200.0f, 200.0f, 200.0f);
- animation.MoveTo(actor, targetPosition, AlphaFunctions::EaseIn);
-
- Vector3 seventyFivePercentProgress(targetPosition * 0.75f);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*750.0f)/* 75% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
-
- // The position should have moved less, than with a linear alpha function
- Vector3 current(actor.GetCurrentPosition());
- DALI_TEST_CHECK( current.x > Vector3::ZERO.x );
- DALI_TEST_CHECK( current.y > Vector3::ZERO.y );
- DALI_TEST_CHECK( current.z > Vector3::ZERO.z );
- DALI_TEST_CHECK( current.x < seventyFivePercentProgress.x );
- DALI_TEST_CHECK( current.y < seventyFivePercentProgress.y );
- DALI_TEST_CHECK( current.z < seventyFivePercentProgress.z );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.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 );
- END_TEST;
-}
-
-int UtcDaliAnimationMoveToVector3AlphaFloat2(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Vector3 targetPosition(200.0f, 200.0f, 200.0f);
- float delay = 0.5f;
- animation.MoveTo(actor, targetPosition, AlphaFunctions::Linear, delay, durationSeconds - delay);
-
- Vector3 seventyFivePercentProgress(targetPosition * 0.75f);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- 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(), Vector3::ZERO, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.25) + 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 );
- END_TEST;
-}
-
-int UtcDaliAnimationRotateByDegreeVector3(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Degree relativeRotationDegrees(360.0f);
- Radian relativeRotationRadians(relativeRotationDegrees);
- animation.RotateBy(actor, relativeRotationDegrees/*Degree version*/, Vector3::YAXIS);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliAnimationRotateByRadianVector3(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Degree relativeRotationDegrees(360.0f);
- Radian relativeRotationRadians(relativeRotationDegrees);
- animation.RotateBy(actor, relativeRotationRadians/*Radian version*/, Vector3::YAXIS);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliAnimationRotateByDegreeVector3Alpha(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Degree relativeRotationDegrees(360.0f);
- Radian relativeRotationRadians(relativeRotationDegrees);
- animation.RotateBy(actor, relativeRotationDegrees/*Degree version*/, Vector3::YAXIS, AlphaFunctions::EaseIn);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliAnimationRotateByRadianVector3Alpha(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Degree relativeRotationDegrees(360.0f);
- Radian relativeRotationRadians(relativeRotationDegrees);
- animation.RotateBy(actor, relativeRotationRadians/*Radian version*/, Vector3::YAXIS, AlphaFunctions::EaseIn);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliAnimationRotateByDegreeVector3AlphaFloat2(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Degree relativeRotationDegrees(360.0f);
- Radian relativeRotationRadians(relativeRotationDegrees);
- float delay = 0.3f;
- animation.RotateBy(actor, relativeRotationDegrees/*Degree version*/, Vector3::YAXIS, AlphaFunctions::EaseIn, delay, durationSeconds - delay);
+ animation.AnimateBy( Property( actor, Actor::Property::POSITION ), relativePosition, AlphaFunctions::Linear, TimePeriod( delay, durationSeconds - delay ) );
// Start the animation
animation.Play();
animation.FinishedSignal().Connect(&application, finishCheck);
application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
+ 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();
- progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION );
application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// 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.GetCurrentPosition(), targetPosition, TEST_LOCATION );
END_TEST;
}
-
-int UtcDaliAnimationRotateByRadianVector3AlphaFloat2(void)
+int UtcDaliAnimationAnimateToPropertyPositionVector3(void)
{
TestApplication application;
Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
- Degree relativeRotationDegrees(360.0f);
- Radian relativeRotationRadians(relativeRotationDegrees);
- float delay = 0.3f;
- animation.RotateBy(actor, relativeRotationRadians/*Radian version*/, Vector3::YAXIS, AlphaFunctions::EaseIn, delay, durationSeconds - delay);
-
- // Start the animation
- animation.Play();
-
- bool signalReceived(false);
- AnimationFinishCheck finishCheck(signalReceived);
- animation.FinishedSignal().Connect(&application, finishCheck);
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
-
- // We didn't expect the animation to finish yet
- application.SendNotification();
- finishCheck.CheckSignalNotReceived();
- progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
-
- // We did expect the animation to finish
- application.SendNotification();
- finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliAnimationRotateToDegreeVector3(void)
-{
- TestApplication application;
-
- Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
- Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ Vector3 targetPosition(200.0f, 200.0f, 200.0f);
+ animation.AnimateTo( Property( actor, Actor::Property::POSITION ), Vector3( targetPosition.x, targetPosition.y, targetPosition.z ) );
- // Build the animation
- float durationSeconds(1.0f);
- Animation animation = Animation::New(durationSeconds);
- Degree targetRotationDegrees(90.0f);
- Radian targetRotationRadians(targetRotationDegrees);
- animation.RotateTo(actor, targetRotationDegrees/*Degree version*/, Vector3::YAXIS);
+ Vector3 seventyFivePercentProgress(targetPosition * 0.75f);
// Start the animation
animation.Play();
animation.FinishedSignal().Connect(&application, finishCheck);
application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
+ application.Render(static_cast<unsigned int>(durationSeconds*750.0f)/* 75% progress */);
// 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.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// 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.GetCurrentPosition(), targetPosition, TEST_LOCATION );
END_TEST;
}
-int UtcDaliAnimationRotateToRadianVector3(void)
+int UtcDaliAnimationAnimateToPropertyPositionVector3Alpha(void)
{
TestApplication application;
Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
- Degree targetRotationDegrees(90.0f);
- Radian targetRotationRadians(targetRotationDegrees);
- animation.RotateTo(actor, targetRotationRadians/*Radian version*/, Vector3::YAXIS);
+ Vector3 targetPosition(200.0f, 200.0f, 200.0f);
+ animation.AnimateTo( Property( actor, Actor::Property::POSITION ), targetPosition, AlphaFunctions::EaseIn );
+
+ Vector3 seventyFivePercentProgress(targetPosition * 0.75f);
// Start the animation
animation.Play();
animation.FinishedSignal().Connect(&application, finishCheck);
application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
+ application.Render(static_cast<unsigned int>(durationSeconds*750.0f)/* 75% progress */);
// 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
- // 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 );
+ // The position should have moved less, than with a linear alpha function
+ Vector3 current(actor.GetCurrentPosition());
+ DALI_TEST_CHECK( current.x > Vector3::ZERO.x );
+ DALI_TEST_CHECK( current.y > Vector3::ZERO.y );
+ DALI_TEST_CHECK( current.z > Vector3::ZERO.z );
+ DALI_TEST_CHECK( current.x < seventyFivePercentProgress.x );
+ DALI_TEST_CHECK( current.y < seventyFivePercentProgress.y );
+ DALI_TEST_CHECK( current.z < seventyFivePercentProgress.z );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// 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.GetCurrentPosition(), targetPosition, TEST_LOCATION );
END_TEST;
}
-int UtcDaliAnimationRotateToQuaternion(void)
+int UtcDaliAnimationAnimateToPropertyPositionVector3AlphaTimePeriod(void)
{
TestApplication application;
Actor actor = Actor::New();
- actor.SetOrientation(Quaternion(0.0f, Vector3::YAXIS));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
- Degree targetRotationDegrees(90.0f);
- Radian targetRotationRadians(targetRotationDegrees);
- Quaternion targetRotation(targetRotationRadians, Vector3::YAXIS);
- animation.RotateTo(actor, targetRotation/*Quaternion version*/);
+ Vector3 targetPosition(200.0f, 200.0f, 200.0f);
+ float delay = 0.5f;
+ animation.AnimateTo( Property( actor, Actor::Property::POSITION ), targetPosition, AlphaFunctions::Linear, TimePeriod( delay, durationSeconds - delay ) );
+
+ Vector3 seventyFivePercentProgress(targetPosition * 0.75f);
// Start the animation
animation.Play();
animation.FinishedSignal().Connect(&application, finishCheck);
application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
-
- // 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 );
-
- application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
+ 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.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */);
// 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.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION );
application.SendNotification();
- application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.25) + 1u/*just beyond the animation duration*/);
// 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.GetCurrentPosition(), targetPosition, TEST_LOCATION );
END_TEST;
}
-int UtcDaliAnimationRotateToDegreeVector3Alpha(void)
+int UtcDaliAnimationAnimateByPropertyOrientationQuaternion(void)
{
TestApplication application;
// Build the animation
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
- Degree targetRotationDegrees(90.0f);
- Radian targetRotationRadians(targetRotationDegrees);
- animation.RotateTo(actor, targetRotationDegrees/*Degree version*/, Vector3::YAXIS, AlphaFunctions::EaseIn);
+ Degree relativeRotationDegrees(360.0f);
+ Radian relativeRotationRadians(relativeRotationDegrees);
+ animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( relativeRotationRadians, Vector3::YAXIS ) );
// Start the animation
animation.Play();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// 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.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
-int UtcDaliAnimationRotateToRadianVector3Alpha(void)
+int UtcDaliAnimationAnimateByPropertyOrientationQuaternionAlpha(void)
{
TestApplication application;
// Build the animation
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
- Degree targetRotationDegrees(90.0f);
- Radian targetRotationRadians(targetRotationDegrees);
- animation.RotateTo(actor, targetRotationRadians/*Radian version*/, Vector3::YAXIS, AlphaFunctions::EaseIn);
+ Degree relativeRotationDegrees(360.0f);
+ Radian relativeRotationRadians(relativeRotationDegrees);
+ animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( relativeRotationRadians, Vector3::YAXIS ), AlphaFunctions::EaseIn );
// Start the animation
animation.Play();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// 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.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
-int UtcDaliAnimationRotateToQuaternionAlpha(void)
+int UtcDaliAnimationAnimateByPropertyOrientationQuaternionAlphaTimePeriod(void)
{
TestApplication application;
// Build the animation
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
- Degree targetRotationDegrees(90.0f);
- Radian targetRotationRadians(targetRotationDegrees);
- Quaternion targetRotation(targetRotationRadians, Vector3::YAXIS);
- animation.RotateTo(actor, targetRotation/*Quaternion version*/, AlphaFunctions::EaseIn);
+ Degree relativeRotationDegrees(360.0f);
+ Radian relativeRotationRadians(relativeRotationDegrees);
+ float delay = 0.3f;
+ animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( relativeRotationRadians, Vector3::YAXIS ),
+ AlphaFunctions::EaseIn, TimePeriod( delay, durationSeconds - delay ) );
// Start the animation
animation.Play();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// 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.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
-int UtcDaliAnimationRotateToDegreeVector3AlphaFloat2(void)
+int UtcDaliAnimationAnimateToPropertyOrientationQuaternion(void)
{
TestApplication application;
Animation animation = Animation::New(durationSeconds);
Degree targetRotationDegrees(90.0f);
Radian targetRotationRadians(targetRotationDegrees);
- float delay(0.1f);
- animation.RotateTo(actor, targetRotationDegrees/*Degree version*/, Vector3::YAXIS, AlphaFunctions::EaseIn, delay, durationSeconds - delay);
+ Quaternion targetRotation(targetRotationRadians, Vector3::YAXIS);
+ animation.AnimateTo( Property( actor, Actor::Property::ORIENTATION ), targetRotation );
// Start the animation
animation.Play();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
END_TEST;
}
-int UtcDaliAnimationRotateToRadianVector3AlphaFloat2(void)
+int UtcDaliAnimationAnimateToPropertyOrientationQuaternionAlpha(void)
{
TestApplication application;
Animation animation = Animation::New(durationSeconds);
Degree targetRotationDegrees(90.0f);
Radian targetRotationRadians(targetRotationDegrees);
- float delay(0.1f);
- animation.RotateTo(actor, targetRotationRadians/*Radian version*/, Vector3::YAXIS, AlphaFunctions::EaseIn, delay, durationSeconds - delay);
+ Quaternion targetRotation(targetRotationRadians, Vector3::YAXIS);
+ animation.AnimateTo( Property( actor, Actor::Property::ORIENTATION ), targetRotation, AlphaFunctions::EaseIn );
// Start the animation
animation.Play();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.25f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.5f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(progress), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * AlphaFunctions::EaseIn(0.75f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
END_TEST;
}
-int UtcDaliAnimationRotateToQuaternionAlphaFloat2(void)
+int UtcDaliAnimationAnimateToPropertyOrientationQuaternionAlphaTimePeriod(void)
{
TestApplication application;
Radian targetRotationRadians(targetRotationDegrees);
float delay(0.1f);
Quaternion targetRotation(targetRotationRadians, Vector3::YAXIS);
- animation.RotateTo(actor, targetRotation/*Quaternion version*/, AlphaFunctions::EaseIn, delay, durationSeconds - delay);
+ animation.AnimateTo( Property( actor, Actor::Property::ORIENTATION ), targetRotation, AlphaFunctions::EaseIn, TimePeriod( delay, durationSeconds - delay ) );
// Start the animation
animation.Play();
END_TEST;
}
-int UtcDaliAnimationScaleBy(void)
+int UtcDaliAnimationAnimateByPropertyScale(void)
{
TestApplication application;
Animation animation = Animation::New(durationSeconds);
Vector3 targetScale(2.0f, 2.0f, 2.0f);
Vector3 relativeScale(targetScale - Vector3::ONE);
- animation.ScaleBy(actor, relativeScale.x, relativeScale.y, relativeScale.z);
+ animation.AnimateBy( Property( actor, Actor::Property::SCALE ), Vector3( relativeScale.x, relativeScale.y, relativeScale.z ) );
Vector3 ninetyNinePercentProgress(Vector3::ONE + relativeScale*0.99f);
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
- animation.ScaleBy(actor, relativeScale, AlphaFunctions::EaseIn);
+ animation.AnimateBy( Property( actor, Actor::Property::SCALE ), relativeScale, AlphaFunctions::EaseIn );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
// Repeat with a delay
float delay = 0.5f;
animation = Animation::New(durationSeconds);
- animation.ScaleBy(actor, relativeScale, AlphaFunctions::Linear, delay, durationSeconds - delay);
+ animation.AnimateBy( Property( actor, Actor::Property::SCALE ), relativeScale, AlphaFunctions::Linear, TimePeriod( delay, durationSeconds - delay ) );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
END_TEST;
}
-int UtcDaliAnimationScaleTo(void)
+int UtcDaliAnimationAnimateToPropertyScale(void)
{
TestApplication application;
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetScale(2.0f, 2.0f, 2.0f);
- animation.ScaleTo(actor, targetScale.x, targetScale.y, targetScale.z);
+ animation.AnimateTo( Property( actor, Actor::Property::SCALE ), targetScale );
Vector3 ninetyNinePercentProgress(Vector3::ONE + (targetScale - Vector3::ONE)*0.99f);
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
- animation.ScaleTo(actor, targetScale, AlphaFunctions::EaseIn);
+ animation.AnimateTo( Property( actor, Actor::Property::SCALE ), targetScale, AlphaFunctions::EaseIn );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
// Repeat with a delay
float delay = 0.5f;
animation = Animation::New(durationSeconds);
- animation.ScaleTo(actor, targetScale, AlphaFunctions::Linear, delay, durationSeconds - delay);
+ animation.AnimateTo( Property( actor, Actor::Property::SCALE ), targetScale, AlphaFunctions::Linear, TimePeriod( delay, durationSeconds - delay ) );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
END_TEST;
}
-int UtcDaliAnimationOpacityTo(void)
+int UtcDaliAnimationAnimateToPropertyColorAlpha(void)
{
TestApplication application;
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
float targetOpacity(0.0f);
- animation.OpacityTo(actor, targetOpacity);
+ animation.AnimateTo( Property( actor, Actor::Property::COLOR_ALPHA ), targetOpacity );
float ninetyNinePercentProgress(0.01f);
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
- animation.OpacityTo(actor, targetOpacity, AlphaFunctions::EaseIn);
+ animation.AnimateTo(Property( actor, Actor::Property::COLOR_ALPHA ), targetOpacity, AlphaFunctions::EaseIn );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
// Repeat with a delay
float delay = 0.5f;
animation = Animation::New(durationSeconds);
- animation.OpacityTo(actor, targetOpacity, AlphaFunctions::Linear, delay, durationSeconds - delay);
+ animation.AnimateTo( Property( actor, Actor::Property::COLOR_ALPHA ), targetOpacity, AlphaFunctions::Linear, TimePeriod( delay, durationSeconds - delay ) );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
END_TEST;
}
-int UtcDaliAnimationColorTo(void)
+int UtcDaliAnimationAnimateToPropertyColor(void)
{
TestApplication application;
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector4 targetColor(Color::RED);
- animation.ColorTo(actor, targetColor);
+ animation.AnimateTo( Property( actor, Actor::Property::COLOR ), targetColor );
Vector4 tenPercentProgress(Vector4(1.0f, 0.9f, 0.9f, 1.0f));
Vector4 twentyPercentProgress(Vector4(1.0f, 0.8f, 0.8f, 1.0f));
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
- animation.ColorTo(actor, targetColor, AlphaFunctions::EaseIn);
+ animation.AnimateTo( Property( actor, Actor::Property::COLOR ), targetColor, AlphaFunctions::EaseIn );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
// Repeat with a shorter animator duration
float animatorDuration = 0.5f;
animation = Animation::New(durationSeconds);
- animation.ColorTo(actor, targetColor, AlphaFunctions::Linear, 0, animatorDuration);
+ animation.AnimateTo( Property( actor, Actor::Property::COLOR ), targetColor, AlphaFunctions::Linear, TimePeriod( 0, animatorDuration ) );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
END_TEST;
}
-int UtcDaliAnimationResize(void)
+int UtcDaliAnimationAnimateToPropertySize(void)
{
TestApplication application;
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetSize(100.0f, 100.0f, 100.0f);
- animation.Resize(actor, targetSize);
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE ), targetSize);
Vector3 ninetyNinePercentProgress(targetSize * 0.99f);
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
- animation.Resize(actor, targetSize, AlphaFunctions::EaseIn);
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE ), targetSize, AlphaFunctions::EaseIn );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
// Repeat with a delay
float delay = 0.5f;
animation = Animation::New(durationSeconds);
- animation.Resize(actor, targetSize, AlphaFunctions::Linear, delay, durationSeconds - delay);
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE ), targetSize, AlphaFunctions::Linear, TimePeriod( delay, durationSeconds - delay ) );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
END_TEST;
}
-int UtcDaliAnimationResizeByXY(void)
+int UtcDaliAnimationAnimateToPropertySizeByXY(void)
{
TestApplication application;
float durationSeconds(1.0f);
Animation animation = Animation::New(durationSeconds);
Vector3 targetSize(100.0f, 100.0f, 100.0f);
- animation.Resize(actor, targetSize);
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE ), targetSize );
Vector3 ninetyNinePercentProgress(targetSize * 0.99f);
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
- animation.Resize(actor, targetSize.x, targetSize.y, AlphaFunctions::EaseIn);
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE_WIDTH ), targetSize.x, AlphaFunctions::EaseIn );
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE_HEIGHT ), targetSize.y, AlphaFunctions::EaseIn );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
Vector3 current(actor.GetCurrentSize());
DALI_TEST_CHECK( current.x > 0.0f );
DALI_TEST_CHECK( current.y > 0.0f );
- DALI_TEST_CHECK( current.z > 0.0f );
DALI_TEST_CHECK( current.x < ninetyNinePercentProgress.x );
DALI_TEST_CHECK( current.y < ninetyNinePercentProgress.y );
- DALI_TEST_CHECK( current.z < ninetyNinePercentProgress.z );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentSize().x, targetSize.x, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentSize().y, targetSize.y, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
// Repeat with a delay
float delay = 0.5f;
animation = Animation::New(durationSeconds);
- animation.Resize(actor, targetSize.x, targetSize.y, AlphaFunctions::Linear, delay, durationSeconds - delay);
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE_WIDTH ), targetSize.x, AlphaFunctions::Linear, TimePeriod( delay, durationSeconds - delay ) );
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE_HEIGHT ), targetSize.y, AlphaFunctions::Linear, TimePeriod( delay, durationSeconds - delay ) );
animation.FinishedSignal().Connect(&application, finishCheck);
animation.Play();
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentSize().x, targetSize.x, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentSize().y, targetSize.y, TEST_LOCATION );
END_TEST;
}
-
int UtcDaliAnimationAnimateBetweenActorColorTimePeriod(void)
{
TestApplication application;
}
}
-void Animation::MoveBy(Actor& actor, float x, float y, float z)
-{
- MoveBy(actor, Vector3(x, y, z), mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::MoveBy(Actor& actor, const Vector3& displacement, AlphaFunction alpha)
-{
- MoveBy(actor, displacement, alpha, 0.0f, GetDuration());
-}
-
-void Animation::MoveBy(Actor& actor, const Vector3& displacement, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
- Dali::Actor::Property::POSITION,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateByVector3(displacement),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::MoveTo(Actor& actor, float x, float y, float z)
-{
- MoveTo(actor, Vector3(x, y, z), mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::MoveTo(Actor& actor, const Vector3& position, AlphaFunction alpha)
-{
- MoveTo(actor, position, alpha, 0.0f, GetDuration());
-}
-
-void Animation::MoveTo(Actor& actor, const Vector3& position, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
- Dali::Actor::Property::POSITION,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateToVector3(position),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::RotateBy(Actor& actor, Radian angle, const Vector3& axis)
-{
- RotateBy(actor, angle, axis, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::RotateBy(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha)
-{
- RotateBy(actor, angle, axis, alpha, 0.0f, GetDuration());
-}
-
-void Animation::RotateBy(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Quaternion>::New( actor,
- Dali::Actor::Property::ORIENTATION,
- Property::INVALID_COMPONENT_INDEX,
- new RotateByAngleAxis(angle, axis),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::RotateTo(Actor& actor, Radian angle, const Vector3& axis)
-{
- Vector4 normalizedAxis(axis.x, axis.y, axis.z, 0.0f);
- normalizedAxis.Normalize();
-
- Quaternion orientation(Quaternion::FromAxisAngle(normalizedAxis, angle));
-
- RotateTo(actor, orientation, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::RotateTo(Actor& actor, const Quaternion& orientation)
-{
- RotateTo(actor, orientation, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::RotateTo(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha)
-{
- Vector4 normalizedAxis(axis.x, axis.y, axis.z, 0.0f);
- normalizedAxis.Normalize();
-
- Quaternion orientation(Quaternion::FromAxisAngle(normalizedAxis, angle));
-
- RotateTo(actor, orientation, alpha, 0.0f, GetDuration());
-}
-
-void Animation::RotateTo(Actor& actor, const Quaternion& orientation, AlphaFunction alpha)
-{
- RotateTo(actor, orientation, alpha, 0.0f, GetDuration());
-}
-
-void Animation::RotateTo(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- Vector4 normalizedAxis(axis.x, axis.y, axis.z, 0.0f);
- normalizedAxis.Normalize();
-
- Quaternion orientation(Quaternion::FromAxisAngle(normalizedAxis, angle));
-
- RotateTo(actor, orientation, alpha, delaySeconds, durationSeconds);
-}
-
-void Animation::RotateTo(Actor& actor, const Quaternion& rotation, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Quaternion>::New( actor,
- Dali::Actor::Property::ORIENTATION,
- Property::INVALID_COMPONENT_INDEX,
- new RotateToQuaternion(rotation),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::ScaleBy(Actor& actor, float x, float y, float z)
-{
- ScaleBy(actor, Vector3(x, y, z), mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::ScaleBy(Actor& actor, const Vector3& scale, AlphaFunction alpha)
-{
- ScaleBy(actor, scale, alpha, 0.0f, GetDuration());
-}
-
-void Animation::ScaleBy(Actor& actor, const Vector3& scale, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
- Dali::Actor::Property::SCALE,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateByVector3(scale),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::ScaleTo(Actor& actor, float x, float y, float z)
-{
- ScaleTo(actor, Vector3(x, y, z), mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha)
-{
- ScaleTo(actor, scale, alpha, 0.0f, GetDuration());
-}
-
-void Animation::ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
- Dali::Actor::Property::SCALE,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateToVector3(scale),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
void Animation::Show(Actor& actor, float delaySeconds)
{
ExtendDuration( TimePeriod(delaySeconds, 0) );
TimePeriod(delaySeconds, 0.0f/*immediate*/) ) );
}
-void Animation::OpacityBy(Actor& actor, float opacity)
-{
- OpacityBy(actor, opacity, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::OpacityBy(Actor& actor, float opacity, AlphaFunction alpha)
-{
- OpacityBy(actor, opacity, alpha, 0.0f, GetDuration());
-}
-
-void Animation::OpacityBy(Actor& actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Vector4>::New( actor,
- Dali::Actor::Property::COLOR,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateByOpacity(opacity),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::OpacityTo(Actor& actor, float opacity)
-{
- OpacityTo(actor, opacity, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::OpacityTo(Actor& actor, float opacity, AlphaFunction alpha)
-{
- OpacityTo(actor, opacity, alpha, 0.0f, GetDuration());
-}
-
-void Animation::OpacityTo(Actor& actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Vector4>::New( actor,
- Dali::Actor::Property::COLOR,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateToOpacity(opacity),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::ColorBy(Actor& actor, const Vector4& color)
-{
- ColorBy(actor, color, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::ColorBy(Actor& actor, const Vector4& color, AlphaFunction alpha)
-{
- ColorBy(actor, color, alpha, 0.0f, GetDuration());
-}
-
-void Animation::ColorBy(Actor& actor, const Vector4& color, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Vector4>::New( actor,
- Dali::Actor::Property::COLOR,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateByVector4(color),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::ColorTo(Actor& actor, const Vector4& color)
-{
- ColorTo(actor, color, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::ColorTo(Actor& actor, const Vector4& color, AlphaFunction alpha)
-{
- ColorTo(actor, color, alpha, 0.0f, GetDuration());
-}
-
-void Animation::ColorTo(Actor& actor, const Vector4& color, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- AddAnimatorConnector( AnimatorConnector<Vector4>::New( actor,
- Dali::Actor::Property::COLOR,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateToVector4(color),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::Resize(Actor& actor, float width, float height)
-{
- Resize(actor, width, height, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::Resize(Actor& actor, float width, float height, AlphaFunction alpha)
-{
- Resize(actor, width, height, alpha, 0.0f, GetDuration());
-}
-
-void Animation::Resize(Actor& actor, float width, float height, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- Vector3 targetSize( width, height, std::min(width, height) );
-
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- // Notify the actor impl that its size is being animated
- actor.NotifySizeAnimation( *this, targetSize );
-
- AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
- Dali::Actor::Property::SIZE,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateToVector3(targetSize),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::Resize(Actor& actor, const Vector3& size)
-{
- Resize(actor, size, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::Resize(Actor& actor, const Vector3& size, AlphaFunction alpha)
-{
- Resize(actor, size, alpha, 0.0f, GetDuration());
-}
-
-void Animation::Resize(Actor& actor, const Vector3& size, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
- ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
-
- // Notify the actor impl that its size is being animated
- actor.NotifySizeAnimation( *this, size );
-
- AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
- Dali::Actor::Property::SIZE,
- Property::INVALID_COMPONENT_INDEX,
- new AnimateToVector3(size),
- alpha,
- TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
bool Animation::DoAction( BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes )
{
bool done = false;
{
class Actor;
-struct Degree;
-class Quaternion;
-struct Radian;
-class ShaderEffect;
struct Property;
struct Vector2;
struct Vector3;
-struct Vector4;
namespace Internal DALI_INTERNAL
{
* // ...To play the animation
*
* mAnimation = Animation::New(3.0f); // duration 3 seconds
- * mAnimation.MoveTo(mActor, 10.0f, 50.0f, 0.0f);
+ * mAnimation.AnimateTo(Property(mActor, Actor::Property::POSITION), Vector3(10.0f, 50.0f, 0.0f));
* mAnimation.Play();
*
* @endcode
* void ExampleAnimation( Actor actor )
* {
* Animation animation = Animation::New(2.0f); // duration 2 seconds
- * animation.MoveTo(actor, 10.0f, 50.0f, 0.0f);
+ * animation.AnimateTo(Property(actor, Actor::Property::POSITION), 10.0f, 50.0f, 0.0f);
* animation.FinishedSignal().Connect( ExampleCallback );
* animation.Play();
* } // At this point the animation handle has gone out of scope
*/
void Animate( Actor actor, Path path, const Vector3& forward, AlphaFunction alpha, TimePeriod period);
- /**
- * @brief Move an actor relative to its position.
- *
- * The default alpha function will be used.
- * The move will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] x axis displacement.
- * @param [in] y axis displacement.
- * @param [in] z axis displacement.
- */
- void MoveBy(Actor actor, float x, float y, float z);
-
- /**
- * @brief Move an actor relative to its position.
- *
- * This overload allows the alpha function to be customized.
- * The move will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] displacement relative to current position.
- * @param [in] alpha The alpha function to apply.
- */
- void MoveBy(Actor actor, Vector3 displacement, AlphaFunction alpha);
-
- /**
- * @brief Move an actor relative to its position.
- *
- * This overload allows the translation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] displacement relative to current position.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the translation.
- */
- void MoveBy(Actor actor, Vector3 displacement, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Move an actor to a target position.
- *
- * The default alpha function will be used.
- * The move will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] x axis position.
- * @param [in] y axis position.
- * @param [in] z axis position.
- */
- void MoveTo(Actor actor, float x, float y, float z);
-
- /**
- * @brief Move an actor to a target position.
- *
- * This overload allows the alpha function to be customized.
- * The move will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] position to move to
- * @param [in] alpha The alpha function to apply.
- */
- void MoveTo(Actor actor, Vector3 position, AlphaFunction alpha);
-
- /**
- * @brief Move an actor to a target position.
- *
- * This overload allows the translation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] position to move to
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the translation.
- */
- void MoveTo(Actor actor, Vector3 position, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Rotate an actor around an arbitrary axis.
- *
- * The default alpha function will be used.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] angle The angle in degrees.
- * @param [in] axis The axis to rotate around
- */
- void RotateBy(Actor actor, Degree angle, Vector3 axis);
-
- /**
- * @brief Rotate an actor around an arbitrary axis.
- *
- * The default alpha function will be used.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] angle The angle in radians.
- * @param [in] axis The axis to rotate around
- */
- void RotateBy(Actor actor, Radian angle, Vector3 axis);
-
- /**
- * @brief Rotate an actor around an arbitrary axis.
- *
- * This overload allows the alpha function to be customized.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] angle The angle in radians.
- * @param [in] axis The axis to rotate around.
- * @param [in] alpha The alpha function to apply.
- */
- void RotateBy(Actor actor, Degree angle, Vector3 axis, AlphaFunction alpha);
-
- /**
- * @brief Rotate an actor around an arbitrary axis.
- *
- * This overload allows the alpha function to be customized.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] angle The angle in radians.
- * @param [in] axis The axis to rotate around.
- * @param [in] alpha The alpha function to apply.
- */
- void RotateBy(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha);
-
- /**
- * @brief Rotate an actor around an arbitrary axis.
- *
- * This overload allows the rotation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] angle The angle in degrees.
- * @param [in] axis The axis to rotate around
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the rotation.
- */
- void RotateBy(Actor actor, Degree angle, Vector3 axis, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Rotate an actor around an arbitrary axis.
- *
- * This overload allows the rotation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] angle The angle in radians.
- * @param [in] axis The axis to rotate around
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the rotation.
- */
- void RotateBy(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * The default alpha function will be used.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] angle The target rotation angle in degrees.
- * @param [in] axis The target axis of rotation.
- */
- void RotateTo(Actor actor, Degree angle, Vector3 axis);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * The default alpha function will be used.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] angle The target rotation angle in radians.
- * @param [in] axis The target axis of rotation.
- */
- void RotateTo(Actor actor, Radian angle, Vector3 axis);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * The default alpha function will be used.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] orientation The target orientation.
- */
- void RotateTo(Actor actor, Quaternion orientation);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * This overload allows the alpha function to be customized.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] angle The target rotation angle in degrees.
- * @param [in] axis The target axis of rotation.
- * @param [in] alpha The alpha function to apply.
- */
- void RotateTo(Actor actor, Degree angle, Vector3 axis, AlphaFunction alpha);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * This overload allows the alpha function to be customized.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] angle The target rotation angle in radians.
- * @param [in] axis The target axis of rotation.
- * @param [in] alpha The alpha function to apply.
- */
- void RotateTo(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * This overload allows the alpha function to be customized.
- * The rotation will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] orientation The target orientation.
- * @param [in] alpha The alpha function to apply.
- */
- void RotateTo(Actor actor, Quaternion orientation, AlphaFunction alpha);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * This overload allows the rotation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] angle The target rotation angle in degrees.
- * @param [in] axis The target axis of rotation.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the rotation.
- */
- void RotateTo(Actor actor, Degree angle, Vector3 axis, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * This overload allows the rotation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] angle The target rotation angle in radians.
- * @param [in] axis The target axis of rotation.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the rotation.
- */
- void RotateTo(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Rotate an actor to a target orientation.
- *
- * This overload allows the rotation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] orientation The target orientation.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the rotation.
- */
- void RotateTo(Actor actor, Quaternion orientation, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Scale an actor.
- *
- * The default alpha function will be used.
- * The scaling will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] x Scale factor in the X-direction.
- * @param [in] y Scale factor in the Y-direction.
- * @param [in] z Scale factor in the Z-direction.
- */
- void ScaleBy(Actor actor, float x, float y, float z);
-
- /**
- * @brief Scale an actor.
- *
- * This overload allows the alpha function to be customized.
- * The scaling will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] scale The scale factor.
- * @param [in] alpha The alpha function to apply.
- */
- void ScaleBy(Actor actor, Vector3 scale, AlphaFunction alpha);
-
- /**
- * @brief Scale an actor.
- *
- * This overload allows the scaling start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] scale The scale factor.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the scaling.
- */
- void ScaleBy(Actor actor, Vector3 scale, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Scale an actor to a target scale factor.
- *
- * The default alpha function will be used.
- * The scaling will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] x Target scale-factor in the X-direction.
- * @param [in] y Target scale-factor in the Y-direction.
- * @param [in] z Target scale-factor in the Z-direction.
- */
- void ScaleTo(Actor actor, float x, float y, float z);
-
- /**
- * @brief Scale an actor to a target scale factor.
- *
- * This overload allows the alpha function to be customized.
- * The scaling will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] scale The target scale factor.
- * @param [in] alpha The alpha function to apply.
- */
- void ScaleTo(Actor actor, Vector3 scale, AlphaFunction alpha);
-
- /**
- * @brief Scale an actor to a target scale factor.
- *
- * This overload allows the scaling start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] scale The target scale factor.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the scaling.
- */
- void ScaleTo(Actor actor, Vector3 scale, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
/**
* @brief Show an actor during the animation.
*
*/
void Hide(Actor actor, float delaySeconds);
- /**
- * @brief Animate the opacity of an actor.
- *
- * The default alpha function will be used.
- * The effect will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] opacity The relative change in opacity.
- */
- void OpacityBy(Actor actor, float opacity);
-
- /**
- * @brief Animate the opacity of an actor.
- *
- * This overload allows the alpha function to be customized.
- * The effect will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] opacity The relative change in opacity.
- * @param [in] alpha The alpha function to apply.
- */
- void OpacityBy(Actor actor, float opacity, AlphaFunction alpha);
-
- /**
- * @brief Animate the opacity of an actor.
- *
- * This overload allows the animation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] opacity The relative change in opacity.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the opacity animation.
- */
- void OpacityBy(Actor actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Animate an actor to a target opacity.
- *
- * The default alpha function will be used.
- * The effect will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] opacity The target opacity.
- */
- void OpacityTo(Actor actor, float opacity);
-
- /**
- * @brief Animate an actor to a target opacity.
- *
- * This overload allows the alpha function to be customized.
- * The effect will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] opacity The target opacity.
- * @param [in] alpha The alpha function to apply.
- */
- void OpacityTo(Actor actor, float opacity, AlphaFunction alpha);
-
- /**
- * @brief Animate an actor to a target opacity.
- *
- * This overload allows the animation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] opacity The target opacity.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the opacity animation.
- */
- void OpacityTo(Actor actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Animate the color of an actor.
- *
- * The default alpha function will be used.
- * The effect will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] color The relative change in color.
- */
- void ColorBy(Actor actor, Vector4 color);
-
- /**
- * @brief Animate the color of an actor.
- *
- * This overload allows the alpha function to be customized.
- * The effect will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] color The relative change in color.
- * @param [in] alpha The alpha function to apply.
- */
- void ColorBy(Actor actor, Vector4 color, AlphaFunction alpha);
-
- /**
- * @brief Animate the color of an actor.
- *
- * This overload allows the animation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] color The relative change in color.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the color animation.
- */
- void ColorBy(Actor actor, Vector4 color, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Animate an actor to a target color.
- *
- * The default alpha function will be used.
- * The effect will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] color The target color.
- */
- void ColorTo(Actor actor, Vector4 color);
-
- /**
- * @brief Animate an actor to a target color.
- *
- * This overload allows the alpha function to be customized.
- * The effect will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] color The target color.
- * @param [in] alpha The alpha function to apply.
- */
- void ColorTo(Actor actor, Vector4 color, AlphaFunction alpha);
-
- /**
- * @brief Animate an actor to a target color.
- *
- * This overload allows the animation start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] color The target color.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the color animation.
- */
- void ColorTo(Actor actor, Vector4 color, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Resize an actor.
- *
- * The default alpha function will be used.
- * The resizing will start & end when the animation begins & ends.
- * The depth defaults to the minimum of width & height.
- * @param [in] actor The actor to animate.
- * @param [in] width The target width.
- * @param [in] height The target height.
- */
- void Resize(Actor actor, float width, float height);
-
- /**
- * @brief Resize an actor.
- *
- * This overload allows the alpha function to be customized.
- * The resizing will start & end when the animation begins & ends.
- * The depth defaults to the minimum of width & height.
- * @param [in] actor The actor to animate.
- * @param [in] width The target width.
- * @param [in] height The target height.
- * @param [in] alpha The alpha function to apply.
- */
- void Resize(Actor actor, float width, float height, AlphaFunction alpha);
-
- /**
- * @brief Resize an actor.
- *
- * This overload allows the resizing start & end time to be customized.
- * The depth defaults to the minimum of width & height.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] width The target width.
- * @param [in] height The target height.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the resizing.
- */
- void Resize(Actor actor, float width, float height, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
- /**
- * @brief Resize an actor.
- *
- * The default alpha function will be used.
- * The resizing will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] size The target size.
- */
- void Resize(Actor actor, Vector3 size);
-
- /**
- * @brief Resize an actor.
- *
- * This overload allows the alpha function to be customized.
- * The resizing will start & end when the animation begins & ends.
- * @param [in] actor The actor to animate.
- * @param [in] size The target size.
- * @param [in] alpha The alpha function to apply.
- */
- void Resize(Actor actor, Vector3 size, AlphaFunction alpha);
-
- /**
- * @brief Resize an actor.
- *
- * This overload allows the resizing start & end time to be customized.
- * @pre delaySeconds must be zero or greater.
- * @pre durationSeconds must be zero or greater; zero is useful when animating boolean values.
- * @param [in] actor The actor to animate.
- * @param [in] size The target size.
- * @param [in] alpha The alpha function to apply.
- * @param [in] delaySeconds The initial delay from the start of the animation.
- * @param [in] durationSeconds The duration of the resizing.
- */
- void Resize(Actor actor, Vector3 size, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
public: // Not intended for use by Application developers
/**