Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Olympe::AnimationGraph Struct Reference

Animation state machine (FSM) for managing transitions. More...

#include <AnimationTypes.h>

Public Member Functions

 AnimationGraph ()
 
const AnimationStateGetState (const std::string &name) const
 Get state by name.
 
bool CanTransition (const std::string &from, const std::string &to) const
 Check if transition from one state to another is valid.
 

Public Attributes

std::string graphId
 Unique identifier for this graph.
 
std::string defaultState
 Initial animation state.
 
std::unordered_map< std::string, AnimationStatestates
 

Detailed Description

Animation state machine (FSM) for managing transitions.

Definition at line 343 of file AnimationTypes.h.

Constructor & Destructor Documentation

◆ AnimationGraph()

Olympe::AnimationGraph::AnimationGraph ( )
inline

Definition at line 351 of file AnimationTypes.h.

Member Function Documentation

◆ CanTransition()

bool Olympe::AnimationGraph::CanTransition ( const std::string &  from,
const std::string &  to 
) const
inline

Check if transition from one state to another is valid.

Parameters
fromSource animation state
toTarget animation state
Returns
true if transition is allowed

Definition at line 373 of file AnimationTypes.h.

References GetComponentTypeID_Static(), and states.

+ Here is the call graph for this function:

◆ GetState()

const AnimationState * Olympe::AnimationGraph::GetState ( const std::string &  name) const
inline

Get state by name.

Parameters
nameState name to search for
Returns
Pointer to state, or nullptr if not found

Definition at line 361 of file AnimationTypes.h.

References GetComponentTypeID_Static(), and states.

+ Here is the call graph for this function:

Member Data Documentation

◆ defaultState

std::string Olympe::AnimationGraph::defaultState

Initial animation state.

Definition at line 346 of file AnimationTypes.h.

◆ graphId

std::string Olympe::AnimationGraph::graphId

Unique identifier for this graph.

Definition at line 345 of file AnimationTypes.h.

◆ states

std::unordered_map<std::string, AnimationState> Olympe::AnimationGraph::states

Definition at line 349 of file AnimationTypes.h.

Referenced by CanTransition(), and GetState().


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