.. _api_AnimationTrack: AnimationTrack ============== Inherited: :ref:`Motion` .. _api_AnimationTrack_description: Description ----------- .. _api_AnimationTrack_public: Public Methods -------------- +-------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`AnimationCurve` & | :ref:`curve` () | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | int | :ref:`duration` () const | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | void | :ref:`fixCurves` () | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`AnimationTrack::Frames` & | :ref:`frames` () | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | void | :ref:`fromVariant` (const Variant & variant) | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | void | :ref:`setDuration` (int duration) | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`toVariant` () const | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Quaternion` | :ref:`valueQuaternion` (float time) const | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`TString` | :ref:`valueString` (float time) const | +-------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Vector4` | :ref:`valueVector4` (float time) const | +-------------------------------------------------------------+---------------------------------------------------------------------------+ .. _api_AnimationTrack_static: Static Methods -------------- None .. _api_AnimationTrack_methods: Methods Description ------------------- .. _api_AnimationTrack_2ae9856b: :ref:`AnimationCurve` & **AnimationTrack::curve** () Returns curve used for interpolation based animation. ---- .. _api_AnimationTrack_f7268ae9: int **AnimationTrack::duration** () const Returns a duration of track in milliseconds. **See also** setDuration(). ---- .. _api_AnimationTrack_9fc6718a: void **AnimationTrack::fixCurves** () Tries to fix animation curves in the animation track. Renormalizes existant keyframes and checks the duration. ---- .. _api_AnimationTrack_93052b1f: :ref:`AnimationTrack::Frames` & **AnimationTrack::frames** () Returns set of frames for frame-by-frame animation (e.g. sprites). ---- .. _api_AnimationTrack_a8b6ed5c: void **AnimationTrack::fromVariant** (:ref:`Variant` & *variant*) Deserializes current track from variant. ---- .. _api_AnimationTrack_9a085136: void **AnimationTrack::setDuration** (int *duration*) Sets a *duration* of track in milliseconds. **See also** duration(). ---- .. _api_AnimationTrack_e2c4a5d6: :ref:`Variant` **AnimationTrack::toVariant** () const Serializes current track to Variant. ---- .. _api_AnimationTrack_374c0eba: :ref:`Quaternion` **AnimationTrack::valueQuaternion** (float *time*) const Returns current value for the animation curve. Parameter normalized *time* is used to interpolate value between key frames. ---- .. _api_AnimationTrack_0afd6c7b: :ref:`TString` **AnimationTrack::valueString** (float *time*) const Returns current value at normalized *time* position. ---- .. _api_AnimationTrack_5e6fc9a0: :ref:`Vector4` **AnimationTrack::valueVector4** (float *time*) const Returns current value for the animation curve. Parameter normalized *time* is used to interpolate value between key frames.