Atoms Crowd
7.0.0
|
Animation State. More...
#include <AnimationState.h>
Public Member Functions | |
AnimationState () | |
Constructor. | |
AnimationState (const std::string &name, int id) | |
Constructor. More... | |
AnimationState (const std::string &name, int id, const AtomsCore::Vector3 maxTurn, unsigned int blendIn, unsigned int blendOut) | |
Constructor. More... | |
AnimationState (const std::string &name, int id, const AtomsCore::Vector3 maxTurn, unsigned int blendIn, unsigned int blendOut, bool randomLoop) | |
Constructor. More... | |
AnimationState (const std::string &name, int id, const AtomsCore::Vector3 maxTurn, unsigned int blendIn, unsigned int blendOut, bool randomLoop, double velocity) | |
Constructor. More... | |
AnimationState (const AnimationState &other) | |
Copy constructor. | |
AnimationState & | operator= (const AnimationState &other) |
Assign Operator. | |
~AnimationState () | |
Destructor. | |
void | setName (const std::string &name) |
Sets the state name. More... | |
const std::string & | name () const |
Gets the state name. More... | |
void | addClip (const AnimationStateClip &clip) |
Adds a animation state clip. More... | |
void | removeClip (unsigned int &clipId) |
Removes a clip. More... | |
const AnimationStateClip & | clip (unsigned int clipId) const |
Gets an animation state clip. More... | |
AnimationStateClip & | clip (unsigned int clipId) |
Gets an animation state clip. More... | |
unsigned int | numClips () const |
Gets the number of animation state clips. More... | |
void | clearClips () |
Removes all animation state clips. | |
void | setId (int id) |
Sets the state id. More... | |
int | id () const |
Gets the state id. More... | |
bool | isEmpty () const |
Checks if the state has no clip. More... | |
void | setMaxTurnAngle (const AtomsCore::Vector3 &angle) |
Sets max turn angle. More... | |
const AtomsCore::Vector3 & | maxTurnAngle () const |
Gets max turn angle. More... | |
void | setMaxAcceleration (const AtomsCore::Vector2 &acceleration) |
Sets max linear and angular acceleration. More... | |
const AtomsCore::Vector2 & | maxAcceleration () const |
Gets max acceleration. More... | |
void | setAverageNumFrames (const AtomsCore::Vector2i &averageNumFrames) |
Sets linear and angular average num frames. More... | |
const AtomsCore::Vector2i & | averageNumFrames () const |
Gets max acceleration. More... | |
void | setBlendInFrames (unsigned int frames) |
Sets blend in frames. More... | |
unsigned int | blendInFrames () const |
Gets blend in frames. More... | |
void | setBlendOutFrames (unsigned int frames) |
Sets blend out frames. More... | |
unsigned int | blendOutFrames () const |
Gets blend out frames. More... | |
void | setRandomLoop (bool value) |
Set random loop flag. More... | |
bool | randomLoop () const |
Gets random loop flag. More... | |
const std::vector< unsigned int > & | validClips () const |
Gets valid clips. More... | |
const std::vector< unsigned int > & | validMotionTypeClips (unsigned int motionType) const |
Gets valid clips of a motion type. More... | |
void | updateValidClips () |
Updated the valid clips list of this state. | |
void | setVelocity (double velocity) |
Sets the state velocity. More... | |
double | velocity () const |
Gets the state velocity. More... | |
void | setIsLocomotion (const bool value) |
Sets the locomotion state. More... | |
bool | isLocomotion () const |
Gets the locomotion state. More... | |
void | setLocomotionName (const std::string &value) |
Sets the locomotion name. More... | |
const std::string & | locomotionName () const |
Gets the locomotion name. More... | |
Animation State.
This class defines a state used by the state machine
Atoms::AnimationState::AnimationState | ( | const std::string & | name, |
int | id | ||
) |
Constructor.
name | State name |
id | State id |
Atoms::AnimationState::AnimationState | ( | const std::string & | name, |
int | id, | ||
const AtomsCore::Vector3 | maxTurn, | ||
unsigned int | blendIn, | ||
unsigned int | blendOut | ||
) |
Constructor.
name | State name |
id | State id |
id | State horizontal and vertical max turn angle |
blendIn | State blend in frames |
blendOut | State blend out frames |
Atoms::AnimationState::AnimationState | ( | const std::string & | name, |
int | id, | ||
const AtomsCore::Vector3 | maxTurn, | ||
unsigned int | blendIn, | ||
unsigned int | blendOut, | ||
bool | randomLoop | ||
) |
Constructor.
name | State name |
id | State id |
id | State horizontal and vertical max turn angle |
blendIn | State blend in frames |
blendOut | State blend out frames |
randomLoop | State random loop |
Atoms::AnimationState::AnimationState | ( | const std::string & | name, |
int | id, | ||
const AtomsCore::Vector3 | maxTurn, | ||
unsigned int | blendIn, | ||
unsigned int | blendOut, | ||
bool | randomLoop, | ||
double | velocity | ||
) |
Constructor.
name | State name |
id | State id |
id | State horizontal and vertical max turn angle |
blendIn | State blend in frames |
blendOut | State blend out frames |
randomLoop | State random loop |
velocity | State velocity |
|
inline |
Adds a animation state clip.
clip | Animation state clip |
|
inline |
Gets max acceleration.
|
inline |
Gets blend in frames.
|
inline |
Gets blend out frames.
|
inline |
Gets an animation state clip.
clipId | Animation state clip id |
|
inline |
Gets an animation state clip.
clipId | Animation state clip id |
|
inline |
Gets the state id.
|
inline |
Checks if the state has no clip.
|
inline |
Gets the locomotion state.
|
inline |
Gets the locomotion name.
|
inline |
Gets max acceleration.
|
inline |
Gets max turn angle.
|
inline |
Gets the state name.
|
inline |
Gets the number of animation state clips.
|
inline |
Gets random loop flag.
|
inline |
Removes a clip.
clipId | Animation state clip id |
|
inline |
Sets linear and angular average num frames.
averageNumFrames | average num frames (x: linear average num frames, y: angular average num frames) |
|
inline |
Sets blend in frames.
frames | Blend in frames |
|
inline |
Sets blend out frames.
frames | Blend out frames |
|
inline |
Sets the state id.
id | State id |
|
inline |
Sets the locomotion state.
value | Locomotion state |
|
inline |
Sets the locomotion name.
value | Locomotion name |
|
inline |
Sets max linear and angular acceleration.
acceleration | Acceleration in unit / second (x: linear acceleration, y: angular acceleration) |
|
inline |
Sets max turn angle.
angle | Angle in degrees (x: horizontal, y: vertical) |
|
inline |
Sets the state name.
name | State name |
|
inline |
Set random loop flag.
This flag activate the random pick of a new clip when the loop of one clip is finished
|
inline |
Sets the state velocity.
velocity | State velocity |
|
inline |
Gets valid clips.
Gets clips that can be played
|
inline |
Gets valid clips of a motion type.
Gets clips of a specific motiontype that can be played
|
inline |
Gets the state velocity.