RavEngine
Loading...
Searching...
No Matches
RavEngine::AnimatorComponent::State Struct Reference
Collaboration diagram for RavEngine::AnimatorComponent::State:
[legend]

Classes

struct  Transition
 

Public Member Functions

template<typename T , typename decimal >
constexpr State & SetTransition (decltype(ID) id, T interpolation, decimal duration, Transition::TimeMode mode=Transition::TimeMode::Blended)
 
 State (decltype(ID) ID, decltype(clip) clip, decltype(isLooping) il=true, decltype(speed) speed=1)
 
constexpr void SetAutoTransition (decltype(ID) id)
 
constexpr void ClearAutoTransition ()
 
void SetBeginCallback (const decltype(beginCallback)&bc)
 
void SetEndCallback (const decltype(endCallback)&ec)
 
constexpr bool HasAutoTransition () const
 
constexpr decltype(autoTransitionID) GetAutoTransitionID () const
 

Public Attributes

anim_id_t ID = 0
 
Ref< IAnimGraphable > clip
 
bool isLooping = true
 
float speed = 1
 
double lastPlayTime = 0
 
UnorderedMap< decltype(ID), Transition > exitTransitions
 

Friends

class AnimatorComponent
 

Constructor & Destructor Documentation

◆ State()

RavEngine::AnimatorComponent::State::State ( decltype(ID)  ID,
decltype(clip)  clip,
decltype(isLooping)  il = true,
decltype(speed)  speed = 1 
)
inline

Construct a State

Member Function Documentation

◆ ClearAutoTransition()

constexpr void RavEngine::AnimatorComponent::State::ClearAutoTransition ( )
inlineconstexpr

Clear any active auto transition.

◆ SetAutoTransition()

constexpr void RavEngine::AnimatorComponent::State::SetAutoTransition ( decltype(ID)  id)
inlineconstexpr

When this animation completes, it will automatically transition to the state provided to this call.

Note
if this state is looping, it will never automatically leave.
Parameters
idthe numeric ID to transition to. The blending curve and rules use SetTransition as normal.

◆ SetBeginCallback()

void RavEngine::AnimatorComponent::State::SetBeginCallback ( const decltype(beginCallback)&  bc)
inline

Set the function to call when this state begins.

Parameters
bcfunction taking one parameter representing the ID of the previous state. This may be invalid the first time it is called.

◆ SetEndCallback()

void RavEngine::AnimatorComponent::State::SetEndCallback ( const decltype(endCallback)&  ec)
inline

Set the function to call when this state ends (has finished playing, or is interrupted and moving to a new state).

Parameters
bcfunction taking one parameter representing the ID of the next state. If the state machine is not transitioning, the ID will be that of the current state.

The documentation for this struct was generated from the following file: