![]() |
Atoms Crowd
7.0.0
|
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 int offset=0) const |
| Gets the joint translation. More... | |
| AtomsCore::Quaternion | getRotation (const unsigned int jointId, const double time, const int offset=0) const |
| Gets joint rotation. More... | |
| AtomsCore::Vector3 | getScale (const unsigned int jointId, const double time, const int offset=0) const |
| Gets joint scale. More... | |
| void | getTransformValues (const unsigned int jointId, const double time, AtomsCore::Vector3 &translation, AtomsCore::Quaternion &rotation, AtomsCore::Vector3 &scale, const int offset=0) 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::Metadata > | getMetadata (const unsigned int jointId, const std::string &metadataName, const double time, const int offset=0) 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 int offset=0) const |
| Gets joint metadata value at time. More... | |
| AtomsPtr< AtomsCore::Metadata > | getMetadataAtFrame (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::Metadata > | getStaticMetadata (const unsigned int jointId, const std::string &metadataName) const |
| Gets joint static metadata value. More... | |
| const AtomsCore::MapMetadata & | staticMetadata (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, int offset=0) 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 |
Animation clip looper.
| Atoms::AnimationClipLooper::AnimationClipLooper | ( | AnimationClipCPtr | animationClip | ) |
Constructor.
| animationClip | The animation clip used by the looper |
| AtomsPtr<AtomsCore::Metadata> Atoms::AnimationClipLooper::getMetadata | ( | const unsigned int | jointId, |
| const std::string & | metadataName, | ||
| const double | time, | ||
| const int | offset = 0 |
||
| ) | 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
| jointId | Joint id |
| metadataName | Metadata name |
| offset | Frame Offset |
| 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
| jointId | Joint id |
| metadataName | Metadata name |
| frame | Frame value |
| reminder | Frame reminder, decimal part |
| 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
| jointId | Joint id |
| metadataName | Metadata name |
| frame | Frame value |
| reminder | Frame reminder, decimal part |
| bool Atoms::AnimationClipLooper::getMetadataInPlace | ( | const unsigned int | jointId, |
| const std::string & | metadataName, | ||
| const double | time, | ||
| AtomsPtr< AtomsCore::Metadata > & | outMeta, | ||
| const int | offset = 0 |
||
| ) | 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
| jointId | Joint id |
| metadataName | Metadata name |
| outMeta | Output Metadata interpolated value |
| offset | Frame Offset |
| AtomsCore::Quaternion Atoms::AnimationClipLooper::getRotation | ( | const unsigned int | jointId, |
| const double | time, | ||
| const int | offset = 0 |
||
| ) | 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
| jointId | Joint id |
| time | Time |
| offset | Frame Offset |
| 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
| jointId | Joint id |
| frame | Frame |
| reminder | Reminder, decimal part |
| 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
| jointId | Joint id |
| frame | Frame |
| reminder | Reminder, decimal part |
| AtomsCore::Vector3 Atoms::AnimationClipLooper::getScale | ( | const unsigned int | jointId, |
| const double | time, | ||
| const int | offset = 0 |
||
| ) | 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
| jointId | Joint id |
| time | Time |
| offset | Frame Offset |
| 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
| jointId | Joint id |
| frame | Frame |
| reminder | Reminder, decimal part |
| 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
| jointId | Joint id |
| frame | Frame |
| reminder | Reminder, decimal part |
|
inline |
Gets joint static metadata value.
Gets the joint static metadata.
| jointId | Joint id |
| metadataName | Metadata name |
| void Atoms::AnimationClipLooper::getTransformValues | ( | const unsigned int | jointId, |
| const double | time, | ||
| AtomsCore::Vector3 & | translation, | ||
| AtomsCore::Quaternion & | rotation, | ||
| AtomsCore::Vector3 & | scale, | ||
| const int | offset = 0 |
||
| ) | 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
| jointId | Joint id |
| time | Time |
| translation | Out translation |
| rotation | Out rotation |
| scale | Out scale |
| offset | Frame Offset |
| 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
| jointId | Joint id |
| frame | Frame |
| reminder | Reminder, decimal part |
| translation | Out translation |
| rotation | Out rotation |
| scale | Out scale |
| AtomsCore::Vector3 Atoms::AnimationClipLooper::getTranslation | ( | const unsigned int | jointId, |
| const double | time, | ||
| const int | offset = 0 |
||
| ) | 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
| jointId | Joint id |
| time | Time in seconds |
| offset | Frame Offset |
| 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
| jointId | Joint id |
| frame | Frame |
| reminder | Reminder, decimal part |
| 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
| jointId | Joint id |
| frame | Frame |
| reminder | Reminder, decimal part |
|
inline |
Gets the loop end frame.
|
inline |
Gets the loop start frame.
|
inline |
Gets joint metadata names.
Gets the names of metadata stored on the joint
| jointId | Joint id |
|
inline |
Returns the number of blend frames.
|
inline |
Returns the number of joints.
| void Atoms::AnimationClipLooper::setAnimationClip | ( | AnimationClipCPtr | animationClip | ) |
Sets the animation clips.
Sets the animation clip used by the looper
| animationClip | Animation clip |
|
inline |
Sets the loop end frame.
| value | Loop end frame |
|
inline |
Sets the loop start frame.
| value | Loop start frame |
|
inline |
Sets the number of blend frames.
| value | Number of frames used to blend the animation clip |
|
inline |
Gets joint static metadatas.
Gets the joint static metadatas.
| jointId | Joint id |
|
inline |
Gets joint static metadata names.
Gets the names of static metadata stored on the joint
| jointId | Joint id |