10 #include <AtomsCore/Globals.h>
12 #include <Atoms/Globals.h>
13 #include <Atoms/AnimationState.h>
70 inline const std::vector<AnimationState>& animationStates()
const;
79 inline const std::map<std::pair<int, int>,
AnimationState>& connections()
const;
88 inline void setName(
const std::string& name);
94 inline const std::string& name()
const;
102 std::vector<AnimationState> m_animationStates;
117 #include "StateMachine.impl.h"
Animation State.
Definition: AnimationState.h:25
State machine.
Definition: StateMachine.h:27
StateMachine()
Constructor.
StateMachine(const std::string &name)
Constructor.
AnimationState & animationStateFromId(const int id)
Gets animation state from id.
void breakConnection(const std::string &fromState, const std::string &toState)
Disconnects two states.
StateMachine(const StateMachine &other)
Copy constructor.
StateMachine & operator=(const StateMachine &other)
Assign operator.
std::vector< int > getShortestPathBetweenStates(const int startStateId, const int endStateid)
Get shortest path between two states.
void connect(const std::string &fromState, const std::string &toState, AnimationState &transition)
Connects two states.
AnimationState & animationState(const std::string &name)
Gets animation state.
void getConnectedStates(std::vector< int > &connectedStates, const AnimationState &state) const
Gets all states connected to this state.
~StateMachine()
Destructor.
Atoms namespace.
Definition: Agent.h:29