.. _api_VariantAnimation: VariantAnimation ================ Inherited: :ref:`Animation` .. _api_VariantAnimation_description: 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::QUATERNION .. _api_VariantAnimation_public: Public Methods -------------- +------------------------------+-------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`currentValue` () const | +------------------------------+-------------------------------------------------------------------------------+ | int32_t | :ref:`duration` () const | +------------------------------+-------------------------------------------------------------------------------+ | void | :ref:`setCurrentTime` (uint32_t position) | +------------------------------+-------------------------------------------------------------------------------+ | void | :ref:`setCurrentValue` (const Variant & value) | +------------------------------+-------------------------------------------------------------------------------+ | void | :ref:`setCurve` (const AnimationCurve & curve) | +------------------------------+-------------------------------------------------------------------------------+ | void | :ref:`setDuration` (int32_t duration) | +------------------------------+-------------------------------------------------------------------------------+ .. _api_VariantAnimation_static: Static Methods -------------- None .. _api_VariantAnimation_methods: Methods Description ------------------- .. _api_VariantAnimation_37fa0bec: :ref:`Variant` **VariantAnimation::currentValue** () const Returns the current value for the animated Variant. **See also** setCurrentValue(). ---- .. _api_VariantAnimation_7a94e3f5: int32_t **VariantAnimation::duration** () const Reimplements: Animation::duration() const. Returns the duration of the animation (in milliseconds). **See also** setDuration(). ---- .. _api_VariantAnimation_bc65f3da: 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. ---- .. _api_VariantAnimation_18f769db: void **VariantAnimation::setCurrentValue** (:ref:`Variant` & *value*) Sets the new current *value* for the animated Variant. **See also** currentValue(). ---- .. _api_VariantAnimation_17ef4d3c: void **VariantAnimation::setCurve** (:ref:`AnimationCurve` & *curve*) Sets the new sequence of the key frames as curve. ---- .. _api_VariantAnimation_bf8dc265: void **VariantAnimation::setDuration** (int32_t *duration*) Sets a new *duration* of the animation in milliseconds. **See also** duration().