OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::SkeletonTrack Class Reference

#include <OgreSkeletonTrack.h>

+ Inheritance diagram for Ogre::SkeletonTrack:
+ Collaboration diagram for Ogre::SkeletonTrack:

Public Member Functions

 SkeletonTrack (uint32 boneBlockIdx, KfTransformArrayMemoryManager *kfTransformMemoryManager)
 
 ~SkeletonTrack ()
 
void _bakeUnusedSlots (void)
 Takes all KeyFrames and repeats the KfTransforms for every unused slot by a pattern based on the number of used slots. More...
 
KeyFrameRigVec_getKeyFrames (void)
 
void _setMaxUsedSlot (uint32 slot)
 
void addKeyFrame (Real timestamp, Real frameRate)
 
void applyKeyFrameRigAt (KeyFrameRigVec::const_iterator &inOutLastKnownKeyFrame, float frame, ArrayReal animWeight, const ArrayReal *RESTRICT_ALIAS perBoneWeights, const TransformArray &KfTransforms) const
 Applies the interpolated keyframe at the given frame to all bone transformations that are animated by this Track. More...
 
uint32 getBoneBlockIdx (void) const
 
void getKeyFrameRigAt (KeyFrameRigVec::const_iterator &inOutPrevFrame, KeyFrameRigVec::const_iterator &outNextFrame, Real frame) const
 
const KeyFrameRigVecgetKeyFrames (void) const
 
size_t getUsedSlots (void) const
 
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 setKeyFrameTransform (Real frame, uint32 slot, const Vector3 &vPos, const Quaternion &qRot, const Vector3 vScale)
 
void setNumKeyFrame (size_t numKeyFrames)
 

Protected Attributes

uint32 mBoneBlockIdx
 
KeyFrameRigVec mKeyFrameRigs
 There is one entry per each parent level. More...
 
KfTransformArrayMemoryManagermLocalMemoryManager
 
Real mNumFrames
 
uint32 mUsedSlots
 Number of SIMD slots used by all. More...
 

Detailed Description

Definition at line 53 of file OgreSkeletonTrack.h.

Constructor & Destructor Documentation

Ogre::SkeletonTrack::SkeletonTrack ( uint32  boneBlockIdx,
KfTransformArrayMemoryManager kfTransformMemoryManager 
)
Ogre::SkeletonTrack::~SkeletonTrack ( )

Member Function Documentation

void Ogre::SkeletonTrack::_bakeUnusedSlots ( void  )

Takes all KeyFrames and repeats the KfTransforms for every unused slot by a pattern based on the number of used slots.

Only useful when mUsedSlots <= (ARRAY_PACKED_REALS >> 1). Otherwise it does nothing.

KeyFrameRigVec& Ogre::SkeletonTrack::_getKeyFrames ( void  )
inline

Definition at line 97 of file OgreSkeletonTrack.h.

void Ogre::SkeletonTrack::_setMaxUsedSlot ( uint32  slot)
inline

Definition at line 93 of file OgreSkeletonTrack.h.

References Ogre::max().

void Ogre::SkeletonTrack::addKeyFrame ( Real  timestamp,
Real  frameRate 
)
void Ogre::SkeletonTrack::applyKeyFrameRigAt ( KeyFrameRigVec::const_iterator &  inOutLastKnownKeyFrame,
float  frame,
ArrayReal  animWeight,
const ArrayReal *RESTRICT_ALIAS  perBoneWeights,
const TransformArray KfTransforms 
) const

Applies the interpolated keyframe at the given frame to all bone transformations that are animated by this Track.

Parameters
inOutLastKnownKeyFrame[in/out] Hint to this system on where to start next. If unknown (i.e. first call) set it to mKeyFrameRigs.begin() As output it will be set to the current keyframe, and should be used as input for the next call to keep keyframe searchs in constant time.
frame[in] Frame number, should be in range [0; mNumFrames]; if below zero the result will look like clamped to zero, if above mNumFrames, it result will look like clamped to mNumFrames
perBoneWeights[in] A list of per bone weights. The size of the array must be 1 (or more)
KfTransforms[out] An array with all bone transformations, sorted by parent level. The key frames are only applied to affected bones.
uint32 Ogre::SkeletonTrack::getBoneBlockIdx ( void  ) const
inline

Definition at line 91 of file OgreSkeletonTrack.h.

void Ogre::SkeletonTrack::getKeyFrameRigAt ( KeyFrameRigVec::const_iterator &  inOutPrevFrame,
KeyFrameRigVec::const_iterator &  outNextFrame,
Real  frame 
) const
inline
const KeyFrameRigVec& Ogre::SkeletonTrack::getKeyFrames ( void  ) const
inline

Definition at line 96 of file OgreSkeletonTrack.h.

size_t Ogre::SkeletonTrack::getUsedSlots ( void  ) const
inline

Definition at line 92 of file OgreSkeletonTrack.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

void Ogre::SkeletonTrack::setKeyFrameTransform ( Real  frame,
uint32  slot,
const Vector3 vPos,
const Quaternion qRot,
const Vector3  vScale 
)
void Ogre::SkeletonTrack::setNumKeyFrame ( size_t  numKeyFrames)

Member Data Documentation

uint32 Ogre::SkeletonTrack::mBoneBlockIdx
protected

Definition at line 60 of file OgreSkeletonTrack.h.

KeyFrameRigVec Ogre::SkeletonTrack::mKeyFrameRigs
protected

There is one entry per each parent level.

Definition at line 57 of file OgreSkeletonTrack.h.

KfTransformArrayMemoryManager* Ogre::SkeletonTrack::mLocalMemoryManager
protected

Definition at line 79 of file OgreSkeletonTrack.h.

Real Ogre::SkeletonTrack::mNumFrames
protected

Definition at line 58 of file OgreSkeletonTrack.h.

uint32 Ogre::SkeletonTrack::mUsedSlots
protected

Number of SIMD slots used by all.

See also
KeyFrameRig::mBoneTransform. When this value is <= (ARRAY_PACKED_REALS / 2); then we repeat the transforms to the next slots. i.e: mUsedSlots = 2; mBoneTransform[0] = Bone Transform A mBoneTransform[1] = Bone Transform B mBoneTransform[2] = mBoneTransform[0] mBoneTransform[3] = mBoneTransform[1]

mUsedSlots = 1; mBoneTransform[0] = Bone Transform A mBoneTransform[1] = mBoneTransform[0] mBoneTransform[2] = mBoneTransform[0] mBoneTransform[3] = mBoneTransform[0]

Definition at line 77 of file OgreSkeletonTrack.h.


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