33 #ifndef WINTERMUTE_XSKINMESH_H 34 #define WINTERMUTE_XSKINMESH_H 36 #include "engines/wintermute/base/gfx/xbuffer.h" 37 #include "engines/wintermute/base/gfx/xfile_loader.h" 38 #include "engines/wintermute/base/gfx/xmath.h" 42 #define DXFVF_XYZ 0x0002 43 #define DXFVF_NORMAL 0x0010 44 #define DXFVF_DIFFUSE 0x0040 45 #define DXFVF_TEX1 0x0100 48 DXDECLUSAGE_NORMAL = 3,
49 DXDECLUSAGE_TEXCOORD = 5,
50 DXDECLUSAGE_TANGENT = 6,
51 DXDECLUSAGE_BINORMAL = 7,
55 DXDECLTYPE_FLOAT2 = 1,
56 DXDECLTYPE_FLOAT3 = 2,
59 #if defined(SCUMMVM_USE_PRAGMA_PACK) 92 char _textureFilename[XMAX_NAME_LEN];
98 uint32 _numInfluences;
103 #if defined(SCUMMVM_USE_PRAGMA_PACK) 109 uint32 _numVertices{};
115 bool create(uint32 vertexCount, uint32 fvf, uint32 boneCount);
117 uint32 getNumBones() {
return _numBones; }
118 bool setBoneName(uint32 boneIdx,
const char *name);
119 char *getBoneName(uint32 boneIdx) {
return _bones[boneIdx]._name; }
120 bool setBoneInfluence(uint32 boneIdx, uint32 numInfluences,
const uint32 *vertices,
const float *weights);
121 DXBone *getBone(uint32 boneIdx);
122 bool setBoneOffsetMatrix(uint32 boneIdx,
const float *boneTransform);
123 DXMatrix *getBoneOffsetMatrix(uint32 boneIdx) {
return &_bones[boneIdx]._transform; }
124 bool updateSkinnedMesh(
const DXMatrix *boneTransforms,
void *srcVertices,
void *dstVertices);
137 struct DXVertexMetadata {
140 uint32 _firstSharedIndex;
143 static int compareVertexKeys(
const void *a,
const void *b);
147 bool create(uint32 numFaces, uint32 numVertices, uint32 fvf);
149 bool cloneMesh(
DXMesh **cloneMeshOut);
150 uint32 getNumFaces() {
return _numFaces; }
151 uint32 getNumVertices() {
return _numVertices; }
152 uint32 getFVF() {
return _fvf; }
153 DXBuffer getVertexBuffer() {
return _vertexBuffer; }
154 DXBuffer getIndexBuffer() {
return _indexBuffer; }
155 DXBuffer getAtribBuffer() {
return _attribBuffer; }
157 bool generateAdjacency(uint32 *adjacency);
161 uint32 DXGetFVFVertexSize(uint32 fvf);
Definition: xskinmesh.h:127
Definition: xskinmesh.h:95
Definition: xskinmesh.h:86
Definition: xskinmesh.h:63
Definition: xskinmesh.h:107
Definition: xskinmesh.h:71
Definition: xskinmesh.h:76
Definition: xfile_loader.h:459
Definition: achievements_tables.h:27