Revit.SDK.Samples.SlabShapeEditing.CS.Matrix4.Inverse C# (CSharp) Method

Inverse() public method

get inverse matrix
public Inverse ( ) : Matrix4
return Matrix4
        public Matrix4 Inverse()
        {
            switch(m_type)
            {
                case MatrixType.Rotation: return RotationInverse();

                case MatrixType.Translation: return TranslationInverse();

                case MatrixType.RotationAndTranslation:
                    return Multiply(TranslationInverse(),RotationInverse());

                case MatrixType.Scale: return ScaleInverse();

                case MatrixType.Normal: return new Matrix4();

                default: return null;
            }
        }

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        /// calculate the matrix used to transform 2D to 3D
        /// </summary>
        /// <returns>maxtrix is use to transform 2d points to 3d</returns>
        public Matrix4 Get2DTo3DMatrix()
        {
            Matrix4 matrix = Matrix4.Multiply(
                m_MoveToPictureBoxCenter.Inverse(), m_scaleMatrix.Inverse());

            matrix = Matrix4.Multiply(
                matrix, m_moveToCenterMatrix);
            return(Matrix4.Multiply(matrix, m_to2DMatrix));
        }
All Usage Examples Of Revit.SDK.Samples.SlabShapeEditing.CS.Matrix4::Inverse