Microsoft DirectX 8.1 (Visual Basic)

D3DXSkinMesh.ConvertToBlendedMesh

Returns a blended mesh.

object.ConvertToBlendedMesh( _ 
    Options As Long, _ 
    AdjacencyIn As Any, _ 
    AdjacencyOut As Any, _ 
    RetNumBoneCombinations As Long, _ 
    RetBoneCombinationTable As D3DXBuffer, _
    pFaceRemap As Any, _ 
    VertexRemap As D3DXBuffer) As D3DXMesh

Parts

object
Object expression that resolves to a D3DXSkinMesh object.
Options
Combination of one or more flags defined by the CONST_D3DXMESH enumeration, specifying options for the mesh.
AdjacencyIn
First element of an array of three Long values per face that specify the three neighbors for each face in the source mesh. See Remarks.
AdjacencyOut
First element in a destination buffer for the face adjacency array of the optimized mesh. The face adjacency is stored as an array of arrays. The innermost array is three indices of adjacent triangles, and the outer array is one set of face adjacency per triangle in the mesh. See Remarks.
RetNumBoneCombinations
Number of entries.
RetBoneCombinationTable
First element in an array of D3DXBONECOMBINATION types. The count of types is NumBoneCombinations. Each bone combination table defines the four bones that you can draw at a time.
pFaceRemap
First element of an array, representing the destination buffer containing the new index for each face.
VertexRemap
D3DXBuffer object containing the new index for each vertex.

Return Values

Returns a D3DXMesh object, representing the blended mesh.

Error Codes

If the method fails, an error is raised and Err.Number can be set to E_OUTOFMEMORY or D3DXERR_INVALIDMESH.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

This method takes a skin mesh and converts it into a blended mesh (a mesh with bone influences) using the Microsoft® Direct3D® vertex blending functionality available in Microsoft® DirectX® 7.x. For more information, see Geometry Blending.

The following code fragment shows how to use a D3DXBuffer object to pass adjacency information.

Dim Opts As Long
Dim D3DXbAdjacencyIn As D3DXBuffer
Dim D3DXbAdjacencyOut As Any
Dim NumBC As Long
Dim RetTable As D3DXBuffer

' This code fragment assumes that all arguments
' have been properly initialized.
Call D3DX8.ConvertToBlendedMesh(Opts, ByVal D3DXbAdjacencyIn.GetBufferPointer, _
                                D3DXbAdjacencyOut, NumBC, RetTable )