Revit.SDK.Samples.NewPathReinforcement.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

Example #1
0
        /// <summary>
        /// calculate the matrix used to transform 3D to 2D
        /// </summary>
        private Matrix4 Compute3DTo2DMatrix()
        {
            Matrix4 result = Matrix4.Multiply(
                m_to2DMatrix.Inverse(), m_moveToCenterMatrix.Inverse());

            result = Matrix4.Multiply(result, m_scaleMatrix);
            return(result);
        }
All Usage Examples Of Revit.SDK.Samples.NewPathReinforcement.CS.Matrix4::Inverse