36 return (!m_isLocomotion && m_clips.size() == 0) && (m_isLocomotion && m_locomotionName.length() == 0);
41 m_clips.push_back(
clip);
46 if (clipId < m_clips.size())
48 auto it = m_clips.begin();
49 std::advance(it, clipId);
56 return m_clips[clipId];
61 return m_clips[clipId];
66 return static_cast<unsigned int>(m_clips.size());
76 m_maxTurnAngle = angle;
81 return m_maxTurnAngle;
86 m_maxAcceleration = acceleration;
91 return m_maxAcceleration;
101 return m_averageNumFrames;
106 m_blendInFrames = frames;
111 return m_blendInFrames;
116 m_blendOutFrames = frames;
121 return m_blendOutFrames;
126 m_randomLoop = value;
141 return m_validMotionTypeClips[motionType];
156 m_isLocomotion = value;
161 return m_isLocomotion;
166 m_locomotionName = value;
171 return m_locomotionName;
Animation State clip.
Definition: AnimationStateClip.h:23
void setMaxTurnAngle(const AtomsCore::Vector3 &angle)
Sets max turn angle.
Definition: AnimationState.impl.h:74
void setName(const std::string &name)
Sets the state name.
Definition: AnimationState.impl.h:11
void setMaxAcceleration(const AtomsCore::Vector2 &acceleration)
Sets max linear and angular acceleration.
Definition: AnimationState.impl.h:84
void setLocomotionName(const std::string &value)
Sets the locomotion name.
Definition: AnimationState.impl.h:164
bool randomLoop() const
Gets random loop flag.
Definition: AnimationState.impl.h:129
void setBlendOutFrames(unsigned int frames)
Sets blend out frames.
Definition: AnimationState.impl.h:114
const std::string & name() const
Gets the state name.
Definition: AnimationState.impl.h:17
void clearClips()
Removes all animation state clips.
Definition: AnimationState.impl.h:69
unsigned int numClips() const
Gets the number of animation state clips.
Definition: AnimationState.impl.h:64
double velocity() const
Gets the state velocity.
Definition: AnimationState.impl.h:149
void setVelocity(double velocity)
Sets the state velocity.
Definition: AnimationState.impl.h:144
void setRandomLoop(bool value)
Set random loop flag.
Definition: AnimationState.impl.h:124
const AtomsCore::Vector3 & maxTurnAngle() const
Gets max turn angle.
Definition: AnimationState.impl.h:79
void setAverageNumFrames(const AtomsCore::Vector2i &averageNumFrames)
Sets linear and angular average num frames.
Definition: AnimationState.impl.h:94
const AtomsCore::Vector2 & maxAcceleration() const
Gets max acceleration.
Definition: AnimationState.impl.h:89
const AnimationStateClip & clip(unsigned int clipId) const
Gets an animation state clip.
Definition: AnimationState.impl.h:54
void setBlendInFrames(unsigned int frames)
Sets blend in frames.
Definition: AnimationState.impl.h:104
void setId(int id)
Sets the state id.
Definition: AnimationState.impl.h:23
unsigned int blendInFrames() const
Gets blend in frames.
Definition: AnimationState.impl.h:109
unsigned int blendOutFrames() const
Gets blend out frames.
Definition: AnimationState.impl.h:119
void setIsLocomotion(const bool value)
Sets the locomotion state.
Definition: AnimationState.impl.h:154
bool isEmpty() const
Checks if the state has no clip.
Definition: AnimationState.impl.h:34
void removeClip(unsigned int &clipId)
Removes a clip.
Definition: AnimationState.impl.h:44
const std::vector< unsigned int > & validMotionTypeClips(unsigned int motionType) const
Gets valid clips of a motion type.
Definition: AnimationState.impl.h:139
bool isLocomotion() const
Gets the locomotion state.
Definition: AnimationState.impl.h:159
int id() const
Gets the state id.
Definition: AnimationState.impl.h:29
const AtomsCore::Vector2i & averageNumFrames() const
Gets max acceleration.
Definition: AnimationState.impl.h:99
const std::string & locomotionName() const
Gets the locomotion name.
Definition: AnimationState.impl.h:169
const std::vector< unsigned int > & validClips() const
Gets valid clips.
Definition: AnimationState.impl.h:134
void addClip(const AnimationStateClip &clip)
Adds a animation state clip.
Definition: AnimationState.impl.h:39
AtomsMath::Vector2 Vector2
Vector2 class.
Definition: AtomsMath.h:54
AtomsMath::Vector2i Vector2i
Vector2 class.
Definition: AtomsMath.h:56
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
Atoms namespace.
Definition: Agent.h:29