IFXSkeleton

The IFXSkeleton interface is used to get and set bone data and vertex weights for bones-based character animation.

Note: Underlying weight data is designed for sequential, not random, access. Restrictions are on an individual mesh basis. Vertex weight writes must be done in ascending order or data will be corrupted. Vertex weight reads and replaces should be done in ascending order or heavy performance penalties may result (Read and Replace use the same iterator). Write pass may be done only once (per mesh). Read and Replace location should never exceed write location. Replacements must use the exact number of weights as previously set.

Methods

Interface Methods

Description

SetBoneInfo

Set BoneInfo data

GetBoneInfo

Get BoneInfo data

SetTotalBoneWeightCount

Set the total number of vertices with weights and the total of weights for all the vertices

GetTotalBoneWeightCount

Get the total number of vertices with weights and the total of weights for all the vertices

SetBoneWeights

Set the weights for a particular vertex on a specified mesh

GetBoneWeightCount

Get the number of weights for a particular vertex on a specified mesh

GetBoneWeights

Get the weights for a particular vertex on a specified mesh


IFXSkeleton::SetBoneInfo(U32 uBoneID, IFXBoneInfo *pBoneInfo)

This method sets all the data for a particular indexed bone from IFXBoneInfo.

Parameters:

uBoneID

Bone ID number

*pBoneInfo

A pointer to IFXBoneInfo

Return Values


IFXSkeleton::GetBoneInfo(U32 uBoneID, IFXBoneInfo *pBoneInfo)

This method gets all the data for a particular indexed bone from IFXBoneInfo.

Parameters:

uBoneID

Bone ID number

*pBoneInfo

A pointer to IFXBoneInfo

Return Values


IFXSkeleton::SetTotalBoneWeightCount(U32 uMeshIndex, U32 uTotalVertexCount,U32 uTotalWeightCount)

This method sets the total number of vertices with weights and the total of weights for all the vertices. This should be set for every mesh in the model as it is required for space allocation before setting any weight data.

Parameters:

uMeshIndex

Mesh index number

uTotalVertexCount

Total number of vertices

uTotalWeightCount

Total number of influences in the mesh (sum of influences from each vertex)

Return Values


IFXSkeleton::GetTotalBoneWeightCount(U32 uMeshIndex, U32 *puTotalWeightCount)

Get the total number of vertices with weights and the sum total of weights for all the vertices. This needs to be set for every mesh in the model. This is required for space allocation before setting any weight data.

Parameters:

uMeshIndex

Mesh index number

*puTotalWeightCount

Pointer to the total number of influences in the mesh (sum of influences from each vertex)

Return Values


IFXSkeleton::SetBoneWeights(U32 uVertexIndex,U32 uMeshIndex, U32 uWeightCount,U32 *puBoneIDs,F32 *pfBoneWeights)

Set the weights for a particular vertex on a specified mesh. The pointers are arrays of length, with uWeightCount containing the bone index and fractional weight of each influence. The total weights should add up to approximately one.

Parameters:

uVertexIndex

Vertex index number

uMeshIndex

Mesh index number

uWeightCount

Number of bones that influence the vertex

*puBoneIDs

Pointer to the bone ID numbers

*pfBoneWeights

Pointer to the bone weights

Return Values


IFXSkeleton::GetBoneWeightCount(U32 uVertexIndex,U32 uMeshIndex, U32 *puWeightCount)

Get the number of weights for a particular vertex on a specified mesh. This allows for preallocation before GetBoneWeights().

Parameters:

uVertexIndex

Vertex index number

uMeshIndex

Mesh index number

*puWeightCount

Pointer to the number of bones that influence the vertex

Return Values


IFXSkeleton::GetBoneWeights(U32 uVertexIndex,U32 uMeshIndex, U32 uWeightCount,U32 *puBoneIDs,F32 *pfBoneWeights)

Get the weights for a particular vertex on a specified mesh. The pointers are arrays of length uWeightCount and are assumed to be preallocated.

Parameters:

uVertexIndex

Vertex index number

uMeshIndex

Mesh index number

uWeightCount

Number of bones that influence the vertex

*puBoneIDs

Pointer to the bone ID numbers

*pfBoneWeights

Pointer to the bone weights

Return Values

§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.