![]() |
Atoms Crowd
7.0.0
|
State machine. More...
#include <StateMachine.h>
Public Member Functions | |
| StateMachine () | |
| Constructor. | |
| StateMachine (const std::string &name) | |
| Constructor. More... | |
| StateMachine (const StateMachine &other) | |
| Copy constructor. | |
| StateMachine & | operator= (const StateMachine &other) |
| Assign operator. | |
| ~StateMachine () | |
| Destructor. | |
| void | addAnimationState (const AnimationState &state) |
| Adds animation state. More... | |
| AnimationState & | animationState (const std::string &name) |
| Gets animation state. More... | |
| AnimationState & | animationStateFromId (const int id) |
| Gets animation state from id. More... | |
| const std::vector< AnimationState > & | animationStates () const |
| Gets animation states. More... | |
| void | connect (const std::string &fromState, const std::string &toState, AnimationState &transition) |
| Connects two states. | |
| void | breakConnection (const std::string &fromState, const std::string &toState) |
| Disconnects two states. | |
| const std::map< std::pair< int, int >, AnimationState > & | connections () const |
| Gets of all connections. | |
| void | getConnectedStates (std::vector< int > &connectedStates, const AnimationState &state) const |
| Gets all states connected to this state. | |
| void | setName (const std::string &name) |
| Sets the name. More... | |
| const std::string & | name () const |
| Gets the name. More... | |
| std::vector< int > | getShortestPathBetweenStates (const int startStateId, const int endStateid) |
| Get shortest path between two states. | |
State machine.
A state machine defines the relationships between animation states. It's used by the engine to work out the transition between animation clips.
| Atoms::StateMachine::StateMachine | ( | const std::string & | name | ) |
Constructor.
| name | State machine name |
|
inline |
Adds animation state.
Adds an animations tate tot he state machine
| state | Animation state |
| AnimationState& Atoms::StateMachine::animationState | ( | const std::string & | name | ) |
Gets animation state.
Gets an animation state
| AnimationState& Atoms::StateMachine::animationStateFromId | ( | const int | id | ) |
Gets animation state from id.
Gets an animation state from id
|
inline |
Gets animation states.
Gets a vector with the animation states saved inside the state machine
|
inline |
Gets the name.
|
inline |
Sets the name.
| name | State machine name |