Microsoft DirectX 8.1 (C++)

ID3DXSkinMesh::ConvertToBlendedMesh

Returns a blended mesh.

HRESULT ConvertToBlendedMesh(
  DWORD Options,
  CONST LPDWORD pAdjacencyIn,
  LPDWORD pAdjacencyOut,
  DWORD* pNumBoneCombinations,
  LPD3DXBUFFER* ppBoneCombinationTable,
  DWORD* pFaceRemap,
  LPD3DXBUFFER* ppVertexRemap,
  LPD3DXMESH* ppMesh
);

Parameters

Options
[in] This flag specifies creation options for the mesh. It can be any combination of flags from both the D3DXMESH enumeration or the D3DXMESHOPT enumeration (except for D3DXMESHOPT_IGNOREVERTS or D3DXMESHOPT_SHAREVB).
pAdjacencyIn
[in] Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh.
pAdjacencyOut
[in, out] Pointer to 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.
pNumBoneCombinations
[in, out] Number of entries.
ppBoneCombinationTable
[in, out] Address of a pointer to an array of D3DXBONECOMBINATION structures. The count of structures is pNumBoneCombinations. Each bone combination table defines the four bones that you can draw at a time.
pFaceRemap
[in, out] Pointer to a destination buffer containing the new index for each face.
ppVertexRemap
[out] Address of a pointer to an ID3DXBuffer interface containing the new index for each vertex.
ppMesh
[in, out] Address of a pointer to an ID3DXMesh interface, representing the blended mesh.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following:

E_OUTOFMEMORY
D3DERR_INVALIDCALL
D3DERR_INVALIDMESH
D3DXERR_TOOMANYINFLUENCES

Remarks

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

Requirements

  Header: Declared in D3dx8mesh.h.
  Import Library: Use D3dx8.lib.