|
My Project
|
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... | |
| CBone1 * | CreateNewBone () |
Public Attributes | |
| CGeosetAnim | geosetAnims |
| int | nFirstBoneID |
| vector< CBone1 * > | bones |
| CEmitters | BlizEmitters2 |
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)
| 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.
| 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.
1.8.12