Atoms Crowd  4.1.0
Atoms::AnimationClipLooper Class Reference

Animation clip looper. More...

#include <AnimationClipLooper.h>

Public Member Functions

 AnimationClipLooper ()
 Constructor.
 
 AnimationClipLooper (AnimationClipCPtr animationClip)
 Constructor. More...
 
 ~AnimationClipLooper ()
 Destructor.
 
bool isValid () const
 Check if the looper is valid and has a valid anim clip.
 
const AnimationClipCPtr animationClip () const
 Get the animation clip.
 
void setAnimationClip (AnimationClipCPtr animationClip)
 Sets the animation clips. More...
 
int numJoints () const
 Returns the number of joints. More...
 
unsigned int numberBlendFrames () const
 Returns the number of blend frames. More...
 
void setNumberBlendFrames (unsigned int value)
 Sets the number of blend frames. More...
 
void setLoopStartFrame (unsigned int value)
 Sets the loop start frame. More...
 
unsigned int loopStartFrame () const
 Gets the loop start frame. More...
 
void setLoopEndFrame (unsigned int value)
 Sets the loop end frame. More...
 
unsigned int loopEndFrame () const
 Gets the loop end frame. More...
 
AtomsCore::Vector3 getTranslation (const unsigned int jointId, const double time) const
 Gets the joint translation. More...
 
AtomsCore::Quaternion getRotation (const unsigned int jointId, const double time) const
 Gets joint rotation. More...
 
AtomsCore::Vector3 getScale (const unsigned int jointId, const double time) const
 Gets joint scale. More...
 
void getTransformValues (const unsigned int jointId, const double time, AtomsCore::Vector3 &translation, AtomsCore::Quaternion &rotation, AtomsCore::Vector3 &scale) const
 Gets joint transform. More...
 
void getTransformValuesAtFrame (const unsigned int jointId, const unsigned frame, const double reminder, AtomsCore::Vector3 &translation, AtomsCore::Quaternion &rotation, AtomsCore::Vector3 &scale) const
 Gets joint transform at frame. More...
 
AtomsCore::Vector3 getTranslationAtFrame (const unsigned int jointId, const unsigned frame, const double reminder) const
 Gets joint translation at frame. More...
 
AtomsCore::Vector3 getTranslationAtGlobalFrame (const unsigned int jointId, const unsigned frame, const double reminder) const
 Gets joint translation at frame. More...
 
AtomsCore::Quaternion getRotationAtFrame (const unsigned int jointId, const unsigned frame, const double reminder) const
 Gets joint rotation at frame. More...
 
AtomsCore::Quaternion getRotationAtGlobalFrame (const unsigned int jointId, const unsigned frame, const double reminder) const
 Gets joint rotation at frame. More...
 
AtomsCore::Vector3 getScaleAtFrame (const unsigned int jointId, const unsigned frame, const double reminder) const
 Gets joint scale at frame. More...
 
AtomsCore::Vector3 getScaleAtGlobalFrame (const unsigned int jointId, const unsigned frame, const double reminder) const
 Gets joint scale at frame. More...
 
std::vector< std::string > metadataNames (const unsigned int jointId) const
 Gets joint metadata names. More...
 
AtomsPtr< AtomsCore::MetadatagetMetadata (const unsigned int jointId, const std::string &metadataName, const double time) const
 Gets joint metadata value at time. More...
 
bool getMetadataInPlace (const unsigned int jointId, const std::string &metadataName, const double time, AtomsPtr< AtomsCore::Metadata > &outMeta) const
 Gets joint metadata value at time. More...
 
AtomsPtr< AtomsCore::MetadatagetMetadataAtFrame (const unsigned int jointId, const std::string &metadataName, const unsigned frame, const double reminder) const
 Gets joint metadata value at frame. More...
 
void getMetadataAtFrameInPlace (const unsigned int jointId, const std::string &metadataName, const unsigned frame, const double reminder, AtomsPtr< AtomsCore::Metadata > &OutMeta) const
 Gets joint metadata value at frame. More...
 
std::vector< std::string > staticMetadataNames (const unsigned int jointId) const
 Gets joint static metadata names. More...
 
AtomsPtr< const AtomsCore::MetadatagetStaticMetadata (const unsigned int jointId, const std::string &metadataName) const
 Gets joint static metadata value. More...
 
const AtomsCore::MapMetadatastaticMetadata (const unsigned int jointId) const
 Gets joint static metadatas. More...
 
const std::map< std::string, AtomsPtr< AtomsCore::BaseTypedArrayMetadata > > & metadata (const unsigned int jointId) const
 
const std::vector< std::string > & animatedMetadata (const unsigned int jointId) const
 
unsigned int mapTimeToFrame (const double time, double &reminder, unsigned int &nextFrame) const
 
unsigned int mapFrameToFrame (const unsigned frame, unsigned int &nextFrame) const
 
unsigned int numFrames () const
 Gets the number of frames.
 
double getFactorFromFrame (unsigned int frame, unsigned int nextFrame, double reminder, unsigned int &loopedFrame, unsigned int &loopedNextFrame) const
 

Detailed Description

Animation clip looper.

Constructor & Destructor Documentation

◆ AnimationClipLooper()

Atoms::AnimationClipLooper::AnimationClipLooper ( AnimationClipCPtr  animationClip)

Constructor.

Parameters
animationClipThe animation clip used by the looper

Member Function Documentation

◆ getMetadata()

AtomsPtr<AtomsCore::Metadata> Atoms::AnimationClipLooper::getMetadata ( const unsigned int  jointId,
const std::string &  metadataName,
const double  time 
) const

Gets joint metadata value at time.

Get the joint metadata at a specific time. If the time is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
metadataNameMetadata name
Returns
Metadata interpolated value

◆ getMetadataAtFrame()

AtomsPtr<AtomsCore::Metadata> Atoms::AnimationClipLooper::getMetadataAtFrame ( const unsigned int  jointId,
const std::string &  metadataName,
const unsigned  frame,
const double  reminder 
) const

Gets joint metadata value at frame.

Get the joint metadata at a specific frame. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
metadataNameMetadata name
frameFrame value
reminderFrame reminder, decimal part
Returns
Metadata interpolated value

◆ getMetadataAtFrameInPlace()

void Atoms::AnimationClipLooper::getMetadataAtFrameInPlace ( const unsigned int  jointId,
const std::string &  metadataName,
const unsigned  frame,
const double  reminder,
AtomsPtr< AtomsCore::Metadata > &  OutMeta 
) const

Gets joint metadata value at frame.

Get the joint metadata at a specific frame. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
metadataNameMetadata name
frameFrame value
reminderFrame reminder, decimal part
Returns
Metadata interpolated value

◆ getMetadataInPlace()

bool Atoms::AnimationClipLooper::getMetadataInPlace ( const unsigned int  jointId,
const std::string &  metadataName,
const double  time,
AtomsPtr< AtomsCore::Metadata > &  outMeta 
) const

Gets joint metadata value at time.

Get the joint metadata at a specific time. If the time is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
metadataNameMetadata name
outMetaOutput Metadata interpolated value

◆ getRotation()

AtomsCore::Quaternion Atoms::AnimationClipLooper::getRotation ( const unsigned int  jointId,
const double  time 
) const

Gets joint rotation.

Gets the joint rotation at a specific time. If the time is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
timeTime
Returns
Joint rotation

◆ getRotationAtFrame()

AtomsCore::Quaternion Atoms::AnimationClipLooper::getRotationAtFrame ( const unsigned int  jointId,
const unsigned  frame,
const double  reminder 
) const

Gets joint rotation at frame.

Gets the joint rotation at a specific frame. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
frameFrame
reminderReminder, decimal part
Returns
Joint rotation

◆ getRotationAtGlobalFrame()

AtomsCore::Quaternion Atoms::AnimationClipLooper::getRotationAtGlobalFrame ( const unsigned int  jointId,
const unsigned  frame,
const double  reminder 
) const

Gets joint rotation at frame.

Gets the joint rotation at a specific frame. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
frameFrame
reminderReminder, decimal part
Returns
Joint rotation

◆ getScale()

AtomsCore::Vector3 Atoms::AnimationClipLooper::getScale ( const unsigned int  jointId,
const double  time 
) const

Gets joint scale.

Gets the joint scale at a specific time. If the time is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
timeTime
Returns
Joint scale

◆ getScaleAtFrame()

AtomsCore::Vector3 Atoms::AnimationClipLooper::getScaleAtFrame ( const unsigned int  jointId,
const unsigned  frame,
const double  reminder 
) const

Gets joint scale at frame.

Gets the joint scale at a specific frame. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
frameFrame
reminderReminder, decimal part
Returns
Joint scale

◆ getScaleAtGlobalFrame()

AtomsCore::Vector3 Atoms::AnimationClipLooper::getScaleAtGlobalFrame ( const unsigned int  jointId,
const unsigned  frame,
const double  reminder 
) const

Gets joint scale at frame.

Gets the joint scale at a specific frame. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
frameFrame
reminderReminder, decimal part
Returns
Joint scale

◆ getStaticMetadata()

AtomsPtr< const AtomsCore::Metadata > Atoms::AnimationClipLooper::getStaticMetadata ( const unsigned int  jointId,
const std::string &  metadataName 
) const
inline

Gets joint static metadata value.

Gets the joint static metadata.

Parameters
jointIdJoint id
metadataNameMetadata name

◆ getTransformValues()

void Atoms::AnimationClipLooper::getTransformValues ( const unsigned int  jointId,
const double  time,
AtomsCore::Vector3 translation,
AtomsCore::Quaternion rotation,
AtomsCore::Vector3 scale 
) const

Gets joint transform.

Gets the joint transform at a specific time. If the time is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
timeTime
translationOut translation
rotationOut rotation
scaleOut scale

◆ getTransformValuesAtFrame()

void Atoms::AnimationClipLooper::getTransformValuesAtFrame ( const unsigned int  jointId,
const unsigned  frame,
const double  reminder,
AtomsCore::Vector3 translation,
AtomsCore::Quaternion rotation,
AtomsCore::Vector3 scale 
) const

Gets joint transform at frame.

Gets the joint transform at a specific frame. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
frameFrame
reminderReminder, decimal part
translationOut translation
rotationOut rotation
scaleOut scale

◆ getTranslation()

AtomsCore::Vector3 Atoms::AnimationClipLooper::getTranslation ( const unsigned int  jointId,
const double  time 
) const

Gets the joint translation.

Gets the joint translation at a specific time. If the time is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
timeTime in seconds
Returns
Joint translation

◆ getTranslationAtFrame()

AtomsCore::Vector3 Atoms::AnimationClipLooper::getTranslationAtFrame ( const unsigned int  jointId,
const unsigned  frame,
const double  reminder 
) const

Gets joint translation at frame.

Gets the joint translation at a specific time. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
frameFrame
reminderReminder, decimal part
Returns
Joint translation

◆ getTranslationAtGlobalFrame()

AtomsCore::Vector3 Atoms::AnimationClipLooper::getTranslationAtGlobalFrame ( const unsigned int  jointId,
const unsigned  frame,
const double  reminder 
) const

Gets joint translation at frame.

Gets the joint translation at a specific time. If the frame is in the blend zone, an interpolated value between the start and end loop frames is returned

Parameters
jointIdJoint id
frameFrame
reminderReminder, decimal part
Returns
Joint translation

◆ loopEndFrame()

unsigned int Atoms::AnimationClipLooper::loopEndFrame ( ) const
inline

Gets the loop end frame.

Returns
Loop end frame

◆ loopStartFrame()

unsigned int Atoms::AnimationClipLooper::loopStartFrame ( ) const
inline

Gets the loop start frame.

Returns
Loop start frame

◆ metadataNames()

std::vector< std::string > Atoms::AnimationClipLooper::metadataNames ( const unsigned int  jointId) const
inline

Gets joint metadata names.

Gets the names of metadata stored on the joint

Parameters
jointIdJoint id
Returns
Vector of metadata names

◆ numberBlendFrames()

unsigned int Atoms::AnimationClipLooper::numberBlendFrames ( ) const
inline

Returns the number of blend frames.

Returns
Number of frames used to blend the animation clip

◆ numJoints()

int Atoms::AnimationClipLooper::numJoints ( ) const
inline

Returns the number of joints.

Returns
Number of joints

◆ setAnimationClip()

void Atoms::AnimationClipLooper::setAnimationClip ( AnimationClipCPtr  animationClip)

Sets the animation clips.

Sets the animation clip used by the looper

Parameters
animationClipAnimation clip

◆ setLoopEndFrame()

void Atoms::AnimationClipLooper::setLoopEndFrame ( unsigned int  value)
inline

Sets the loop end frame.

Parameters
valueLoop end frame

◆ setLoopStartFrame()

void Atoms::AnimationClipLooper::setLoopStartFrame ( unsigned int  value)
inline

Sets the loop start frame.

Parameters
valueLoop start frame

◆ setNumberBlendFrames()

void Atoms::AnimationClipLooper::setNumberBlendFrames ( unsigned int  value)
inline

Sets the number of blend frames.

Parameters
valueNumber of frames used to blend the animation clip

◆ staticMetadata()

const AtomsCore::MapMetadata & Atoms::AnimationClipLooper::staticMetadata ( const unsigned int  jointId) const
inline

Gets joint static metadatas.

Gets the joint static metadatas.

Parameters
jointIdJoint id
Returns
Map Metadata

◆ staticMetadataNames()

std::vector< std::string > Atoms::AnimationClipLooper::staticMetadataNames ( const unsigned int  jointId) const
inline

Gets joint static metadata names.

Gets the names of static metadata stored on the joint

Parameters
jointIdJoint id
Returns
Vector of metadata names

The documentation for this class was generated from the following files: