internal void TransformFrameAbsolute(SdkMeshFile file, double time)
        {
            int tick = file.GetAnimationKeyFromTime(time);

            if (this.AnimationFrameIndex != -1)
            {
                SdkMeshAnimationFrame animationFrame   = file.AnimationFrames[this.AnimationFrameIndex];
                SdkMeshAnimationKey   animationKey     = animationFrame.AnimationKeys[tick];
                SdkMeshAnimationKey   animationKeyOrig = animationFrame.AnimationKeys[0];

                XMMatrix mTrans1 = XMMatrix.Translation(-animationKeyOrig.Translation.X, -animationKeyOrig.Translation.Y, -animationKeyOrig.Translation.Z);
                XMMatrix mTrans2 = XMMatrix.Translation(animationKey.Translation.X, animationKey.Translation.Y, animationKey.Translation.Z);

                XMVector quat1 = animationKeyOrig.Orientation;
                quat1 = XMQuaternion.Inverse(quat1);
                XMMatrix mRot1  = XMMatrix.RotationQuaternion(quat1);
                XMMatrix mInvTo = mTrans1 * mRot1;

                XMVector quat2 = animationKey.Orientation;
                XMMatrix mRot2 = XMMatrix.RotationQuaternion(quat2);
                XMMatrix mFrom = mRot2 * mTrans2;

                XMMatrix mOutput = mInvTo * mFrom;
                this.TransformedFrameMatrix = mOutput;
            }
        }
        internal void TransformFrame(SdkMeshFile file, XMMatrix parentWorld, double time)
        {
            // Get the tick data
            XMMatrix mLocalTransform;

            int tick = file.GetAnimationKeyFromTime(time);

            if (this.AnimationFrameIndex == -1)
            {
                mLocalTransform = this.Matrix;
            }
            else
            {
                SdkMeshAnimationFrame animationFrame = file.AnimationFrames[this.AnimationFrameIndex];
                SdkMeshAnimationKey   animationKey   = animationFrame.AnimationKeys[tick];

                // turn it into a matrix (Ignore scaling for now)
                XMFloat3 parentPos  = animationKey.Translation;
                XMMatrix mTranslate = XMMatrix.Translation(parentPos.X, parentPos.Y, parentPos.Z);

                XMVector quat = animationKey.Orientation;

                if (XMVector4.Equal(quat, XMVector.Zero))
                {
                    quat = XMQuaternion.Identity;
                }

                quat = XMQuaternion.Normalize(quat);
                XMMatrix mQuat = XMMatrix.RotationQuaternion(quat);
                mLocalTransform = mQuat * mTranslate;
            }

            // Transform ourselves
            XMMatrix mLocalWorld = mLocalTransform * parentWorld;

            this.TransformedFrameMatrix = mLocalWorld;
            this.WorldPoseFrameMatrix   = mLocalWorld;

            // Transform our siblings
            if (this.SiblingFrameIndex != -1)
            {
                file.Frames[this.SiblingFrameIndex].TransformFrame(file, parentWorld, time);
            }

            // Transform our children
            if (this.ChildFrameIndex != -1)
            {
                file.Frames[this.ChildFrameIndex].TransformFrame(file, mLocalWorld, time);
            }
        }