OGRE
2.2.4
Object-Oriented Graphics Rendering Engine
|
Represents the instance of a Skeletal animation based on its definition. More...
#include <OgreSkeletonAnimation.h>
Public Member Functions | |
SkeletonAnimation (const SkeletonAnimationDef *definition, const FastArray< size_t > *slotStarts, SkeletonInstance *owner) | |
void | _applyAnimation (const TransformArray &boneTransforms) |
void | _initialize (void) |
Internal function that initializes a lot of structures that can't be done in the constructor due to how SkeletonInstance is created/pushed in a vector. More... | |
void | _swapBoneWeightsUniquePtr (RawSimdUniquePtr< ArrayReal, MEMCATEGORY_ANIMATION > &inOutBoneWeights) |
void | addFrame (Real frames) |
Plays the animation forward (or backwards if negative) More... | |
void | addTime (Real time) |
Plays the animation forward (or backwards if negative) More... | |
Real | getBoneWeight (IdString boneName) const |
Gets the current per-bone weight of a particular bone. More... | |
Real * | getBoneWeightPtr (IdString boneName) |
Gets a pointer current per-bone weight of a particular bone. More... | |
Real | getCurrentFrame (void) const |
Gets the current animation frame, in frames. More... | |
Real | getCurrentTime (void) const |
Gets the current animation time, in seconds. Prefer using getCurrentFrame. More... | |
const SkeletonAnimationDef * | getDefinition (void) const |
Real | getDuration (void) const |
Gets animation length, in seconds. More... | |
bool | getEnabled (void) const |
bool | getLoop (void) const |
Returns current loop setting. More... | |
IdString | getName (void) const |
Real | getNumFrames (void) const |
Gets the frame count. More... | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
void | setBoneWeight (IdString boneName, Real weight) |
Sets the per-bone weight to a particular bone. More... | |
void | setEnabled (bool bEnable) |
Enables or disables this animation. A disabled animation won't be processed at all. More... | |
void | setFrame (Real frame) |
Sets the animation to a particular frame. More... | |
void | setLoop (bool bLoop) |
Loop setting. More... | |
void | setTime (Real time) |
Sets the animation to a particular time. More... | |
Public Attributes | |
bool | mEnabled |
Real | mFrameRate |
bool | mLoop |
SkeletonInstance * | mOwner |
FastArray< size_t > const * | mSlotStarts |
Real | mWeight |
Represents the instance of a Skeletal animation based on its definition.
Ogre::SkeletonAnimation::SkeletonAnimation | ( | const SkeletonAnimationDef * | definition, |
const FastArray< size_t > * | slotStarts, | ||
SkeletonInstance * | owner | ||
) |
void Ogre::SkeletonAnimation::_applyAnimation | ( | const TransformArray & | boneTransforms | ) |
void Ogre::SkeletonAnimation::_initialize | ( | void | ) |
Internal function that initializes a lot of structures that can't be done in the constructor due to how SkeletonInstance is created/pushed in a vector.
If you're not an Ogre dev, don't call this directly.
void Ogre::SkeletonAnimation::_swapBoneWeightsUniquePtr | ( | RawSimdUniquePtr< ArrayReal, MEMCATEGORY_ANIMATION > & | inOutBoneWeights | ) |
void Ogre::SkeletonAnimation::addFrame | ( | Real | frames | ) |
Plays the animation forward (or backwards if negative)
frames | Frames to advance, in frames |
|
inline |
Plays the animation forward (or backwards if negative)
time | Time to advance, in seconds |
Gets the current per-bone weight of a particular bone.
boneName | The name of the bone to get. If this animation doesn't affect that bone (or the name is invalid) this function returns 0. |
Gets a pointer current per-bone weight of a particular bone.
Useful if you intend to have read/write access to this value very often.
boneName | The name of the bone to get. If this animation doesn't affect that bone (or the name is invalid) this function returns a null pointer. |
|
inline |
Gets the current animation frame, in frames.
|
inline |
Gets the current animation time, in seconds. Prefer using getCurrentFrame.
|
inline |
Real Ogre::SkeletonAnimation::getDuration | ( | void | ) | const |
Gets animation length, in seconds.
|
inline |
|
inline |
Returns current loop setting.
setLoop.
|
inline |
Real Ogre::SkeletonAnimation::getNumFrames | ( | void | ) | const |
Gets the frame count.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
|
inlineinherited |
|
inlineinherited |
placement operator new
|
inlineinherited |
array operator new, with debug line info
|
inlineinherited |
Sets the per-bone weight to a particular bone.
Useful for fine control over animation strength on a set of nodes (i.e. an arm)
boneName | The name of the bone to set. If this animation doesn't affect that bone (or the name is invalid) this function does nothing. |
weight | Weight to apply to this particular bone. Note that the animation multiplies this value against the global mWeight to obtain the final weight. Normal range is between [0; 1] but not necessarily. |
void Ogre::SkeletonAnimation::setEnabled | ( | bool | bEnable | ) |
Enables or disables this animation. A disabled animation won't be processed at all.
void Ogre::SkeletonAnimation::setFrame | ( | Real | frame | ) |
Sets the animation to a particular frame.
frames | Frame to set to, in frames |
|
inline |
Loop setting.
Looped animations will wrap back to zero when reaching the animation length or go back to the animation length if playing backwards. Non-looped animations will stop at the animation length (or at 0 if backwards) but won't be disabled.
|
inline |
Sets the animation to a particular time.
time | Time to set to, in seconds |
bool Ogre::SkeletonAnimation::mEnabled |
Real Ogre::SkeletonAnimation::mFrameRate |
bool Ogre::SkeletonAnimation::mLoop |
SkeletonInstance* Ogre::SkeletonAnimation::mOwner |
FastArray<size_t> const* Ogre::SkeletonAnimation::mSlotStarts |
Real Ogre::SkeletonAnimation::mWeight |