All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MultiWidgets::AnimationState Class Reference

This class contains the state of an animation clip. More...

#include <MultiWidgets/AnimationState.hpp>

Public Member Functions

 AnimationState (AnimationClip *clip)
 Construct a new animation state for the given animation clip. More...
 
AnimationClipclip () const
 Get the animation clip this state is for. More...
 
float remappedTime () const
 Get the remapped time based on the animation clip wrap mode. More...
 
void reset ()
 Reset the animation state.
 
void update (float dt)
 Update the animation state. More...
 

Detailed Description

This class contains the state of an animation clip.

Constructor & Destructor Documentation

MultiWidgets::AnimationState::AnimationState ( AnimationClip clip)
inlineexplicit

Construct a new animation state for the given animation clip.

Parameters
clipanimation clip to control

Member Function Documentation

AnimationClip& MultiWidgets::AnimationState::clip ( ) const
inline

Get the animation clip this state is for.

Returns
animation clip
float MultiWidgets::AnimationState::remappedTime ( ) const
inline

Get the remapped time based on the animation clip wrap mode.

This function remaps the time value in the animation state according to the wrap mode of the animation clip so it can be evaluated.

Returns
Time mapped to the animation clip's time range.
void MultiWidgets::AnimationState::update ( float  dt)
inline

Update the animation state.

Parameters
dttime in seconds to advance