From: Kimmo Hoikka Date: Tue, 4 Nov 2014 14:59:00 +0000 (+0000) Subject: Remove boost from animation public API X-Git-Tag: dali_1.0.17~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F29%2F29929%2F5;p=platform%2Fcore%2Fuifw%2Fdali-core.git Remove boost from animation public API [Problem] [Cause] [Solution] Change-Id: I3a8e00d55da652a9439ba5180c8b971f584a0d04 --- diff --git a/automated-tests/src/dali/utc-Dali-Animation.cpp b/automated-tests/src/dali/utc-Dali-Animation.cpp index ad84012..8304b60 100644 --- a/automated-tests/src/dali/utc-Dali-Animation.cpp +++ b/automated-tests/src/dali/utc-Dali-Animation.cpp @@ -88,132 +88,6 @@ struct AnimationFinishCheck bool& mSignalReceived; // owned by individual tests }; -static bool ReturnFalseAfterProgressOne( float alpha, const bool& current ) -{ - return alpha < 1.0f; -} - -struct AnimateFloatTestFunctor -{ - AnimateFloatTestFunctor( float start, float end ) - : mStart( start ), - mEnd( end ) - { - } - - float operator()( float alpha, const float& current ) - { - return mStart + ((mEnd - mStart) * alpha ); - } - - float mStart; - float mEnd; -}; - -struct AnimateIntegerTestFunctor -{ - AnimateIntegerTestFunctor( int start, int end ) - : mStart( start ), - mEnd( end ) - { - } - - int operator()( float alpha, const int& current ) - { - return static_cast( mStart + ((mEnd - mStart) * alpha ) + 0.5f ); - } - - int mStart; - int mEnd; -}; - -struct AnimateVector2TestFunctor -{ - AnimateVector2TestFunctor( Vector2 start, Vector2 end ) - : mStart( start ), - mEnd( end ) - { - } - - Vector2 operator()( float alpha, const Vector2& current ) - { - return mStart + ((mEnd - mStart) * alpha ); - } - - Vector2 mStart; - Vector2 mEnd; -}; - -struct AnimateVector4TestFunctor -{ - AnimateVector4TestFunctor( Vector4 start, Vector4 end ) - : mStart( start ), - mEnd( end ) - { - } - - Vector4 operator()( float alpha, const Vector4& current ) - { - return mStart + ((mEnd - mStart) * alpha ); - } - - Vector4 mStart; - Vector4 mEnd; -}; - -struct AnimateQuaternionTestFunctor -{ - AnimateQuaternionTestFunctor( Quaternion start, Quaternion end ) - : mStart( start ), - mEnd( end ) - { - } - - Quaternion operator()( float alpha, const Quaternion& current ) - { - return Quaternion::Slerp(mStart, mEnd, alpha); - } - - Quaternion mStart; - Quaternion mEnd; -}; - -struct BounceFunc -{ - BounceFunc(float x, float y, float z) - : mDistance(Vector3(x, y, z)) - { - } - Vector3 operator()(float alpha, const Vector3& current) - { - if (alpha>0.001f && alpha<1.0f) - { - const float flip = 0.5f - cosf(alpha * Math::PI * 2.0f) * 0.5f; - Vector3 newTranslation(current); - newTranslation += mDistance * flip; - return newTranslation; - } - return current; - } - Vector3 mDistance; -}; - - -struct TumbleFunc -{ - TumbleFunc(Vector3 axis) : tumbleAxis(axis){} - Quaternion operator()(float alpha, const Quaternion& current) - { - if (alpha>0.001f && alpha<1.0f) - { - Quaternion tumbleRotation(alpha * Math::PI * 2.0f, tumbleAxis); - return tumbleRotation * current; - } - return current; - } - Vector3 tumbleAxis; -}; - } // anon namespace int UtcDaliAnimationNew01(void) @@ -7228,63 +7102,6 @@ int UtcDaliAnimationMoveToVector3AlphaFloat2(void) END_TEST; } -int UtcDaliAnimationMove(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - Vector3 initialPosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); - Stage::GetCurrent().Add(actor); - - // Build the animation - float durationSeconds(10.0f); - Animation animation = Animation::New(durationSeconds); - Vector3 targetPosition(200.0f, 200.0f, 200.0f); - BounceFunc func(0.0f, 0.0f, -100.0f); - animation.Move(actor, func, AlphaFunctions::Linear, 0.0f, durationSeconds); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.25f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.5f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.75f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(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(), initialPosition, TEST_LOCATION ); - END_TEST; -} - int UtcDaliAnimationRotateByDegreeVector3(void) { TestApplication application; @@ -8164,63 +7981,6 @@ int UtcDaliAnimationRotateToQuaternionAlphaFloat2(void) END_TEST; } -int UtcDaliAnimationRotate(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - Quaternion initialRotation(0.0f, Vector3::YAXIS); - actor.SetRotation(initialRotation); - Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), initialRotation, ROTATION_EPSILON, TEST_LOCATION ); - - // Build the animation - float durationSeconds(1.0f); - Animation animation = Animation::New(durationSeconds); - TumbleFunc func(Vector3::YAXIS); - animation.Rotate(actor, func, AlphaFunctions::Linear, 0.0f, durationSeconds); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), func(0.25f, initialRotation), ROTATION_EPSILON, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), func(0.5f, initialRotation), ROTATION_EPSILON, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), func(0.75f, initialRotation), ROTATION_EPSILON, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); - - // We did expect the animation to finish - application.SendNotification(); - finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), func(1.0f, initialRotation), ROTATION_EPSILON, TEST_LOCATION ); - END_TEST; -} - int UtcDaliAnimationScaleBy(void) { TestApplication application; @@ -9138,74 +8898,54 @@ int UtcDaliAnimationResize(void) END_TEST; } -int UtcDaliAnimationAnimateBool(void) +int UtcDaliKeyFramesCreateDestroy(void) { - TestApplication application; - - Actor actor = Actor::New(); - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); - Stage::GetCurrent().Add(actor); - - // Build the animation - float durationSeconds(10.0f); - Animation animation = Animation::New(durationSeconds); - animation.Animate( Property(actor, Actor::VISIBLE), ReturnFalseAfterProgressOne, TimePeriod(durationSeconds*0.25f/*delay*/, durationSeconds*0.1f) ); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); + tet_infoline("Testing Dali::Animation::UtcDaliKeyFramesCreateDestroy()"); - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); + KeyFrames* keyFrames = new KeyFrames; + delete keyFrames; + DALI_TEST_CHECK( true ); + END_TEST; +} - // Should still be visible - DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION ); +int UtcDaliKeyFramesDownCast(void) +{ + TestApplication application; + tet_infoline("Testing Dali::Animation::KeyFramesDownCast()"); - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); + KeyFrames keyFrames = KeyFrames::New(); + BaseHandle object(keyFrames); - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); + KeyFrames keyFrames2 = KeyFrames::DownCast(object); + DALI_TEST_CHECK(keyFrames2); - // Now animate functor should have hidden the actor - DALI_TEST_EQUALS( actor.IsVisible(), false, TEST_LOCATION ); + KeyFrames keyFrames3 = DownCast< KeyFrames >(object); + DALI_TEST_CHECK(keyFrames3); - application.SendNotification(); - application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); + BaseHandle unInitializedObject; + KeyFrames keyFrames4 = KeyFrames::DownCast(unInitializedObject); + DALI_TEST_CHECK(!keyFrames4); - // We did expect the animation to finish - application.SendNotification(); - finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.IsVisible(), false, TEST_LOCATION ); + KeyFrames keyFrames5 = DownCast< KeyFrames >(unInitializedObject); + DALI_TEST_CHECK(!keyFrames5); END_TEST; } -int UtcDaliAnimationAnimateFloat(void) +int UtcDaliAnimationResizeByXY(void) { TestApplication application; Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); - - // Register a float property - float startValue(10.0f); - Property::Index index = actor.RegisterProperty( "test-property", startValue ); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); // Build the animation - float durationSeconds(10.0f); + float durationSeconds(1.0f); Animation animation = Animation::New(durationSeconds); - float targetPosition(0.0f); - AnimateFloatTestFunctor func( 100, targetPosition ); - animation.Animate( Property(actor, index), func ); + Vector3 targetSize(100.0f, 100.0f, 100.0f); + animation.Resize(actor, targetSize); + + Vector3 ninetyNinePercentProgress(targetSize * 0.99f); // Start the animation animation.Play(); @@ -9215,425 +8955,33 @@ int UtcDaliAnimationAnimateFloat(void) animation.FinishedSignal().Connect(&application, finishCheck); application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); + application.Render(static_cast(durationSeconds*990.0f)/* 99% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), 75.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentSize(), ninetyNinePercentProgress, TEST_LOCATION ); application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); + application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); - // We didn't expect the animation to finish yet + // We did expect the animation to finish application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), 50.0f, TEST_LOCATION ); + finishCheck.CheckSignalReceived(); + DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION ); + // Reset everything + finishCheck.Reset(); + actor.SetSize(Vector3::ZERO); application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); + application.Render(0); + DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), 25.0f, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); - - // We did expect the animation to finish - application.SendNotification(); - finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetPosition, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliAnimationAnimateInteger(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - Stage::GetCurrent().Add(actor); - - // Register an integer property - int startValue(10); - Property::Index index = actor.RegisterProperty( "test-property", startValue ); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); - - // Build the animation - float durationSeconds(10.0f); - Animation animation = Animation::New(durationSeconds); - int targetPosition(0); - AnimateIntegerTestFunctor func( 100, targetPosition ); - animation.Animate( Property(actor, index), func ); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), 75, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), 50, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), 25, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); - - // We did expect the animation to finish - application.SendNotification(); - finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetPosition, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliAnimationAnimateVector2(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - Stage::GetCurrent().Add(actor); - - // Register a Vector2 property - Vector2 startValue(10.0f, 10.0f); - Property::Index index = actor.RegisterProperty( "test-property", startValue ); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); - - // Build the animation - float durationSeconds(10.0f); - Animation animation = Animation::New(durationSeconds); - Vector2 targetPosition(0.0f, 0.0f); - AnimateVector2TestFunctor func( Vector2(100,100), targetPosition ); - animation.Animate( Property(actor, index), func ); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), Vector2(75,75), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), Vector2(50,50), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), Vector2(25,25), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); - - // We did expect the animation to finish - application.SendNotification(); - finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetPosition, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliAnimationAnimateVector3(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - Vector3 initialPosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); - Stage::GetCurrent().Add(actor); - - // Build the animation - float durationSeconds(10.0f); - Animation animation = Animation::New(durationSeconds); - Vector3 targetPosition(200.0f, 200.0f, 200.0f); - BounceFunc func(0.0f, 0.0f, -100.0f); - animation.Animate( Property(actor, Actor::POSITION), func, AlphaFunctions::Linear, durationSeconds ); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.25f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.5f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.75f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(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(), initialPosition, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliAnimationAnimateVector4(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - Stage::GetCurrent().Add(actor); - - // Register a Vector4 property - Vector4 startValue(10.0f, 10.0f, 10.0f, 10.0f); - Property::Index index = actor.RegisterProperty( "test-property", startValue ); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); - - // Build the animation - float durationSeconds(10.0f); - Animation animation = Animation::New(durationSeconds); - Vector4 targetPosition(200,400,0,-1000); - AnimateVector4TestFunctor func( Vector4(1000,1000,1000,1000), targetPosition ); - animation.Animate( Property(actor, index), func ); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), Vector4(800,850,750,500), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), Vector4(600,700,500,0), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), Vector4(400,550,250,-500), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); - - // We did expect the animation to finish - application.SendNotification(); - finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetPosition, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliAnimationAnimateQuaternion(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - actor.SetRotation(Quaternion(0.0f, Vector3::YAXIS)); - Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(0.0f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - - // Build the animation - float durationSeconds(1.0f); - Animation animation = Animation::New(durationSeconds); - - Degree sourceRotationDegrees(90.0f); - Radian sourceRotationRadians(sourceRotationDegrees); - Quaternion sourceRotation(sourceRotationRadians, Vector3::YAXIS); - - Degree targetRotationDegrees(150.0f); - Radian targetRotationRadians(targetRotationDegrees); - Quaternion targetRotation(targetRotationRadians, Vector3::YAXIS); - - AnimateQuaternionTestFunctor func( sourceRotation, targetRotation ); - animation.Animate( Property(actor, Actor::ROTATION), func ); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(Radian(Degree(105)), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(Radian(Degree(120)), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), Quaternion(Radian(Degree(135)), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); - - // We did expect the animation to finish - application.SendNotification(); - finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentRotation(), targetRotation, ROTATION_EPSILON, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliKeyFramesCreateDestroy(void) -{ - tet_infoline("Testing Dali::Animation::UtcDaliKeyFramesCreateDestroy()"); - - KeyFrames* keyFrames = new KeyFrames; - delete keyFrames; - DALI_TEST_CHECK( true ); - END_TEST; -} - -int UtcDaliKeyFramesDownCast(void) -{ - TestApplication application; - tet_infoline("Testing Dali::Animation::KeyFramesDownCast()"); - - KeyFrames keyFrames = KeyFrames::New(); - BaseHandle object(keyFrames); - - KeyFrames keyFrames2 = KeyFrames::DownCast(object); - DALI_TEST_CHECK(keyFrames2); - - KeyFrames keyFrames3 = DownCast< KeyFrames >(object); - DALI_TEST_CHECK(keyFrames3); - - BaseHandle unInitializedObject; - KeyFrames keyFrames4 = KeyFrames::DownCast(unInitializedObject); - DALI_TEST_CHECK(!keyFrames4); - - KeyFrames keyFrames5 = DownCast< KeyFrames >(unInitializedObject); - DALI_TEST_CHECK(!keyFrames5); - END_TEST; -} - -int UtcDaliAnimationResizeByXY(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); - - // Build the animation - float durationSeconds(1.0f); - Animation animation = Animation::New(durationSeconds); - Vector3 targetSize(100.0f, 100.0f, 100.0f); - animation.Resize(actor, targetSize); - - Vector3 ninetyNinePercentProgress(targetSize * 0.99f); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*990.0f)/* 99% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentSize(), ninetyNinePercentProgress, TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(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 ); - - // Reset everything - finishCheck.Reset(); - actor.SetSize(Vector3::ZERO); - application.SendNotification(); - application.Render(0); - DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); - - // Repeat with a different (ease-in) alpha function - animation = Animation::New(durationSeconds); - animation.Resize(actor, targetSize.x, targetSize.y, AlphaFunctions::EaseIn); - animation.FinishedSignal().Connect(&application, finishCheck); - animation.Play(); + // Repeat with a different (ease-in) alpha function + animation = Animation::New(durationSeconds); + animation.Resize(actor, targetSize.x, targetSize.y, AlphaFunctions::EaseIn); + animation.FinishedSignal().Connect(&application, finishCheck); + animation.Play(); application.SendNotification(); application.Render(static_cast(durationSeconds*990.0f)/* 99% progress */); @@ -9917,63 +9265,6 @@ int UtcDaliAnimationAnimateBetweenActorColorFunctionTimePeriod(void) END_TEST; } -int UtcDaliAnimationAnimateVector3Func(void) -{ - TestApplication application; - - Actor actor = Actor::New(); - Vector3 initialPosition(Vector3::ZERO); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); - Stage::GetCurrent().Add(actor); - - // Build the animation - float durationSeconds(10.0f); - Animation animation = Animation::New(durationSeconds); - Vector3 targetPosition(200.0f, 200.0f, 200.0f); - BounceFunc func(0.0f, 0.0f, -100.0f); - animation.Animate( Property(actor, Actor::POSITION), func, AlphaFunctions::Linear ); - - // Start the animation - animation.Play(); - - bool signalReceived(false); - AnimationFinishCheck finishCheck(signalReceived); - animation.FinishedSignal().Connect(&application, finishCheck); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.25f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.5f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); - - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), func(0.75f, initialPosition), TEST_LOCATION ); - - application.SendNotification(); - application.Render(static_cast(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(), initialPosition, TEST_LOCATION ); - END_TEST; -} - int UtcDaliAnimationCreateDestroy(void) { TestApplication application; @@ -10019,8 +9310,7 @@ int UtcDaliAnimationUpdateManager(void) actor.ApplyConstraint( constraint ); // Apply animation to actor - BounceFunc func(0.0f, 0.0f, -100.0f); - animation.Animate( Property(actor, Actor::POSITION), func, AlphaFunctions::Linear ); + animation.AnimateTo( Property(actor, Actor::POSITION), Vector3( 100.f, 90.f, 80.f ), AlphaFunctions::Linear ); animation.Play(); diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h index e23cbd6..6f6a375 100644 --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -52,6 +52,7 @@ namespace Internal class Actor; class ActorGestureData; +class Animation; class RenderTask; struct DynamicsData; @@ -1041,13 +1042,13 @@ public: // For Animation * @param[in] animation The animation that resized the actor * @param[in] targetSize The new target size of the actor */ - void NotifySizeAnimation(Animation& animation, const Vector3& targetSize); + void NotifySizeAnimation( Animation& animation, const Vector3& targetSize); /** * For use in derived classes. * This should only be called by Animation, when the actor is resized using Animation::Resize(). */ - virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize) {} + virtual void OnSizeAnimation( Animation& animation, const Vector3& targetSize) {} protected: diff --git a/dali/internal/event/actors/custom-actor-internal.h b/dali/internal/event/actors/custom-actor-internal.h index d4ed7f7..23ce647 100644 --- a/dali/internal/event/actors/custom-actor-internal.h +++ b/dali/internal/event/actors/custom-actor-internal.h @@ -22,6 +22,7 @@ #include #include #include +#include namespace Dali { diff --git a/dali/internal/event/animation/animation-impl.cpp b/dali/internal/event/animation/animation-impl.cpp index 1b40dd0..f3b9702 100644 --- a/dali/internal/event/animation/animation-impl.cpp +++ b/dali/internal/event/animation/animation-impl.cpp @@ -630,124 +630,6 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph } } -void Animation::Animate( Property& target, Property::Type targetType, AnyFunction& func ) -{ - Animate( target, targetType, func, mDefaultAlpha, mDurationSeconds ); -} - -void Animation::Animate( Property& target, Property::Type targetType, AnyFunction& func, AlphaFunction& alpha ) -{ - Animate( target, targetType, func, alpha, mDurationSeconds ); -} - -void Animation::Animate( Property& target, Property::Type targetType, AnyFunction& func, TimePeriod period ) -{ - Animate( target, targetType, func, mDefaultAlpha, period ); -} - -void Animation::Animate( Property& target, Property::Type targetType, AnyFunction& func, AlphaFunction& alpha, TimePeriod period ) -{ - Property::Type type = target.object.GetPropertyType(target.propertyIndex); - if(target.componentIndex != Property::INVALID_COMPONENT_INDEX) - { - if( type == Property::VECTOR2 - || type == Property::VECTOR3 - || type == Property::VECTOR4 ) - { - type = Property::FLOAT; - } - } - DALI_ASSERT_ALWAYS( type == targetType && "Animation function must match target property type" ); - - ProxyObject& proxy = dynamic_cast( GetImplementation(target.object) ); - - ExtendDuration( period ); - - switch ( targetType ) - { - case Property::BOOLEAN: - { - AddAnimatorConnector( AnimatorConnector::New(proxy, - target.propertyIndex, - target.componentIndex, - AnyCast< AnimatorFunctionBool >( func ), - alpha, - period) ); - break; - } - - case Property::FLOAT: - { - AddAnimatorConnector( AnimatorConnector::New(proxy, - target.propertyIndex, - target.componentIndex, - AnyCast< AnimatorFunctionFloat >( func ), - alpha, - period) ); - break; - } - - case Property::INTEGER: - { - AddAnimatorConnector( AnimatorConnector::New(proxy, - target.propertyIndex, - target.componentIndex, - AnyCast< AnimatorFunctionInteger >( func ), - alpha, - period) ); - break; - } - - case Property::VECTOR2: - { - AddAnimatorConnector( AnimatorConnector::New(proxy, - target.propertyIndex, - target.componentIndex, - AnyCast< AnimatorFunctionVector2 >( func ), - alpha, - period) ); - break; - } - - case Property::VECTOR3: - { - AddAnimatorConnector( AnimatorConnector::New(proxy, - target.propertyIndex, - target.componentIndex, - AnyCast< AnimatorFunctionVector3 >( func ), - alpha, - period) ); - break; - } - - case Property::VECTOR4: - { - AddAnimatorConnector( AnimatorConnector::New(proxy, - target.propertyIndex, - target.componentIndex, - AnyCast< AnimatorFunctionVector4 >( func ), - alpha, - period) ); - break; - } - - case Property::ROTATION: - { - AddAnimatorConnector( AnimatorConnector::New(proxy, - target.propertyIndex, - target.componentIndex, - AnyCast< AnimatorFunctionQuaternion >( func ), - alpha, - period) ); - break; - } - - default: - DALI_ASSERT_ALWAYS(false && "Property type enumeration out of bounds" ); // should never come here - break; - } -} - bool Animation::HasFinished() { bool hasFinished(false); @@ -862,18 +744,6 @@ void Animation::MoveTo(Actor& actor, const Vector3& position, AlphaFunction alph TimePeriod(delaySeconds, durationSeconds) ) ); } -void Animation::Move(Actor& actor, AnimatorFunctionVector3 func, AlphaFunction alpha, float delaySeconds, float durationSeconds) -{ - ExtendDuration( TimePeriod(delaySeconds, durationSeconds) ); - - AddAnimatorConnector( AnimatorConnector::New( actor, - Dali::Actor::POSITION, - Property::INVALID_COMPONENT_INDEX, - func, - alpha, - TimePeriod(delaySeconds, durationSeconds) ) ); -} - void Animation::RotateBy(Actor& actor, Radian angle, const Vector3& axis) { RotateBy(actor, angle, axis, mDefaultAlpha, 0.0f, GetDuration()); @@ -948,18 +818,6 @@ void Animation::RotateTo(Actor& actor, const Quaternion& rotation, AlphaFunction TimePeriod(delaySeconds, durationSeconds) ) ); } -void Animation::Rotate(Actor& actor, AnimatorFunctionQuaternion func, AlphaFunction alpha, float delaySeconds, float durationSeconds) -{ - ExtendDuration( TimePeriod(delaySeconds, durationSeconds) ); - - AddAnimatorConnector( AnimatorConnector::New( actor, - Dali::Actor::ROTATION, - Property::INVALID_COMPONENT_INDEX, - func, - 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()); diff --git a/dali/internal/event/animation/animation-impl.h b/dali/internal/event/animation/animation-impl.h index add8afb..1985998 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -59,7 +59,6 @@ class Animation : public BaseObject { public: - typedef Dali::Animation::AnyFunction AnyFunction; typedef Dali::Animation::EndAction EndAction; typedef void (*FinishedCallback)(Object* object); @@ -296,26 +295,6 @@ public: */ void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period); - /** - * @copydoc Dali::Animation::Animate( Property target, Property::Type targetType, AnyFunction func ) - */ - void Animate( Property& target, Property::Type targetType, AnyFunction& func ); - - /** - * @copydoc Dali::Animation::Animate(Property target, Property::Type targetType, AnyFunction func, AlphaFunction alpha ) - */ - void Animate( Property& target, Property::Type targetType, AnyFunction& func, AlphaFunction& alpha ); - - /** - * @copydoc Dali::Animation::Animate(Property target, Property::Type targetType, AnyFunction func, TimePeriod period) - */ - void Animate( Property& target, Property::Type targetType, AnyFunction& func, TimePeriod period ); - - /** - * @copydoc Dali::Animation::Animate(Property target, Property::Type targetType, AnyFunction func, AlphaFunction alpha, TimePeriod period) - */ - void Animate( Property& target, Property::Type targetType, AnyFunction& func, AlphaFunction& alpha, TimePeriod period ); - // Action-specific convenience functions /** @@ -383,19 +362,6 @@ public: void MoveTo(Actor& actor, const Vector3& translation, AlphaFunction alpha, float delaySeconds, float durationSeconds); /** - * Translate an actor using a custom function. - * The animatorFunc will be called from the rendering thread; it should return quickly, to avoid performance degredation. - * @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] func The function to call during the animation. - * @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 Move(Actor& actor, AnimatorFunctionVector3 func, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** * Rotate an actor around an arbitrary axis. * The default alpha function will be used. * The rotation will start & end when the animation begins & ends. @@ -492,19 +458,6 @@ public: void RotateTo(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha, float delaySeconds, float durationSeconds); /** - * Rotate an actor using a custom function. - * The animatorFunc will be called from the rendering thread; it should return quickly, to avoid performance degredation. - * @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] func The function to call during the animation. - * @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 Rotate(Actor& actor, AnimatorFunctionQuaternion func, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** * Scale an actor. * The default alpha function will be used. * The scaling will start & end when the animation begins & ends. diff --git a/dali/internal/event/common/proxy-object.h b/dali/internal/event/common/proxy-object.h index fcc658d..84c4ab8 100644 --- a/dali/internal/event/common/proxy-object.h +++ b/dali/internal/event/common/proxy-object.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/dali/public-api/animation/animation.cpp b/dali/public-api/animation/animation.cpp index 8be9bb2..585a30f 100644 --- a/dali/public-api/animation/animation.cpp +++ b/dali/public-api/animation/animation.cpp @@ -214,26 +214,6 @@ void Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunct GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames), alpha, period); } -void Animation::Animate( Property target, Property::Type targetType, AnyFunction func ) -{ - GetImplementation(*this).Animate( target, targetType, func ); -} - -void Animation::Animate( Property target, Property::Type targetType, AnyFunction func, AlphaFunction alpha ) -{ - GetImplementation(*this).Animate( target, targetType, func, alpha ); -} - -void Animation::Animate( Property target, Property::Type targetType, AnyFunction func, TimePeriod period ) -{ - GetImplementation(*this).Animate( target, targetType, func, period ); -} - -void Animation::Animate( Property target, Property::Type targetType, AnyFunction func, AlphaFunction alpha, TimePeriod period ) -{ - GetImplementation(*this).Animate( target, targetType, func, alpha, period ); -} - // Actor specific animations void Animation::MoveBy(Actor actor, float x, float y, float z) @@ -266,11 +246,6 @@ void Animation::MoveTo(Actor actor, Vector3 position, AlphaFunction alpha, float GetImplementation(*this).MoveTo(GetImplementation(actor), position, alpha, delaySeconds, durationSeconds); } -void Animation::Move(Actor actor, AnimatorFunctionVector3 animatorFunc, AlphaFunction alpha, float delaySeconds, float durationSeconds) -{ - GetImplementation(*this).Move(GetImplementation(actor), animatorFunc, alpha, delaySeconds, durationSeconds); -} - void Animation::RotateBy(Actor actor, Degree angle, Vector3 axis) { GetImplementation(*this).RotateBy(GetImplementation(actor), Radian(angle), axis); @@ -346,11 +321,6 @@ void Animation::RotateTo(Actor actor, Quaternion rotation, AlphaFunction alpha, GetImplementation(*this).RotateTo(GetImplementation(actor), rotation, alpha, delaySeconds, durationSeconds); } -void Animation::Rotate(Actor actor, AnimatorFunctionQuaternion animatorFunc, AlphaFunction alpha, float delaySeconds, float durationSeconds) -{ - GetImplementation(*this).Rotate(GetImplementation(actor), animatorFunc, alpha, delaySeconds, durationSeconds); -} - void Animation::ScaleBy(Actor actor, float x, float y, float z) { GetImplementation(*this).ScaleBy(GetImplementation(actor), x, y, z); diff --git a/dali/public-api/animation/animation.h b/dali/public-api/animation/animation.h index 2d97db6..e293070 100644 --- a/dali/public-api/animation/animation.h +++ b/dali/public-api/animation/animation.h @@ -18,9 +18,6 @@ * */ -// EXTERNAL INCLUDES -#include - // INTERNAL INCLUDES #include #include @@ -43,14 +40,6 @@ struct Vector2; struct Vector3; struct Vector4; -typedef boost::function AnimatorFunctionBool; ///< Animator function signature for boolean properties. -typedef boost::function AnimatorFunctionFloat; ///< Animator function signature for float properties. -typedef boost::function AnimatorFunctionInteger; ///< Animator function signature for integer properties. -typedef boost::function AnimatorFunctionVector2; ///< Animator function signature for Vector2 properties. -typedef boost::function AnimatorFunctionVector3; ///< Animator function signature for Vector3 properties. -typedef boost::function AnimatorFunctionVector4; ///< Animator function signature for Vector4 properties. -typedef boost::function AnimatorFunctionQuaternion;///< Animator function signature for Quaternion properties. - namespace Internal DALI_INTERNAL { class Animation; @@ -115,8 +104,6 @@ public: typedef SignalV2< void (Animation&) > AnimationSignalV2; ///< Animation finished signal type typedef Any AnyFunction; ///< Interpolation function - typedef boost::function Vector3AnimatorFunc; ///< Interpolation function - typedef boost::function QuaternionAnimatorFunc; ///< Interpolation function /** * @brief What to do when the animation ends, is stopped or is destroyed @@ -471,66 +458,6 @@ public: */ void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period); - /** - * @brief Animate a property using a custom function. - * - * The function will be called from a separate animation-thread; it should return quickly, to avoid performance degredation. - * @pre The property type is equal PropertyTypes::Get

(). - * @param [in] target The target object/property to animate. - * @param [in] animatorFunc The function to call during the animation. - */ - template - void Animate( Property target, boost::function

animatorFunc ) - { - Animate( target, PropertyTypes::Get

(), animatorFunc ); - } - - /** - * @brief Animate a property using a custom function. - * - * The function will be called from a separate animation-thread; it should return quickly, to avoid performance degredation. - * @pre The property type is equal PropertyTypes::Get

(). - * @param [in] target The target object/property to animate. - * @param [in] animatorFunc The function to call during the animation. - * @param [in] alpha The alpha function to apply. - */ - template - void Animate( Property target, boost::function

animatorFunc, AlphaFunction alpha ) - { - Animate( target, PropertyTypes::Get

(), animatorFunc, alpha ); - } - - /** - * @brief Animate a property using a custom function. - * - * The function will be called from a separate animation-thread; it should return quickly, to avoid performance degredation. - * @pre The property type is equal PropertyTypes::Get

(). - * @param [in] target The target object/property to animate. - * @param [in] animatorFunc The function to call during the animation. - * @param [in] period The effect will occur during this time period. - */ - template - void Animate( Property target, boost::function

animatorFunc, TimePeriod period ) - { - Animate( target, PropertyTypes::Get

(), animatorFunc, period ); - } - - /** - * @brief Animate a property using a custom function. - * - * The function will be called from a separate animation-thread; it should return quickly, to avoid performance degredation. - * @pre The property type is equal PropertyTypes::Get

(). - * @param [in] target The target object/property to animate. - * @param [in] animatorFunc The function to call during the animation. - * @param [in] alpha The alpha function to apply. - * @param [in] period The effect will occur during this time period. - */ - template - void Animate( Property target, boost::function

animatorFunc, AlphaFunction alpha, TimePeriod period ) - { - Animate( target, PropertyTypes::Get

(), animatorFunc, alpha, period ); - } - // Actor-specific convenience methods /** @@ -608,20 +535,6 @@ public: void MoveTo(Actor actor, Vector3 position, AlphaFunction alpha, float delaySeconds, float durationSeconds); /** - * @brief Move an actor using a custom function. - * - * The animatorFunc will be called from a separate animation-thread; it should return quickly, to avoid performance degredation. - * @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] animatorFunc The function to call during the animation. - * @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 Move(Actor actor, AnimatorFunctionVector3 animatorFunc, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** * @brief Rotate an actor around an arbitrary axis. * * The default alpha function will be used. @@ -809,20 +722,6 @@ public: void RotateTo(Actor actor, Quaternion orientation, AlphaFunction alpha, float delaySeconds, float durationSeconds); /** - * @brief Rotate an actor using a custom function. - * - * The animatorFunc will be called from a separate animation-thread; it should return quickly, to avoid performance degredation. - * @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] animatorFunc The function to call during the animation. - * @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 Rotate(Actor actor, AnimatorFunctionQuaternion animatorFunc, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** * @brief Scale an actor. * * The default alpha function will be used. @@ -1136,63 +1035,6 @@ public: // Not intended for use by Application developers */ explicit DALI_INTERNAL Animation(Internal::Animation* animation); -private: - - /** - * @brief Animate a property using a custom function. - * - * @pre The property type is equal expectedType. - * @param [in] target The target object/property to animate. - * @param [in] targetType The expected type of the property. - * @param [in] func The function to call during the animation. - */ - void Animate( Property target, - Property::Type targetType, - AnyFunction func ); - - /** - * @brief Animate a property using a custom function. - * - * @pre The property type is equal expectedType. - * @param [in] target The target object/property to animate. - * @param [in] targetType The expected type of the property. - * @param [in] func The function to call during the animation. - * @param [in] alpha The alpha function to apply. - */ - void Animate( Property target, - Property::Type targetType, - AnyFunction func, - AlphaFunction alpha ); - - /** - * @brief Animate a property using a custom function. - * - * @pre The property type is equal expectedType. - * @param [in] target The target object/property to animate. - * @param [in] targetType The expected type of the property. - * @param [in] func The function to call during the animation. - * @param [in] period The effect will occur during this time period. - */ - void Animate( Property target, - Property::Type targetType, - AnyFunction func, - TimePeriod period ); - - /** - * @brief Animate a property using a custom function. - * - * @pre The property type is equal expectedType. - * @param [in] target The target object/property to animate. - * @param [in] targetType The expected type of the property. - * @param [in] func The function to call during the animation. - * @param [in] alpha The alpha function to apply. - * @param [in] period The effect will occur during this time period. - */ - void Animate( Property target, - Property::Type targetType, - AnyFunction func, - AlphaFunction alpha, - TimePeriod period ); }; } // namespace Dali