protected void WriteSkeleton( BinaryWriter writer )
{
for ( ushort i = 0; i < skeleton.BoneCount; ++i )
{
Bone bone = skeleton.GetBone( i );
WriteBone( writer, bone );
}
for ( ushort i = 0; i < skeleton.BoneCount; ++i )
{
Bone bone = skeleton.GetBone( i );
if ( bone.Parent != null )
WriteBoneParent( writer, bone, (Bone)bone.Parent );
}
foreach ( Animation anim in skeleton.Animations )
{
WriteAnimation( writer, anim );
}
for ( int i = 0; i < skeleton.AttachmentPoints.Count; ++i )
{
AttachmentPoint ap = skeleton.AttachmentPoints[ i ];
WriteAttachmentPoint( writer, ap, skeleton.GetBone( ap.ParentBone ) );
}
}