ID3DXSkinInfo::Remap

Updates bone influence information to match vertices after they are reordered. This method should be called if the target vertex buffer has been reordered externally.

HRESULT Remap(
  DWORD NumVertices,
  DWORD * pVertexRemap
);

Parameters

NumVertices
[in] Number of vertices to remap.
pVertexRemap
[in] Array of DWORDS whose length is specified by NumVertices.

Return Values

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 pVertexRemap specifies the previous vertex 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 should contain 3. The vertex remap array returned by ID3DXMesh::Optimize can be used.

Requirements

Header: Declared in D3dx9mesh.h.