CreateFromMatrix() public static method

Creates a 3x3 matrix from an XNA 4x4 matrix.
public static CreateFromMatrix ( Matrix matrix4X4 ) : Matrix3x3
matrix4X4 Matrix Matrix to extract a 3x3 matrix from.
return Matrix3x3
Ejemplo n.º 1
0
        /// <summary>
        /// Constructs a quaternion from a rotation matrix.
        /// </summary>
        /// <param name="r">Rotation matrix to create the quaternion from.</param>
        /// <param name="q">Quaternion based on the rotation matrix.</param>
        public static void CreateFromRotationMatrix(ref Matrix r, out Quaternion q)
        {
            Matrix3x3 downsizedMatrix;

            Matrix3x3.CreateFromMatrix(ref r, out downsizedMatrix);
            CreateFromRotationMatrix(ref downsizedMatrix, out q);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructs a quaternion from a rotation matrix.
        /// </summary>
        /// <param name="r">Rotation matrix to create the quaternion from.</param>
        /// <param name="q">System.Numerics.Quaternion based on the rotation matrix.</param>
        public static void CreateFromRotationMatrix(ref System.Numerics.Matrix4x4 r, out System.Numerics.Quaternion q)
        {
            Matrix3x3 downsizedMatrix;

            Matrix3x3.CreateFromMatrix(ref r, out downsizedMatrix);
            CreateFromRotationMatrix(ref downsizedMatrix, out q);
        }