?/TD>
Microsoft DirectX 9.0

ID3DXSkinInfo::ConvertToIndexedBlendedMesh Method


Takes a mesh and returns a new mesh with per-vertex blend weights, indices, and a bone combination table. The table describes which bone palettes affect which subsets of the mesh.

Syntax

HRESULT ConvertToIndexedBlendedMesh(      

    LPD3DXMESH pMesh,     DWORD Options,     DWORD paletteSize,     CONST LPDWORD pAdjacencyIn,     LPDWORD pAdjacencyOut,     DWORD *pFaceRemap,     LPD3DXBUFFER *ppVertexRemap,     DWORD *pMaxFaceInfl,     DWORD *pNumBoneCombinations,     LPD3DXBUFFER *ppBoneCombinationTable,     LPD3DXMESH *ppMesh );

Parameters

pMesh
[in] The input mesh. See ID3DXMesh.
Options
[in] Currently unused.
paletteSize
[in] Number of bone matrices available for matrix palette skinning.
pAdjacencyIn
[in] Input mesh adjacency information.
pAdjacencyOut
[in] Output mesh adjacency information.
pFaceRemap
[out] Pointer to a destination buffer containing the new index for each face. This parameter is optional, NULL may be used.
ppVertexRemap
[out] Address of a pointer to an ID3DXBuffer interface, which contains the new index for each vertex. This parameter is optional, NULL may be used.
pMaxFaceInfl
[out] Pointer to a DWORD which will contain the maximum number of bone influences required per face for this skinning method.
pNumBoneCombinations
[out] Pointer to the number of bones in the bone combination table.
ppBoneCombinationTable
[out] Pointer to the bone combination table. The data is organized in a D3DXBONECOMBINATION structure.
ppMesh
[out] Pointer to the new mesh.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.



Remarks

Each element in the remap arrays specifies the previous index for that position. For example, if a vertex was in position 3 but has been remapped to position 5, then the fifth element of pVertexRemap will contain 3.



© 2002 Microsoft Corporation. All rights reserved.