00001 #include "GXStandardDefines.h"
00002 #include "GXVertex.h"
00003
00004
00005
00006
00007 bool GXCalcMeshNormals(GXVertex* pVerts, unsigned short* pIndices,
00008 UINT uVertCount, UINT uIndexCount);
00009
00010 inline void GXCalcNormal(D3DXVECTOR3& vOut,
00011 D3DXVECTOR3& vOne,
00012 D3DXVECTOR3& vTwo,
00013 D3DXVECTOR3& vThree)
00014 {
00015 D3DXVECTOR3 vTwoMinusOne=vTwo-vOne;
00016 D3DXVECTOR3 vThreeMinusOne=vThree-vOne;
00017
00018 D3DXVec3Cross(&vOut,&vTwoMinusOne,&vThreeMinusOne);
00019 D3DXVec3Normalize(&vOut, &vOut);
00020 }
00021
00022
00023
00024 bool CleanMesh(ID3DXMesh** ppInOut);
00025 bool TesselateMesh(ID3DXMesh** ppInOut, UINT uMaxFaceCount);
00026 bool CheckBoneIndices(ID3DXMesh* pInOut);
00027
00028 bool GXCenterMesh(ID3DXMesh* pMesh, float fSize);
00029
00030