#include <blend_animation.h>

This class allows to handle easy animations using one or more BlendTweenInterfaces with a given timer interval. The following example demonstrates how to use this class:
Public Member Functions | |
| MAXON_METHOD Result< BlendTweenRef > | AddTween (const BlendFunctionRef &blendFunction, const Data &startValue, const Data &endValue) |
| MAXON_FUNCTION Result< BlendTweenRef > | AddTween (const BlendFunctionRef &blendFunction, const Data &startValue, const Data &endValue, AnimBlendTweenCallback &&callback, const JobQueueRef &queue) |
| MAXON_METHOD Result< void > | RemoveTween (const BlendTweenRef &tween) |
| MAXON_METHOD Result< BaseArray< BlendTweenRef > > | GetTweens () const |
| MAXON_METHOD Result< void > | StartAnimation (const TimeValue &timerInterval, const TimeValue &startDelay, const TimeValue &duration) |
| MAXON_METHOD Float | GetProgress () const |
| MAXON_METHOD ANIMBLENDSTATE | GetState () const |
| MAXON_METHOD void | CancelAndWait () |
| MAXON_METHOD Result< TimerRef > | GetTimerRef () const |
| MAXON_METHOD void | SetStartProgress (Float startProgress) |
| MAXON_METHOD void | SetDirection (Bool reverse) |
Static Public Member Functions | |
| static Result< BlendAnimationRef > | Create () |
|
static |
Creates a new BlendAnimationRef object.
| MAXON_METHOD Result<BlendTweenRef> AddTween | ( | const BlendFunctionRef & | blendFunction, |
| const Data & | startValue, | ||
| const Data & | endValue | ||
| ) |
Adds an animation tween with the given function, start and end value.
| MAXON_FUNCTION Result<BlendTweenRef> AddTween | ( | const BlendFunctionRef & | blendFunction, |
| const Data & | startValue, | ||
| const Data & | endValue, | ||
| AnimBlendTweenCallback && | callback, | ||
| const JobQueueRef & | queue | ||
| ) |
Adds an animation tween with the given function, start and end value. The callbacks are automatically mapped to the tween observable.
| MAXON_METHOD Result<void> RemoveTween | ( | const BlendTweenRef & | tween | ) |
Returns an array with all tweens.
| MAXON_METHOD Result<BaseArray<BlendTweenRef> > GetTweens | ( | ) | const |
Returns an array with all tweens.
| MAXON_METHOD Result<void> StartAnimation | ( | const TimeValue & | timerInterval, |
| const TimeValue & | startDelay, | ||
| const TimeValue & | duration | ||
| ) |
Starts the animation with the given timer interval.
| MAXON_METHOD Float GetProgress | ( | ) | const |
Returns a value between 0.0 and 1.0 with the current anim progress.
| MAXON_METHOD ANIMBLENDSTATE GetState | ( | ) | const |
Returns the current state value.
| MAXON_METHOD void CancelAndWait | ( | ) |
Kills the animation loop and the associated timer.
| MAXON_METHOD Result<TimerRef> GetTimerRef | ( | ) | const |
Returns the timer used for this object.
| MAXON_METHOD void SetStartProgress | ( | Float | startProgress | ) |
SetStartProgress allows to set the progress where the animation should start. this can be useful if you try to reverse another animation.
| [in] | startProgress | Start value. |
| MAXON_METHOD void SetDirection | ( | Bool | reverse | ) |
SetDirection allows to change the animation direction to play the reverse blend functions.
| [in] | reverse | True to animate backwards. |