VariantAnimation
Inherited: None
Description
This class allows to change values in time. VariantAnimation uses key-frame animation mechanism. Developers should specify sequence of key values which pair of point in time and key value. While animation is playing specific interpolation function moves from one key-frame to another and changing controled value.
List of supported Variant types for animation:
MetaType::BOOLEAN MetaType::INTEGER MetaType::FLOAT MetaType::VECTOR2 MetaType::VECTOR3 MetaType::VECTOR4 MetaType::STRING
Public Methods
currentValue () const |
|
int32_t |
duration () const |
void |
setCurrentTime (uint32_t position) |
void |
setCurrentValue (const Variant & value) |
void |
setCurve (const AnimationCurve & curve) |
void |
setDuration (int32_t duration) |
Static Methods
None
Methods Description
Variant VariantAnimation::currentValue () const
Returns the current value for the animated Variant.
See also setCurrentValue().
int32_t VariantAnimation::duration () const
Reimplements: Animation::duration() const.
Returns the duration of the animation (in milliseconds).
See also setDuration().
void VariantAnimation::setCurrentTime (uint32_t position)
Reimplements: Animation::setCurrentTime(uint32_t msecs).
This is an overloaded function.
This function interpolates animated Variant value from one KeyFrame to another at position in milliseconds.
void VariantAnimation::setCurrentValue (Variant & value)
Sets the new current value for the animated Variant.
See also currentValue().
void VariantAnimation::setCurve (AnimationCurve & curve)
Sets the new sequence of the key frames as curve.
void VariantAnimation::setDuration (int32_t duration)
Sets a new duration of the animation in milliseconds.
See also *duration*().