Microsoft DirectX 8.1 (Visual Basic) |
object.GenerateSkinnedMesh( _ Options As Long, _ MinWeight As Single, _ AdjacencyIn As Any, _ AdjacencyOut As Any) As D3DXMesh
Returns a D3DXMesh object, representing the generated skinned mesh.
If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
This method enables you to specify all matrices and apply them to each bone. GenerateSkinnedMesh does the geometry blending for you, so you do not need to used Direct3D to do the geometry blending. In particular, this method allows more that four bone influences per vertex.
The mesh generated by this method is the one that should be supplied to D3DXSkinMesh.UpdateSkinnedMesh each time the skeleton transforms are modified.
This method is useful for skin animations.
The following code fragment shows how to use a D3DXBuffer object to pass adjacency information.
Dim Opts As Long Dim MinW As Single Dim D3DXbAdjacencyIn As D3DXBuffer Dim D3DXbAdjacencyOut As Any ' This code fragment assumes that all arguments ' have been properly initialized. Call D3DX8.ConvertToIndexedBlendedMesh(Opts, MinW, ByVal D3DXbAdjacencyIn.GetBufferPointer, PalSize, D3DXbAdjacencyOut)