Model.CopyBoneTransformsTo Method
Copies each bone transform relative only to the parent bone of the model to a given array.
Syntax
'Declaration
Public Sub CopyBoneTransformsTo ( _
destinationBoneTransforms As Matrix() _
)
public void CopyBoneTransformsTo (
Matrix[] destinationBoneTransforms
)
public:
void CopyBoneTransformsTo(
Matrix destinationBoneTransforms[]
)
Parameters
- destinationBoneTransforms
Type: Matrix
The array to receive bone transforms.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | destinationBoneTransforms is null. |
ArgumentOutOfRangeException | destinationBoneTransforms is not the same size as Bones |
Remarks
This is the same as iterating the Bones collection and copying the Transform property into an array that can be indexed into by the bone index.
An array of transformation matrices for the meshes of any model can be obtained by calling CopyAbsoluteBoneTransformsTo or CopyBoneTransformsTo. The resulting array contains the transforms that describe how each ModelMesh is located relative to one another in the Model. The transformation matrix that should be applied to each ModelMesh can be obtained using the index of the CopyBoneTransformsTo to retrieve a transformation matrix from this collection.
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
Model.CopyAbsoluteBoneTransformsTo Method
Model Class
Model Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone