Example #1
0
        public M2AnimationBone(M2File file, ref M2Bone bone, BinaryReader reader)
        {
            Bone = bone;
            bone.pivot.Y = -bone.pivot.Y;
            mPivot = Matrix.Translation(bone.pivot);
            mInvPivot = Matrix.Translation(-bone.pivot);

            mTranslation = new M2Vector3AnimationBlock(file, bone.translation, reader);
            mRotation = new M2Quaternion16AnimationBlock(file, bone.rotation, reader, Quaternion.Identity);
            mScaling = new M2Vector3AnimationBlock(file, bone.scaling, reader, Vector3.One);
        }
Example #2
0
        public M2AnimationBone(M2File file, ref M2Bone bone, BinaryReader reader)
        {
            Bone         = bone;
            bone.pivot.Y = -bone.pivot.Y;
            mPivot       = Matrix.Translation(bone.pivot);
            mInvPivot    = Matrix.Translation(-bone.pivot);

            mTranslation = new M2Vector3AnimationBlock(file, bone.translation, reader);
            mRotation    = new M2Quaternion16AnimationBlock(file, bone.rotation, reader, Quaternion.Identity);
            mScaling     = new M2Vector3AnimationBlock(file, bone.scaling, reader, Vector3.One);
        }
Example #3
0
        public M2AnimationBone(M2File file, ref M2Bone bone, BinaryReader reader)
        {
            mBone         = bone;
            IsBillboarded = (bone.flags & 0x08) != 0;  // Some billboards have 0x40 for cylindrical?
            IsTransformed = (bone.flags & 0x200) != 0;

            bone.pivot.Y = -bone.pivot.Y;
            mPivot       = Matrix.Translation(bone.pivot);
            mInvPivot    = Matrix.Translation(-bone.pivot);

            mTranslation = new M2Vector3AnimationBlock(file, bone.translation, reader);
            mRotation    = new M2Quaternion16AnimationBlock(file, bone.rotation, reader, Quaternion.Identity);
            mScaling     = new M2Vector3AnimationBlock(file, bone.scaling, reader, Vector3.One);
        }