SilverScreen Solid Modeler

Invert method

Invert method

Previous topic Next topic  

Invert method

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

bool Invert()

 

 

 

 

 




Synopsis

using SilverSharp;

 

The Invert method replaces the matrix of the SilverSharp.MATRIX object with the inverse matrix.

 

 

Parameters

none

 

 

Return Value

Invert returns true if successful and false otherwise.

 

 

Remarks

This function can fail if there is no inversion of the matrix, such as when a scale-by-zero is built-in to the matrix.

 

 

See Also

MATRIX, tm_inverse

 

 

Example

The following code would invert a matrix that scales x by 3, y by 2, and z by 0.5:

 

C# Code

 

 using SilverSharp;

 

 . . .

 

 MATRIX mx = new MATRIX();

 

 mx.Scale(3.0, 2.0, 0.5);

 

 mx.Invert();