Reign.Video.Abstraction.InstanceObjectArmature.Animate C# (CSharp) Method

Animate() public method

public Animate ( float frame ) : void
frame float
return void
        public override void Animate(float frame)
        {
            base.Animate(frame);

            // rotate bones by parent
            foreach (var bone in Bones)
            {
                bone.applyBoneToChilderen();

                //Quaternion.Multiply(ref bone.Rotation, ref bone.Parent.Rotation, out bone.Rotation);

                //bone.Rotation = bone.Bone.Rotation.Multiply(bone.Parent.Rotation);
                //bone.Position = bone.Bone.Position + bone.Position;
            }

            // generate final matrix
            foreach (var bone in Bones)
            {
                Matrix3.FromQuaternion(ref bone.Rotation, out bone.RotationMatrix);
            }
        }