Multiply() public static method

multiply matrix left and right
public static Multiply ( Matrix4 left, Matrix4 right ) : Matrix4
left Matrix4 left matrix
right Matrix4 right matrix
return Matrix4
Beispiel #1
0
        /// <summary>
        /// calculate the matrix used to transform 3D to 2D
        /// </summary>
        /// <returns>
        /// matrix used to transform 3d points to 2d
        /// </returns>
        private Matrix4 Get3DTo2DMatrix()
        {
            Matrix4 result = Matrix4.Multiply(
                m_to2DMatrix.Inverse(), m_moveToCenterMatrix.Inverse());

            result = Matrix4.Multiply(result, m_scaleMatrix);
            return(Matrix4.Multiply(result, new Matrix4(new Vector4(m_center.X, m_center.Y, 0))));
        }
Beispiel #2
0
        /// <summary>
        /// calculate the matrix used to transform 2D to 3D
        /// </summary>
        /// <returns>
        /// matrix used to transform 2d points to 3d
        /// </returns>
        private Matrix4 Get2DTo3DMatrix()
        {
            Matrix4 matrix = Matrix4.Multiply(
                new Matrix4(new Vector4(-m_center.X, -m_center.Y, 0)), m_scaleMatrix.Inverse());

            matrix = Matrix4.Multiply(
                matrix, m_moveToCenterMatrix);
            return(Matrix4.Multiply(matrix, m_to2DMatrix));
        }