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(
[in] LPD3DXMESH pMesh,
[in] DWORD Options,
[in] DWORD paletteSize,
[in] const DWORD *pAdjacencyIn,
[in] LPDWORD pAdjacencyOut,
[out] DWORD *pFaceRemap,
[out] LPD3DXBUFFER *ppVertexRemap,
[out] DWORD *pMaxVertexInfl,
[out] DWORD *pNumBoneCombinations,
[out] LPD3DXBUFFER *ppBoneCombinationTable,
[out] LPD3DXMESH *ppMesh
);
Parameters
-
pMesh [in]
-
Type: LPD3DXMESH
The input mesh. See ID3DXMesh.
-
Options [in]
-
Type: DWORD
Currently unused.
-
paletteSize [in]
-
Type: DWORD
Number of bone matrices available for matrix palette skinning.
-
pAdjacencyIn [in]
-
Type: const DWORD*
Input mesh adjacency information.
-
pAdjacencyOut [in]
-
Type: LPDWORD
Output mesh adjacency information.
-
pFaceRemap [out]
-
Type: DWORD*
An array of DWORDs, one per face, that identifies the original mesh face that corresponds to each face in the blended mesh. If the value supplied for this argument is NULL, face remap data is not returned.
-
ppVertexRemap [out]
-
Type: LPD3DXBUFFER*
Address of a pointer to an ID3DXBuffer interface, which contains a DWORD for each vertex that specifies how the new vertices map to the old vertices. This remap is useful if you need to alter external data based on the new vertex mapping. This parameter is optional; NULL may be used.
-
pMaxVertexInfl [out]
-
Type: DWORD*
Pointer to a DWORD that will contain the maximum number of bone influences required per vertex for this skinning method.
-
pNumBoneCombinations [out]
-
Type: DWORD*
Pointer to the number of bones in the bone combination table.
-
ppBoneCombinationTable [out]
-
Type: LPD3DXBUFFER*
Pointer to the bone combination table. The data is organized in a D3DXBONECOMBINATION structure.
-
ppMesh [out]
-
Type: LPD3DXMESH*
Pointer to the new mesh.
Return value
Type: HRESULT
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.
This method does not run on hardware that does not support fixed-function vertex blending.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also