Microsoft DirectX 8.1 (C++)

ID3DXSkinMesh::SetBoneInfluence

Sets the bone influence for a bone in the skin mesh.

HRESULT SetBoneInfluence(
  DWORD Bone,
  DWORD numInfluences,
  CONST DWORD* pVertices,
  CONST FLOAT* pWeights
);

Parameters

Bone
[in] Bone for which to set the influences.
numInfluences
[in] Number of influences to set for the bone.
pVertices
[in] Pointer to the list of vertices used to set the influences (weights).
pWeights
[in] Pointer to the list of weights to set for the provided vertices. These values are used to programmatically fill in the skinning information for the skin mesh.

Return Values

If the method succeeds, the return value is D3D_OK.

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

Remarks

Using this method provides a mechanism to indicate how the given bone affects the given vertices. This method should be called for each bone that affects the mesh.

Requirements

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