fromMatrix

fun fromMatrix(matrix: Matrix, result: MetricTransformationParameters, assumePositiveScale: Boolean = true)

Converts provided matrix into metric transformation parameters. Notice that matrix form contains an ambiguity respect scale and rotation, since a negative scale also implies a rotation of 180 degrees.

Parameters

matrix

matrix to extract parameters from.

result

instance where result will be stored.

assumePositiveScale

true indicates that a positive scale value is assumed to solve ambiguity respect scale contained in matrix form. If false, negative scale is assumed. By default this is true.

Throws

if provided matrix does not contain values valid for a metric transformation.


fun fromMatrix(matrix: Matrix, assumePositiveScale: Boolean = true): MetricTransformationParameters

Converts provided matrix into a metric transformation parameters and returns the result as a new instance. Notice that matrix form contains an ambiguity respect scale and rotation, since a negative scale also implies a rotation of 180 degrees.

Return

a new metric transformation parameters instance.

Parameters

matrix

matrix to extract parameters from.

assumePositiveScale

true indicates that a positive scale value is assumed to solve ambiguity respect scale contained in matrix form. If false, negative scale is assumed. By default this is true.

Throws

if provided matrix does not contain values valid for a metric transformation.