Inverts this matrix (if not singular): this = this^-1
oBoolean = SIMatrix4.InvertInPlace(); |
Boolean True if this matrix has been inverted (not singular); otherwise False.
/* This example demonstrates how to set up a 4x4 matrix, invert it and then trap whether the inversion was successful */ // Create 4x4 matrices var aValues = new Array( 2.0, 3.0, 0.0, 0.0, 1.0, 4.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ); var m1 = XSIMath.CreateMatrix4(aValues); var m2 = XSIMath.CreateMatrix4(); // Make the second matrix the inversion of the first if ( m2.InvertInPlace() ) { Application.LogMessage( "Success :-D" ); } else { Application.LogMessage( "Failure :-(" ); } // Expected result: // INFO : Success :-D |