5 #include "ModelUtils.h" 6 #include "GeosetAnim.h" 34 D3DXQUATERNION outTan;
63 int GetGeosetID() {
return geosetID; };
64 int GetGeosetAnimID() {
return geosetAnimID; };
65 void SetGeosetAlpha(
float alpha) {geosetAnimAlpha=alpha;};
66 float GetGeosetAlpha() {
return geosetAnimAlpha;};
68 char* GetBoneName() {
return boneName; };
69 int GetObjectID() {
return objectID; };
70 int GetParentID() {
return parentID; };
72 D3DXMATRIX* GetFinalTransformMatrix() {
return &finalMatrix; };
73 D3DXMATRIX* GetCombinedTransformMatrix() {
return &combinedMatrix; };
74 D3DXMATRIX* CalcTransformMatrix(D3DXVECTOR3* center,
const AnimInfo& animInfo,
const D3DXMATRIX* parentMatrix);
76 D3DXMATRIX* TransformMatrixMultiply(
const D3DXMATRIX* matrix);
79 bool GetTransferMatrix(D3DXVECTOR3* vec,
const AnimInfo& animInfo);
80 bool GetTransferMatrixNoneBlending(D3DXVECTOR3* vec,
const AnimInfo& animInfo);
81 bool GetRotationMatrix(D3DXQUATERNION* quat,
const AnimInfo& animInfo);
82 bool GetRotationMatrixNoneBlending(D3DXQUATERNION* quat,
const AnimInfo& animInfo);
83 bool GetScaleMatrix(D3DXVECTOR3* vec,
const AnimInfo& animInfo);
84 bool GetScaleMatrixNoneBlending(D3DXVECTOR3* vec,
const AnimInfo& animInfo);
85 bool CheckHideByScale(
const AnimInfo& animInfo);
120 int keyFrameCount[MAX_MOTION];
122 int lineType[MAX_MOTION];
123 void* keyFrames[MAX_MOTION];
128 float geosetAnimAlpha;
144 D3DXMATRIX* GetFinalTransformMatrix() {
return &transformMatrix; };
145 D3DXMATRIX* CalcTransformMatrix(D3DXVECTOR3* center,
const AnimInfo& animInfo,
const D3DXMATRIX* parentMatrix);
149 bool GetTransferMatrix(D3DXVECTOR3* vec,
const AnimInfo& animInfo);
150 bool GetRotationMatrix(D3DXQUATERNION* quat,
const AnimInfo& animInfo);
151 bool GetScaleMatrix(D3DXVECTOR3* vec,
const AnimInfo& animInfo);
152 bool CheckHideByScale(
const AnimInfo& animInfo);
175 int keyFrameCount[MAX_MOTION];
177 int lineType[MAX_MOTION];
178 void* keyFrames[MAX_MOTION];
180 D3DXMATRIX transformMatrix;
187 #define MDX_MAX_PARTICLES 100 219 void Render(D3DXMATRIX *parentMatrix, D3DXVECTOR3 *center,
const AnimInfo& animInfo,
long texbindid,
long texwidth,
long texlength);
220 void SetCurrentOptions(
const AnimInfo& animInfo);
222 char* GetName() {
return eName; };
223 long GetObjectID() {
return objectID; };
224 long GetParentID() {
return parentID; };
246 float curEmissionRate;
263 unsigned char Alpha1, Alpha2, Alpha3;
264 float ScalingX, ScalingY, ScalingZ;
265 long LifeSpanUVAnim1, LifeSpanUVAnim2, LifeSpanUVAnim3;
266 long DecayUVAnim1, DecayUVAnim2, DecayUVAnim3;
267 long TailUVAnim1, TailUVAnim2, TailUVAnim3;
268 long TailDecayUVAnim1, TailDecayUVAnim2, TailDecayUVAnim3;
295 #define MAX_NUM_EMMITTERS 4 308 UINT nEmitterArraySize;
331 void CalcTransformMatrix(
const AnimInfo& animInfo);
333 float GetTransformMatrix(D3DXMATRIX &mat,
float& animAlpha,
int *index,
int count);
338 void CalcTransformMatrix(
const AnimInfo& animInfo,D3DXMATRIX *parentMatrix,
int parentID);
344 vector <CBone1*> bones;
D3DXMATRIX finalMatrix
offsetMatrix will transform original mesh vertice from their bone pose to local bone space...
Definition: Bone.h:112
D3DXMATRIX combinedMatrix
the localMatrix in the bone pose. localMatrix is used if no animation or translation keyframes is ava...
Definition: Bone.h:110
Each x file model must has a skeleton(including static object) A skeleton contains a collection of bo...
Definition: Bone.h:317
different physics engine has different winding order.
Definition: EventBinding.h:32
D3DXMATRIX localMatrix
the object ID of its next bone in the skeleton.-1 if it is the last bone
Definition: Bone.h:109
LineType
Linear Type (0:don't interpret;1:linear;2:hermite;3:bezier)
Definition: Bone.h:90
The class stands for the bone or frame in the character's skeleton.
Definition: Bone.h:55
Model textures are managed separately with the paraengine asset manager's texture pool...
Definition: Texture.h:32
For animating the alpha of bones.
Definition: GeosetAnim.h:43
Definition: ModelUtils.h:7
This is the ParaX mesh and animation file format model.
Definition: MDXModel.h:61
MotionType
LiXizhi: this is the order defined by X file template.
Definition: Bone.h:99
D3DXMATRIX offsetMatrix
combinedMatrix will transform the vertices from the local bone space to its character space...
Definition: Bone.h:111
int parentID
the object ID, which is the same as the its index in the skeleton list
Definition: Bone.h:107
int nextID
the object ID of its parent bone
Definition: Bone.h:108
this is the most oftenly used.
Definition: Bone.h:93