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 |
|
Set BoneInfo data |
|
|
Get BoneInfo data |
|
|
Set the total number of vertices with weights and the total of weights for all the vertices |
|
|
Get the total number of vertices with weights and the total of weights for all the vertices |
|
|
Set the weights for a particular vertex on a specified mesh |
|
|
Get the number of weights for a particular vertex on a specified mesh |
|
|
Get the weights for a particular vertex on a specified mesh |
This method sets all the data for a particular indexed bone from IFXBoneInfo.
Parameters:
|
uBoneID |
Bone ID number |
|
*pBoneInfo |
A pointer to IFXBoneInfo |
This method gets all the data for a particular indexed bone from IFXBoneInfo.
Parameters:
|
uBoneID |
Bone ID number |
|
*pBoneInfo |
A pointer to IFXBoneInfo |
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) |
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) |
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 |
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 |
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 |
§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.