Microsoft DirectX 8.1 (C++)

ID3DXSkinMesh::GenerateSkinnedMesh

Generates a skinned mesh.

HRESULT GenerateSkinnedMesh(
  DWORD Options,
  FLOAT minWeight,
  CONST LPDWORD pAdjacencyIn,
  LPDWORD pAdjacencyOut,
  DWORD* pFaceRemap,  
  LPD3DXBUFFER* ppVertexRemap,   
  LPD3DXMESH* ppMesh
  );

Parameters

Options
[in] A combination of one or more flags from the D3DXMESH enumeration, specifying creation options for the mesh.
minWeight
[in] Sets the minimum weight clamping value.
pAdjacencyIn
[in, out] 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. This parameter is optional and can be specified with NULL.
pFaceRemap
[out, retval] Pointer to the an array of DWORDs containing the face remap array. This parameter is optional and can be specified with NULL.
ppVertexRemap
[out, retval] Pointer to an LPD3DXBUFFER interface, representing the vertex remap data. This parameter is optional and can be specified with NULL.
ppMesh
[out, retval] Pointer to an ID3DXMesh interface, representing the generated skinned mesh.

Return Values

If the method succeeds, the return value is D3D_OK.

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

Remarks

The mesh generated by this method is the one that should be supplied to ID3DXSkinMesh::UpdateSkinnedMesh each time the skeleton transforms are modified.

Requirements

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

See Also

ID3DXSkinMesh::UpdateSkinnedMesh

The skinned mesh sample.