Table of Contents

Method TryGetInverse

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

TryGetInverse(out GeoTransform3)

Tries to get the transformation that undoes this one, without throwing, using the default tolerance.

public bool TryGetInverse(out GeoTransform3 inverse)

Parameters

inverse GeoTransform3

The inverse when the method returns true; otherwise the identity.

Returns

bool

false when the transformation collapses space and cannot be undone.

TryGetInverse(out GeoTransform3, Tolerance)

Tries to get the transformation that undoes this one, without throwing, within a tolerance.

public bool TryGetInverse(out GeoTransform3 inverse, Tolerance tolerance)

Parameters

inverse GeoTransform3

The inverse when the method returns true; otherwise the identity.

tolerance Tolerance

The tolerance deciding when the transformation has collapsed.

Returns

bool

false when the transformation collapses space and cannot be undone.

Remarks

The determinant is judged against the size of the transformation rather than against zero. A determinant of exactly zero is the only case a bare == catches, and it is not the case that hurts: three axes that are very nearly coplanar give a determinant around 1e-16 while each axis is still of unit length, and dividing the cofactors by that yields a matrix of enormous numbers reported as a valid inverse. Scaling the threshold by the product of the axis lengths is what makes the test mean "collapsed" rather than "small", so a model in millimetres and the same model in metres are judged alike.