source: Include/directx9/d3dx9mesh.sbp@ 32

Last change on this file since 32 was 1, checked in by (none), 18 years ago
File size: 30.0 KB
Line 
1'd3dx9mesh.sbp
2
3
4#ifndef _INC_D3DX9MESH
5#define _INC_D3DX9MESH
6
7
8' patch mesh can be quads or tris
9Const Enum D3DXPATCHMESHTYPE
10 D3DXPATCHMESH_RECT = &H001
11 D3DXPATCHMESH_TRI = &H002
12 D3DXPATCHMESH_NPATCH = &H003
13
14 D3DXPATCHMESH_FORCE_DWORD = &H7FFFFFFF
15End Enum
16
17' Mesh options - lower 3 bytes only, upper byte used by _D3DXMESHOPT option flags
18Const Enum D3DXMESH
19 D3DXMESH_32BIT = &H001 'If set, then use 32 bit indices, if not set use 16 bit indices.
20 D3DXMESH_DONOTCLIP = &H002 'Use D3DUSAGE_DONOTCLIP for VB & IB.
21 D3DXMESH_POINTS = &H004 'Use D3DUSAGE_POINTS for VB & IB.
22 D3DXMESH_RTPATCHES = &H008 'Use D3DUSAGE_RTPATCHES for VB & IB.
23 D3DXMESH_NPATCHES = &H4000 'Use D3DUSAGE_NPATCHES for VB & IB.
24 D3DXMESH_VB_SYSTEMMEM = &H010 'Use D3DPOOL_SYSTEMMEM for VB. Overrides D3DXMESH_MANAGEDVERTEXBUFFER
25 D3DXMESH_VB_MANAGED = &H020 'Use D3DPOOL_MANAGED for VB.
26 D3DXMESH_VB_WRITEONLY = &H040 'Use D3DUSAGE_WRITEONLY for VB.
27 D3DXMESH_VB_DYNAMIC = &H080 'Use D3DUSAGE_DYNAMIC for VB.
28 D3DXMESH_VB_SOFTWAREPROCESSING = &H8000 'Use D3DUSAGE_SOFTWAREPROCESSING for VB.
29 D3DXMESH_IB_SYSTEMMEM = &H100 'Use D3DPOOL_SYSTEMMEM for IB. Overrides D3DXMESH_MANAGEDINDEXBUFFER
30 D3DXMESH_IB_MANAGED = &H200 'Use D3DPOOL_MANAGED for IB.
31 D3DXMESH_IB_WRITEONLY = &H400 'Use D3DUSAGE_WRITEONLY for IB.
32 D3DXMESH_IB_DYNAMIC = &H800 'Use D3DUSAGE_DYNAMIC for IB.
33 D3DXMESH_IB_SOFTWAREPROCESSING = &H10000 'Use D3DUSAGE_SOFTWAREPROCESSING for IB.
34
35 D3DXMESH_VB_SHARE = &H1000 'Valid for Clone* calls only, forces cloned mesh/pmesh to share vertex buffer
36
37 D3DXMESH_USEHWONLY = &H2000 'Valid for ID3DXSkinInfo::ConvertToBlendedMesh
38
39 'Helper options
40 D3DXMESH_SYSTEMMEM = &H110 'D3DXMESH_VB_SYSTEMMEM | D3DXMESH_IB_SYSTEMMEM
41 D3DXMESH_MANAGED = &H220 'D3DXMESH_VB_MANAGED | D3DXMESH_IB_MANAGED
42 D3DXMESH_WRITEONLY = &H440 'D3DXMESH_VB_WRITEONLY | D3DXMESH_IB_WRITEONLY
43 D3DXMESH_DYNAMIC = &H880 'D3DXMESH_VB_DYNAMIC | D3DXMESH_IB_DYNAMIC
44 D3DXMESH_SOFTWAREPROCESSING = &H18000 'D3DXMESH_VB_SOFTWAREPROCESSING | D3DXMESH_IB_SOFTWAREPROCESSING
45End Enum
46
47' patch mesh options
48Const Enum D3DXPATCHMESH
49 D3DXPATCHMESH_DEFAULT = 000
50End Enum
51
52Const Enum D3DXCLEANTYPE
53 D3DXCLEAN_BACKFACING = &H00000001
54 D3DXCLEAN_BOWTIES = &H00000002
55
56 ' Helper options
57 D3DXCLEAN_SKINNING = &H00000001 ' Bowtie cleaning modifies geometry and breaks skinning
58 D3DXCLEAN_OPTIMIZATION = &H00000001
59 D3DXCLEAN_SIMPLIFICATION= &H00000003
60End Enum
61
62Type D3DXATTRIBUTERANGE
63 AttribId As DWord
64 FaceStart As DWord
65 FaceCount As DWord
66 VertexStart As DWord
67 VertexCount As DWord
68End Type
69
70Type D3DXMATERIAL
71 MatD3D As D3DMATERIAL9
72 pTextureFilename As BytePtr
73End Type
74
75Const Enum D3DXEFFECTDEFAULTTYPE
76 D3DXEDT_STRING = &H1 ' pValue points to a null terminated ASCII string
77 D3DXEDT_FLOATS = &H2 ' pValue points to an array of floats - number of floats is NumBytes / sizeof(float)
78 D3DXEDT_DWORD = &H3 ' pValue points to a DWORD
79
80 D3DXEDT_FORCEDWORD = &H7FFFFFFF
81End Enum
82
83Type D3DXEFFECTDEFAULT
84 pParamName As BytePtr
85 _Type As D3DXEFFECTDEFAULTTYPE
86 NumBytes As DWord
87 pValue As VoidPtr
88End Type
89
90Type D3DXEFFECTINSTANCE
91 pEffectFilename As BytePtr
92 NumDefaults As DWord
93 pDefaults As *D3DXEFFECTDEFAULT
94End Type
95
96Type D3DXATTRIBUTEWEIGHTS
97 Position As Single
98 Boundary As Single
99 Normal As Single
100 Diffuse As Single
101 Specular As Single
102 Texcoord[7] As Single
103 Tangent As Single
104 Binormal As Single
105End Type
106
107Type D3DXWELDEPSILONS
108 Position As Single
109 BlendWeights As Single
110 Normal As Single
111 PSize As Single
112 Specular As Single
113 Diffuse As Single
114 Texcoord[7] As Single
115 Tangent As Single
116 Binormal As Single
117 TessFactor As Single
118End Type
119
120
121Class ID3DXBaseMesh
122 Inherits IUnknown
123Public
124 'ID3DXBaseMesh
125 Abstract Function DrawSubset(AttribId As DWord) As DWord
126 Abstract Function GetNumFaces() As DWord
127 Abstract Function GetNumVertices() As DWord
128 Abstract Function GetFVF() As DWord
129 Abstract Function GetDeclaration(Declaration As *D3DVERTEXELEMENT9) As DWord
130 Abstract Function GetNumBytesPerVertex() As DWord
131 Abstract Function GetOptions() As DWord
132 Abstract Function GetDevice(ppDevice As *LPDIRECT3DDEVICE9) As DWord
133 Abstract Function CloneMeshFVF(Options As DWord, FVF As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppCloneMesh As **ID3DXMesh) As DWord
134 Abstract Function CloneMesh(Options As DWord, pDeclaration As *D3DVERTEXELEMENT9, pD3DDevice As LPDIRECT3DDEVICE9, ppCloneMesh As **ID3DXMesh) As DWord
135 Abstract Function GetVertexBuffer(ppVB As **IDirect3DVertexBuffer9) As DWord
136 Abstract Function GetIndexBuffer(ppIB As **IDirect3DIndexBuffer9) As DWord
137 Abstract Function LockVertexBuffer(Flags As DWord, ppData As VoidPtr) As DWord
138 Abstract Function UnlockVertexBuffer() As DWord
139 Abstract Function LockIndexBuffer(Flags As DWord, ppData As VoidPtr) As DWord
140 Abstract Function UnlockIndexBuffer() As DWord
141 Abstract Function GetAttributeTable(pAttribTable As *D3DXATTRIBUTERANGE, pAttribTableSize As DWordPtr) As DWord
142
143 Abstract Function ConvertPointRepsToAdjacency(pPRep As DWordPtr, pAdjacency As DWordPtr) As DWord
144 Abstract Function ConvertAdjacencyToPointReps(pAdjacency As DWordPtr, pPRep As DWordPtr) As DWord
145 Abstract Function GenerateAdjacency(Epsilon As Single, pAdjacency As DWordPtr) As DWord
146
147 Abstract Function UpdateSemantics(Declaration As *D3DVERTEXELEMENT9) As DWord
148End Class
149TypeDef LPD3DXBASEMESH = *ID3DXBaseMesh
150
151
152Class ID3DXMesh
153 Inherits IUnknown
154Public
155 'ID3DXBaseMesh
156 Abstract Function DrawSubset(AttribId As DWord) As DWord
157 Abstract Function GetNumFaces() As DWord
158 Abstract Function GetNumVertices() As DWord
159 Abstract Function GetFVF() As DWord
160 Abstract Function GetDeclaration(Declaration As *D3DVERTEXELEMENT9) As DWord
161 Abstract Function GetNumBytesPerVertex() As DWord
162 Abstract Function GetOptions() As DWord
163 Abstract Function GetDevice(ppDevice As *LPDIRECT3DDEVICE9) As DWord
164 Abstract Function CloneMeshFVF(Options As DWord, FVF As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppCloneMesh As **ID3DXMesh) As DWord
165 Abstract Function CloneMesh(Options As DWord, pDeclaration As *D3DVERTEXELEMENT9, pD3DDevice As LPDIRECT3DDEVICE9, ppCloneMesh As **ID3DXMesh) As DWord
166 Abstract Function GetVertexBuffer(ppVB As **IDirect3DVertexBuffer9) As DWord
167 Abstract Function GetIndexBuffer(ppIB As **IDirect3DIndexBuffer9) As DWord
168 Abstract Function LockVertexBuffer(Flags As DWord, ppData As VoidPtr) As DWord
169 Abstract Function UnlockVertexBuffer() As DWord
170 Abstract Function LockIndexBuffer(Flags As DWord, ppData As VoidPtr) As DWord
171 Abstract Function UnlockIndexBuffer() As DWord
172 Abstract Function GetAttributeTable(pAttribTable As *D3DXATTRIBUTERANGE, pAttribTableSize As DWordPtr) As DWord
173
174 Abstract Function ConvertPointRepsToAdjacency(pPRep As DWordPtr, pAdjacency As DWordPtr) As DWord
175 Abstract Function ConvertAdjacencyToPointReps(pAdjacency As DWordPtr, pPRep As DWordPtr) As DWord
176 Abstract Function GenerateAdjacency(Epsilon As Single, pAdjacency As DWordPtr) As DWord
177
178 Abstract Function UpdateSemantics(Declaration As *D3DVERTEXELEMENT9) As DWord
179
180 'ID3DXMesh
181 Abstract Function LockAttributeBuffer(Flags As DWord, ppData As VoidPtr) As DWord
182 Abstract Function UnlockAttributeBuffer() As DWord
183 Abstract Function Optimize(Flags As DWord, pAdjacencyIn As DWordPtr, pAdjacencyOut As DWordPtr, pFaceRemap As DWordPtr, ppVertexRemap As **ID3DXBuffer, ppOptMesh As **ID3DXMesh) As DWord
184 Abstract Function OptimizeInplace(Flags As DWord, pAdjacencyIn As DWordPtr, pAdjacencyOut As DWordPtr, pFaceRemap As DWordPtr, ppVertexRemap As **ID3DXBuffer) As DWord
185 Abstract Function SetAttributeTable(pAttribTable As *D3DXATTRIBUTERANGE, cAttribTableSize As DWord) As DWord
186End Class
187TypeDef LPD3DXMESH = *ID3DXMesh
188
189
190Class ID3DXPMesh
191 Inherits IUnknown
192Public
193 'ID3DXBaseMesh
194 Abstract Function DrawSubset(AttribId As DWord) As DWord
195 Abstract Function GetNumFaces() As DWord
196 Abstract Function GetNumVertices() As DWord
197 Abstract Function GetFVF() As DWord
198 Abstract Function GetDeclaration(Declaration As *D3DVERTEXELEMENT9) As DWord
199 Abstract Function GetNumBytesPerVertex() As DWord
200 Abstract Function GetOptions() As DWord
201 Abstract Function GetDevice(ppDevice As *LPDIRECT3DDEVICE9) As DWord
202 Abstract Function CloneMeshFVF(Options As DWord, FVF As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppCloneMesh As **ID3DXMesh) As DWord
203 Abstract Function CloneMesh(Options As DWord, pDeclaration As *D3DVERTEXELEMENT9, pD3DDevice As LPDIRECT3DDEVICE9, ppCloneMesh As **ID3DXMesh) As DWord
204 Abstract Function GetVertexBuffer(ppVB As **IDirect3DVertexBuffer9) As DWord
205 Abstract Function GetIndexBuffer(ppIB As **IDirect3DIndexBuffer9) As DWord
206 Abstract Function LockVertexBuffer(Flags As DWord, ppData As VoidPtr) As DWord
207 Abstract Function UnlockVertexBuffer() As DWord
208 Abstract Function LockIndexBuffer(Flags As DWord, ppData As VoidPtr) As DWord
209 Abstract Function UnlockIndexBuffer() As DWord
210 Abstract Function GetAttributeTable(pAttribTable As *D3DXATTRIBUTERANGE, pAttribTableSize As DWordPtr) As DWord
211
212 Abstract Function ConvertPointRepsToAdjacency(pPRep As DWordPtr, pAdjacency As DWordPtr) As DWord
213 Abstract Function ConvertAdjacencyToPointReps(pAdjacency As DWordPtr, pPRep As DWordPtr) As DWord
214 Abstract Function GenerateAdjacency(Epsilon As Single, pAdjacency As DWordPtr) As DWord
215
216 Abstract Function UpdateSemantics(Declaration As *D3DVERTEXELEMENT9) As DWord
217
218 'ID3DXPMesh
219 Abstract Function ClonePMeshFVF(Options As DWord, FVF As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppCloneMesh As **ID3DXMesh) As DWord
220 Abstract Function ClonePMesh(Options As DWord, pDeclaration As *D3DVERTEXELEMENT9, pD3DDevice As LPDIRECT3DDEVICE9, ppCloneMesh As **ID3DXMesh) As DWord
221 Abstract Function SetNumFaces(Faces As DWord) As DWord
222 Abstract Function SetNumVertices(Vertices As DWord) As DWord
223 Abstract Function GetMaxFaces() As DWord
224 Abstract Function GetMinFaces() As DWord
225 Abstract Function GetMaxVertices() As DWord
226 Abstract Function GetMinVertices() As DWord
227 Abstract Function Save(pStream As *IStream, pMaterials As *D3DXMATERIAL, pEffectInstances As *D3DXEFFECTINSTANCE, NumMaterials As DWord) As DWord
228 Abstract Function Optimize(Flags As DWord, pAdjacencyOut As DWordPtr, pFaceRemap As DWordPtr, ppVertexRemap As **ID3DXBuffer, ppOptMesh As **ID3DXMesh) As DWord
229 Abstract Function OptimizeBaseLOD(Flags As DWord, pFaceRemap As DWordPtr) As DWord
230 Abstract Function TrimByFaces(NewFacesMin As DWord, NewFacesMax As DWord, rgiFaceRemap As DWordPtr, rgiVertRemap As DWordPtr) As DWord
231 Abstract Function TrimByVertices(NewVerticesMin As DWord, NewVerticesMax As DWord, rgiFaceRemap As DWordPtr, rgiVertRemap As DWord) As DWord
232 Abstract Function GetAdjacency(pAdjacency As DWordPtr) As DWord
233 Abstract Function GenerateVertexHistory(pVertexHistory As DWordPtr) As DWord
234End Class
235TypeDef LPD3DXPMESH = *ID3DXPMesh
236
237
238Class ID3DXSPMesh
239 Inherits IUnknown
240Public
241 'ID3DXSPMesh
242 Abstract Function GetNumFaces() As DWord
243 Abstract Function GetNumVertices() As DWord
244 Abstract Function GetFVF() As DWord
245 Abstract Function GetDeclaration(Declaration As *D3DVERTEXELEMENT9) As DWord
246 Abstract Function GetOptions() As DWord
247 Abstract Function GetDevice(ppDevice As *LPDIRECT3DDEVICE9) As DWord
248 Abstract Function CloneMeshFVF(Options As DWord, FVF As DWord, pD3DDevice As LPDIRECT3DDEVICE9, pAdjacencyOut As DWordPtr, pVertexRemapOut As DWordPtr, ppCloneMesh As **ID3DXMesh) As DWord
249 Abstract Function CloneMesh(Options As DWord, pDeclaration As *D3DVERTEXELEMENT9, pD3DDevice As LPDIRECT3DDEVICE9, pAdjacencyOut As DWordPtr, pVertexRemapOut As DWordPtr, ppCloneMesh As **ID3DXMesh) As DWord
250 Abstract Function ClonePMeshFVF(Options As DWord, FVF As DWord, pD3DDevice As LPDIRECT3DDEVICE9, pVertexRemapOut As DWordPtr, pErrorsByFace As SinglePtr, ppCloneMesh As **ID3DXMesh) As DWord
251 Abstract Function ClonePMesh(Options As DWord, pDeclaration As *D3DVERTEXELEMENT9, pD3DDevice As LPDIRECT3DDEVICE9, pVertexRemapOut As DWordPtr, pErrorsbyFace As SinglePtr, ppCloneMesh As **ID3DXMesh) As DWord
252 Abstract Function ReduceFaces(Faces As DWord) As DWord
253 Abstract Function ReduceVertices(Vertices As DWord) As DWord
254 Abstract Function GetMaxFaces() As DWord
255 Abstract Function GetMaxVertices() As DWord
256 Abstract Function GetVertexAttributeWeights(pVertexAttributeWeights As *D3DXATTRIBUTEWEIGHTS) As DWord
257 Abstract Function GetVertexWeights(pVertexWeights As SinglePtr) As DWord
258End Class
259TypeDef LPD3DXSPMESH = *ID3DXSPMesh
260
261
262' Subset of the mesh that has the same attribute and bone combination.
263' This subset can be rendered in a single draw call
264Type D3DXBONECOMBINATION
265 AttribId As DWord
266 FaceStart As DWord
267 FaceCount As DWord
268 VertexStart As DWord
269 VertexCount As DWord
270 BoneId As DWordPtr
271End Type
272
273Type D3DXPATCHINFO
274 PatchType As D3DXPATCHMESHTYPE
275 Degree As D3DDEGREETYPE
276 Basis As D3DBASISTYPE
277End Type
278
279
280Class ID3DXPatchMesh
281 Inherits IUnknown
282Public
283 'ID3DXPatchMesh
284
285 'Return creation parameters
286 Abstract Function GetNumPatches() As DWord
287 Abstract Function GetNumVertices() As DWord
288 Abstract Function GetDeclaration(Declaration As *D3DVERTEXELEMENT9) As DWord
289 Abstract Function GetControlVerticesPerPatch() As DWord
290 Abstract Function GetOptions() As DWord
291 Abstract Function GetDevice(ppDevice As *LPDIRECT3DDEVICE9) As DWord
292 Abstract Function GetPatchInfo(PatchInfo As *D3DXPATCHINFO) As DWord
293
294 'Control mesh access
295 Abstract Function GetVertexBuffer(ppVB As **IDirect3DVertexBuffer9) As DWord
296 Abstract Function GetIndexBuffer(ppIB As **IDirect3DIndexBuffer9) As DWord
297 Abstract Function LockVertexBuffer(flags As DWord, ppData As DWordPtr) As DWord
298 Abstract Function UnlockVertexBuffer() As DWord
299 Abstract Function LockIndexBuffer(flags As DWord, ppData As DWordPtr) As DWord
300 Abstract Function UnlockIndexBuffer() As DWord
301 Abstract Function LockAttributeBuffer(flags As DWord, ppData As DWordPtr) As DWord
302 Abstract Function UnlockAttributeBuffer() As DWord
303
304 Abstract Function GetTessSize(fTessLevel As Single, Adaptive As DWord, NumTriangles As DWordPtr, NumVertices As DWordPtr) As DWord
305 Abstract Function GenerateAdjacency(Tolerance As Single) As DWord
306 Abstract Function CloneMesh(Options As DWord, pDecl As *D3DVERTEXELEMENT9, pMesh As *ID3DXPatchMesh) As DWord
307 Abstract Function Optimize(flags As DWord) As DWord
308 Abstract Function SetDisplaceParam(pTexture As *IDirect3DBaseTexture9, MinFilter As D3DTEXTUREFILTERTYPE, MagFilter As D3DTEXTUREFILTERTYPE, MipFilter As D3DTEXTUREFILTERTYPE, Wrap As D3DTEXTUREADDRESS, dwLODBias As DWord) As DWord
309 Abstract Function GetDisplaceParam(ppTexture As **IDirect3DBaseTexture9, pMinFilter As *D3DTEXTUREFILTERTYPE, pMagFilter As *D3DTEXTUREFILTERTYPE, pMipFilter As *D3DTEXTUREFILTERTYPE, pWrap As *D3DTEXTUREADDRESS, lpdwLODBias As DWordPtr) As DWord
310 Abstract Function Tessellate(fTessLevel As Single, pMesh As *ID3DXMesh) As DWord
311 Abstract Function TessellateAdaptive(pTrans As *D3DXVECTOR4, dwMaxTessLevel As DWord, dwMinTessLevel As DWord, pMesh As *ID3DXMesh) As DWord
312End Class
313TypeDef LPD3DXPATCHMESH = *ID3DXPatchMesh
314
315
316'---------------
317' ID3DXSkinInfo
318'---------------
319
320Class ID3DXSkinInfo
321 Inherits IUnknown
322Public
323 'Specify the which vertices do each bones influence and by how much
324 Abstract Function SetBoneInfluence(bone As DWord, numInfluences As DWord, vertices As DWordPtr, weights As SinglePtr) As DWord
325 Abstract Function SetBoneVertexInfluence(boneNum As DWord, influenceNum As DWord, weight As Single) As DWord
326 Abstract Function GetNumBoneInfluences(bone As DWord) As DWord
327 Abstract Function GetBoneInfluence(bone As DWord, vertices As DWordPtr, weights As SinglePtr) As DWord
328 Abstract Function GetBoneVertexInfluence(boneNum As DWord, influenceNum As DWord, pWeight As SinglePtr, pVertexNum As DWordPtr) As DWord
329 Abstract Function GetMaxVertexInfluences(maxVertexInfluences As DWordPtr) As DWord
330 Abstract Function GetNumBones() As DWord
331 Abstract Function FindBoneVertexInfluenceIndex(boneNum As DWord, vertexNum As DWord, pInfluenceIndex As DWordPtr) As DWord
332
333 'This gets the max face influences based on a triangle mesh with the specified index buffer
334 Abstract Function GetMaxFaceInfluences(pIB As *IDirect3DIndexBuffer9, NumFaces As DWord, maxFaceInfluences As DWordPtr) As DWord
335
336 'Set min bone influence. Bone influences that are smaller than this are ignored
337 Abstract Function SetMinBoneInfluence(MinInfl As Single) As DWord
338 'Get min bone influence.
339 Abstract Function GetMinBoneInfluence() As Single
340
341 'Bone names are returned by D3DXLoadSkinMeshFromXof. They are not used by any other method of this object
342 Abstract Function SetBoneName(Bone As DWord, pName As BytePtr) As DWord
343 Abstract Function GetBoneName(Bone As DWord) As BytePtr
344
345 'Bone offset matrices are returned by D3DXLoadSkinMeshFromXof. They are not used by any other method of this object
346 Abstract Function SetBoneOffsetMatrix(Bone As DWord, pBoneTransform As *D3DXMATRIX) As DWord
347 Abstract Function GetBoneOffsetMatrix(Bone As DWord) As *D3DXMATRIX
348
349 'Clone a skin info object
350 Abstract Function Clone(ppSkinInfo As **ID3DXSkinInfo) As DWord
351
352 'Update bone influence information to match vertices after they are reordered. This should be called
353 'if the target vertex buffer has been reordered externally.
354 Abstract Function Remap(NumVertices As DWord, pVertexRemap As DWordPtr) As DWord
355
356 'These methods enable the modification of the vertex layout of the vertices that will be skinned
357 Abstract Function SetFVF(FVF As DWord) As DWord
358 Abstract Function SetDeclaration(pDeclaration As *D3DVERTEXELEMENT9) As DWord
359 Abstract Function GetFVF() As DWord
360 Abstract Function GetDeclaration(Declaration As *D3DVERTEXELEMENT9) As DWord
361
362 'Apply SW skinning based on current pose matrices to the target vertices.
363 Abstract Function UpdateSkinnedMesh(pBoneTransforms As *D3DXMATRIX, pBoneInvTransposeTransforms As *D3DXMATRIX, pVerticesSrc As VoidPtr, pVerticesDst As VoidPtr) As DWord
364
365 'Takes a mesh and returns a new mesh with per vertex blend weights and a bone combination
366 'table that describes which bones affect which subsets of the mesh
367 Abstract Function ConvertToBlendedMesh(pMesh As *ID3DXMesh, Options As DWord, pAdjacencyIn As DWordPtr, pAdjacencyOut As DWordPtr, pFaceRemap As DWordPtr, ppVertexRemap As **ID3DXBuffer, pMaxFaceInfl As DWordPtr, pNumBoneCombinations As DWordPtr, ppBoneCombinationTable As **ID3DXBuffer, ppMesh As **ID3DXMesh) As DWord
368
369 'Takes a mesh and returns a new mesh with per vertex blend weights and indices
370 'and a bone combination table that describes which bones palettes affect which subsets of the mesh
371 Abstract Function ConvertToIndexedBlendedMesh(pMesh As *ID3DXMesh, Options As DWord, paletteSize As DWord, pAdjacencyIn As DWordPtr, pAdjacencyOut As DWordPtr, pFaceRemap As DWordPtr, ppVertexRemap As **ID3DXBuffer, pMaxVertexInfl As DWordPtr, pNumBoneCombinations As DWordPtr, ppBoneCombinationTable As **ID3DXBuffer, ppMesh As **ID3DXMesh) As DWord
372End Class
373TypeDef LPD3DXSKININFO = *ID3DXSkinInfo
374
375Declare Function D3DXCreateMesh Lib "dx9abm" Alias "D3DXCreateMesh_abm" (NumFaces As DWord, NumVertices As DWord, Options As DWord, pDeclaration As *D3DVERTEXELEMENT9, pD3DDevice As LPDIRECT3DDEVICE9, ppMesh As **ID3DXMesh) As DWord
376Declare Function D3DXCreateMeshFVF Lib "dx9abm" Alias "D3DXCreateMeshFVF_abm" (NumFaces As DWord, NumVertices As DWord, Options As DWord, FVF As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppMesh As **ID3DXMesh) As DWord
377Declare Function D3DXCreateSPMesh Lib "dx9abm" Alias "D3DXCreateSPMesh_abm" (pMesh As *ID3DXMesh, pAdjacency As DWordPtr, pVertexAttributeWeights As *D3DXATTRIBUTEWEIGHTS, ppSMesh As **ID3DXSPMesh) As DWord
378Declare Function D3DXCleanMesh Lib "dx9abm" Alias "D3DXCleanMesh_abm" (CleanType As D3DXCLEANTYPE, pMeshIn As *ID3DXMesh, pAdjacencyIn As DWordPtr, ppMeshOut As **ID3DXMesh, pAdjacencyOut As DWordPtr, ppErrorsAndWarnings As **ID3DXBuffer) As DWord
379Declare Function D3DXValidMesh Lib "dx9abm" Alias "D3DXValidMesh_abm" (pMeshIn As *ID3DXMesh, pAdjacency As DWordPtr, ppErrorsAndWarnings As **ID3DXBuffer) As DWord
380Declare Function D3DXGeneratePMesh Lib "dx9abm" Alias "D3DXGeneratePMesh_abm" (pMesh As *ID3DXMesh, pAdjacency As DWordPtr, pVertexAttributeWeights As *D3DXATTRIBUTEWEIGHTS, MinValue As DWord, Options As DWord, ppPMesh As **ID3DXPMesh) As DWord
381Declare Function D3DXSimplifyMesh Lib "dx9abm" Alias "D3DXSimplifyMesh_abm" (pMesh As *ID3DXMesh, pAdjacency As DWordPtr, pVertexAttributeWeights As *D3DXATTRIBUTEWEIGHTS, pVertexWeights As SinglePtr, MinValue As DWord, Options As DWord, ppMesh As **ID3DXMesh) As DWord
382Declare Function D3DXComputeBoundingSphere Lib "dx9abm" Alias "D3DXComputeBoundingSphere_abm" (pFirstPosition As *D3DXVECTOR3, NumVertices As DWord, dwStride As DWord, pCenter As *D3DXVECTOR3, pRadius As SinglePtr) As DWord
383Declare Function D3DXComputeBoundingBox Lib "dx9abm" Alias "D3DXComputeBoundingBox_abm" (pFirstPosition As *D3DXVECTOR3, NumVertices As DWord, dwStride As DWord, pMin As *D3DXVECTOR3, pMax As *D3DXVECTOR3) As DWord
384Declare Function D3DXComputeNormals Lib "dx9abm" Alias "D3DXComputeNormals_abm" (pMesh As *ID3DXBaseMesh, pAdjacency As DWordPtr) As DWord
385Declare Function D3DXCreateBuffer Lib "dx9abm" Alias "D3DXCreateBuffer_abm" (NumBytes As DWord, ppBuffer As **ID3DXBuffer) As DWord
386Declare Function D3DXLoadMeshFromX Lib "dx9abm" Alias "D3DXLoadMeshFromX_abm" (pFilename As BytePtr, Options As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppAdjacency As VoidPtr, ppMaterials As VoidPtr, ppEffectInstances As VoidPtr, pNumMaterials As DWordPtr, ppMesh As VoidPtr) As DWord
387Declare Function D3DXLoadMeshFromXInMemory Lib "dx9abm" Alias "D3DXLoadMeshFromXInMemory_abm" (Memory As VoidPtr, SizeOfMemory As DWord, Options As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppAdjacency As **ID3DXBuffer, ppMaterials As **ID3DXBuffer, ppEffectInstances As **ID3DXBuffer, pNumMaterials As DWordPtr, ppMesh As *ID3DXMesh) As DWord
388Declare Function D3DXLoadMeshFromXResource Lib "dx9abm" Alias "D3DXLoadMeshFromXResource_abm" (Module As DWord, Name As BytePtr, lpszType As BytePtr, Options As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppAdjacency As **ID3DXBuffer, ppMaterials As **ID3DXBuffer, ppEffectInstances As **ID3DXBuffer, pNumMaterials As DWordPtr, ppMesh As **ID3DXMesh) As DWord
389Declare Function D3DXSaveMeshToX Lib "dx9abm" Alias "D3DXSaveMeshToX_abm" (pFilename As BytePtr, pMesh As *ID3DXMesh, pAdjacency As DWordPtr, pMaterials As *D3DXMATERIAL, pEffectInstances As *D3DXEFFECTINSTANCE, NumMaterials As DWord, Format As DWord) As DWord
390Declare Function D3DXCreatePMeshFromStream Lib "dx9abm" Alias "D3DXCreatePMeshFromStream_abm" (pStream As *IStream, Options As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppMaterials As **ID3DXBuffer, ppEffectInstances As **ID3DXBuffer, pNumMaterials As DWordPtr, ppPMesh As **ID3DXPMesh) As DWord
391Declare Function D3DXCreateSkinInfo Lib "dx9abm" Alias "D3DXCreateSkinInfo_abm" (NumVertices As DWord, pDeclaration As *D3DVERTEXELEMENT9, NumBones As DWord, ppSkinInfo As **ID3DXSkinInfo) As DWord
392Declare Function D3DXCreateSkinInfoFVF Lib "dx9abm" Alias "D3DXCreateSkinInfoFVF_abm" (NumVertices As DWord, FVF As DWord, NumBones As DWord, ppSkinInfo As **ID3DXSkinInfo) As DWord
393
394Declare Function D3DXLoadMeshFromXof Lib "dx9abm" Alias "D3DXLoadMeshFromXof_abm" (pxofMesh As *ID3DXFileData, Options As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppAdjacency As **ID3DXBuffer, ppMaterials As **ID3DXBuffer, ppEffectInstances As **ID3DXBuffer, pNumMaterials As DWordPtr, ppMesh As **ID3DXMesh) As DWord
395Declare Function D3DXLoadSkinMeshFromXof Lib "dx9abm" Alias "D3DXLoadSkinMeshFromXof_abm" (pxofMesh As *ID3DXFileData, Options As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppAdjacency As **ID3DXBuffer, ppMaterials As **ID3DXBuffer, ppEffectInstances As **ID3DXBuffer, pMatOut As DWordPtr, ppSkinInfo As **ID3DXSkinInfo, ppMesh As **ID3DXMesh) As DWord
396Declare Function D3DXCreateSkinInfoFromBlendedMesh Lib "dx9abm" Alias "D3DXCreateSkinInfoFromBlendedMesh_abm" (pMesh As *ID3DXBaseMesh, NumBones As DWord, pBoneCombinationTable As *D3DXBONECOMBINATION, ppSkinInfo As **ID3DXSkinInfo) As DWord
397Declare Function D3DXTessellateNPatches Lib "dx9abm" Alias "D3DXTessellateNPatches_abm" (pMeshIn As *ID3DXMesh, pAdjacencyIn As DWordPtr, NumSegs As Single, QuadraticInterpNormals As Long, ppMeshOut As **ID3DXMesh, ppAdjacencyOut As **ID3DXBuffer) As DWord
398Declare Function D3DXGenerateOutputDecl Lib "dx9abm" Alias "D3DXGenerateOutputDecl_abm" (pOutput As *D3DVERTEXELEMENT9, pInput As *D3DVERTEXELEMENT9) As DWord
399Declare Function D3DXLoadPatchMeshFromXof Lib "dx9abm" Alias "D3DXLoadPatchMeshFromXof_abm" (pXofObjMesh As *ID3DXFileData, Options As DWord, pD3DDevice As LPDIRECT3DDEVICE9, ppMaterials As **ID3DXBuffer, ppEffectInstances As **ID3DXBuffer, pNumMaterials As DWordPtr, ppMesh As **ID3DXPatchMesh) As DWord
400Declare Function D3DXRectPatchSize Lib "dx9abm" Alias "D3DXRectPatchSize_abm" (pfNumSegs As SinglePtr, pdwTriangles As DWordPtr, pdwVertices As DWordPtr) As DWord
401Declare Function D3DXTriPatchSize Lib "dx9abm" Alias "D3DXTriPatchSize_abm" (pfNumSegs As SinglePtr, pdwTriangles As DWordPtr, pdwVertices As DWordPtr) As DWord
402Declare Function D3DXTessellateRectPatch Lib "dx9abm" Alias "D3DXTessellateRectPatch_abm" (pVB As *IDirect3DVertexBuffer9, pNumSegs As SinglePtr, pdwInDecl As *D3DVERTEXELEMENT9, pRectPatchInfo As *D3DRECTPATCH_INFO, pMesh As *ID3DXMesh) As DWord
403Declare Function D3DXTessellateTriPatch Lib "dx9abm" Alias "D3DXTessellateTriPatch_abm" (pVB As *IDirect3DVertexBuffer9, pNumSegs As SinglePtr, pInDecl As *D3DVERTEXELEMENT9, pTriPatchInfo As *D3DTRIPATCH_INFO, pMesh As *ID3DXMesh) As DWord
404Declare Function D3DXCreateNPatchMesh Lib "dx9abm" Alias "D3DXCreateNPatchMesh_abm" (pMeshSysMem As *ID3DXMesh, pPatchMesh As *ID3DXPatchMesh) As DWord
405Declare Function D3DXCreatePatchMesh Lib "dx9abm" Alias "D3DXCreatePatchMesh_abm" (pInfo As *D3DXPATCHINFO, dwNumPatches As DWord, dwNumVertices As DWord, dwOptions As DWord, pDecl As *D3DVERTEXELEMENT9, pD3DDevice As LPDIRECT3DDEVICE9, pPatchMesh As *ID3DXPatchMesh) As DWord
406Declare Function D3DXValidPatchMesh Lib "dx9abm" Alias "D3DXValidPatchMesh_abm" (pMesh As *ID3DXPatchMesh, dwcDegenerateVertices As DWord, dwcDegeneratePatches As DWord, ppErrorsAndWarnings As **ID3DXBuffer) As DWord
407Declare Function D3DXGetFVFVertexSize Lib "dx9abm" Alias "D3DXGetFVFVertexSize_abm" (FVF As DWord) As DWord
408Declare Function D3DXGetDeclVertexSize Lib "dx9abm" Alias "D3DXGetDeclVertexSize_abm" (pDecl As *D3DVERTEXELEMENT9, Stream As DWord) As DWord
409Declare Function D3DXGetDeclLength Lib "dx9abm" Alias "D3DXGetDeclLength_abm" (pDecl As *D3DVERTEXELEMENT9) As DWord
410Declare Function D3DXDeclaratorFromFVF Lib "dx9abm" Alias "D3DXDeclaratorFromFVF_abm" (FVF As DWord, pDeclarator As *D3DVERTEXELEMENT9) As DWord
411Declare Function D3DXFVFFromDeclarator Lib "dx9abm" Alias "D3DXFVFFromDeclarator_abm" (pDeclarator As *D3DVERTEXELEMENT9, pFVF As DWordPtr) As DWord
412Declare Function D3DXWeldVertices Lib "dx9abm" Alias "D3DXWeldVertices_abm" (pMesh As *ID3DXMesh, Flags As DWord, pEpsilons As *D3DXWELDEPSILONS, pAdjacencyOut As DWord, pFaceRemap As DWordPtr, ppVertexRemap As **ID3DXBuffer) As DWord
413
414Type D3DXINTERSECTINFO
415 FaceIndex As DWord
416 U As Single
417 V As Single
418 Dist As Single
419End Type
420
421Declare Function D3DXIntersect Lib "dx9abm" Alias "D3DXIntersect_abm" (pMesh As *ID3DXBaseMesh, pRayPos As *D3DXVECTOR3, pRayDir As *D3DXVECTOR3, pHit As DWordPtr, pFaceIndex As DWordPtr, pU As SinglePtr, pV As SinglePtr, pDist As SinglePtr, ppAllHits As **ID3DXBuffer, pCountOfHits As DWordPtr) As DWord
422Declare Function D3DXIntersectSubset Lib "dx9abm" Alias "D3DXIntersectSubset_abm" (pMesh As *ID3DXBaseMesh, AttribId As DWord, pRayPos As *D3DXVECTOR3, pRayDir As *D3DXVECTOR3, pHit As DWordPtr, pFaceIndex As DWordPtr, pU As SinglePtr, pV As SinglePtr, pDist As SinglePtr, ppAllHits As **ID3DXBuffer, pCountOfHits As DWordPtr) As DWord
423Declare Function D3DXSplitMesh Lib "dx9abm" Alias "D3DXSplitMesh_abm" (pMeshIn As *ID3DXMesh, pAdjacencyIn As DWord, MaxSize As DWord, Options As DWord, pMeshesOut As DWordPtr, ppMeshArrayOut As **ID3DXBuffer, ppAdjacencyArrayOut As **ID3DXBuffer, ppFaceRemapArrayOut As **ID3DXBuffer, ppVertRemapArrayOut As **ID3DXBuffer) As DWord
424Declare Function D3DXIntersectTri Lib "dx9abm" Alias "D3DXIntersectTri_abm" (p0 As *D3DXVECTOR3, p1 As *D3DXVECTOR3, p2 As *D3DXVECTOR3, pRayPos As *D3DXVECTOR3, pRayDir As *D3DXVECTOR3, pU As SinglePtr, pV As SinglePtr, pDist As SinglePtr) As Long
425Declare Function D3DXSphereBoundProbe Lib "dx9abm" Alias "D3DXSphereBoundProbe_abm" (pCenter As *D3DXVECTOR3, Radius As Single, pRayPos As *D3DXVECTOR3, pRayDir As *D3DXVECTOR3) As Long
426Declare Function D3DXBoxBoundProbe Lib "dx9abm" Alias "D3DXBoxBoundProbe_abm" (pMin As *D3DXVECTOR3, pMax As *D3DXVECTOR3, pRayPos As *D3DXVECTOR3, pRayDir As *D3DXVECTOR3) As Long
427Declare Function D3DXComputeTangent Lib "dx9abm" Alias "D3DXComputeTangent_abm" (pMesh As *ID3DXMesh, TexStage As DWord, TangentIndex As DWord, BinormIndex As DWord, Wrap As DWord, pAdjacency As DWordPtr) As DWord
428Declare Function D3DXConvertMeshSubsetToSingleStrip Lib "dx9abm" Alias "D3DXConvertMeshSubsetToSingleStrip_abm" (pMeshIn As *ID3DXBaseMesh, AttribId As DWord, IBOptions As DWord, ppIndexBuffer As **IDirect3DIndexBuffer9, pNumIndices As DWordPtr) As DWord
429Declare Function D3DXConvertMeshSubsetToStrips Lib "dx9abm" Alias "D3DXConvertMeshSubsetToStrips_abm" (pMeshIn As *ID3DXBaseMesh, AttribId As DWord, IBOptions As DWord, ppIndexBuffer As **IDirect3DIndexBuffer9, pNumIndices As DWordPtr, ppStripLengths As **ID3DXBuffer, pNumStrips As DWordPtr) As DWord
430Declare Function D3DXOptimizeFaces Lib "dx9abm" Alias "D3DXOptimizeFaces_abm" (pbIndices As VoidPtr, cFaces As DWord, cVertices As DWord, b32BitIndices As Long, pFaceRemap As DWordPtr) As DWord
431Declare Function D3DXOptimizeVertices Lib "dx9abm" Alias "D3DXOptimizeVertices_abm" (pbIndices As VoidPtr, cFaces As DWord, cVertices As DWord, b32BitIndices As Long, pFaceRemap As DWordPtr) As DWord
432
433
434#endif '_INC_D3DX9MESH
Note: See TracBrowser for help on using the repository browser.