My Project
Public Member Functions | Public Attributes | List of all members
ParaEngine::CSkeleton Class Reference

Each x file model must has a skeleton(including static object) A skeleton contains a collection of bones. More...

#include <Bone.h>

Public Member Functions

void Cleanup ()
 
void ReadGeosetAnims (TypePointer inP, int inSize)
 
void ReadHelpers (TypePointer inP, int inSize)
 
void ReadBones (TypePointer inP, int inSize)
 
void ReadPivotPoints (TypePointer inP, int inSize)
 
void SortBones ()
 
void CalcTransformMatrix (const AnimInfo &animInfo)
 Call this function for every time advance to update the all the bone matrix.
 
float GetTransformMatrix (D3DXMATRIX &mat, float &animAlpha, int *index, int count)
 call this function to get the matrix for a weighted sum of a group of bones. More...
 
CBone1CreateNewBone ()
 

Public Attributes

CGeosetAnim geosetAnims
 
int nFirstBoneID
 
vector< CBone1 * > bones
 
CEmitters BlizEmitters2
 

Detailed Description

Each x file model must has a skeleton(including static object) A skeleton contains a collection of bones.

call CalcTransformMatrix() to update the bone matrix call GetTransformMatrix() for a weighted sum of a bone groups.(skinned animation)

Member Function Documentation

§ GetTransformMatrix()

float CSkeleton::GetTransformMatrix ( D3DXMATRIX &  mat,
float &  animAlpha,
int *  index,
int  count 
)

call this function to get the matrix for a weighted sum of a group of bones.

this is for skinned animation.

it is assumed that weight of multiple bones are evenly distributed.

§ ReadPivotPoints()

void CSkeleton::ReadPivotPoints ( TypePointer  inP,
int  inSize 
)

set offset matrix for each bone set the animation translation keyframe for each bone

set the offset matrix to be a translation matrix of the negation of the pivot point

set the translation animation keyframe so that a component of Pivot[i]-Pivot[i-1] is added to each translation key. If there is no key, we will add one.


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