internal virtual void GetBoneMatrices( Matrix4[] matrices )
{
// update derived transforms
this.RootBone.Update( true, false );
/*
Calculating the bone matrices
-----------------------------
Now that we have the derived orientations & positions in the Bone nodes, we have
to compute the Matrix4 to apply to the vertices of a mesh.
Because any modification of a vertex has to be relative to the bone, we must first
reverse transform by the Bone's original derived position/orientation, then transform
by the new derived position / orientation.
*/
int i = 0;
foreach ( Bone bone in boneList.Values )
{
matrices[ i++ ] = bone.FullTransform * bone.BindDerivedInverseTransform;
}
}