Microsoft DirectX 8.1 (C++)

ID3DXSkinMesh

Applications use the methods of the ID3DXSkinMesh interface to manipulate skin mesh objects.

The ID3DXSkinMesh interface is obtained by calling one of the following functions.

To load a skin mesh from a Microsoft® DirectX® .x file data object, use the D3DXLoadSkinMeshFromXof function.

Skinning is the technique of having different vertices of a mesh be transformed by multiple transform matrices and the results of the vertex being transformed with each individual matrix blended together to obtain the final transformed vertex.

This process is commonly called skinning because it is used to deform a mesh defining a skin of some character based on the animation of a skeleton of bones. In the simplest case of rigid animation, different parts of the character mesh are associated with a unique skeleton bone and vertices are transformed using the transform of that bone.

When discussing skinning, it is useful to define the following terms.

A skinned character is defined by a set of meshes and a set of bones that affect the vertices of the meshes. The bones are represented as a transform hierarchy. For each mesh, there is a matrix for every bone that affects it that transforms the mesh into the local coordinate space of the bone. This matrix is the bone space transform of the bone for the mesh. This is defined at the time the skeleton is associated with the mesh in the authoring process.

The methods of the ID3DXSkinMesh interface can be organized into the following groups.

Buffers GetIndexBuffer
GetVertexBuffer
Conversion ConvertToBlendedMesh
ConvertToIndexedBlendedMesh
Information GetBoneInfluence
GetDevice
GetMaxFaceInfluences
GetMaxVertexInfluences
GetNumBoneInfluences
GetNumBones
GetOptions
Faces GetNumFaces
Locking LockAttributeBuffer
LockIndexBuffer
LockVertexBuffer
UnlockAttributeBuffer
UnlockIndexBuffer
UnlockVertexBuffer
Miscellaneous GenerateSkinnedMesh
GetOriginalMesh
SetBoneInfluence
UpdateSkinnedMesh
Vertices GetDeclaration
GetFVF
GetNumVertices

The ID3DXSkinMesh interface, like all COM interfaces, inherits the IUnknown Interface.

The LPD3DXSKINMESH type is defined as a pointer to the ID3DXSkinMesh interface.

typedef struct ID3DXSkinMesh* LPD3DXSKINMESH;

Requirements

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