Skip to content
API referenceDevelopmentRuntime scriptingEngine ccf7d03f
Synced
  • Decomposes a matrix into scale, rotation and translation.

API: scripting
Project: Inno.Core.Mathematics
Scope: Runtime

public static bool InnoEngine.Mathematics.Matrix.Decompose(InnoEngine.Mathematics.Matrix m, out InnoEngine.Mathematics.Vector3 scale, out InnoEngine.Mathematics.Quaternion rotation, out InnoEngine.Mathematics.Vector3 translation)

Parameter m: The transformation matrix applied to the supplied value.

Parameter scale: Receives basis-column lengths, with the X sign negated for a negative determinant.

Parameter rotation: Receives the rotation derived from normalized basis columns, or identity when a scale is too small.

Parameter translation: Receives the last-column XYZ translation.

False when a basis-column length is at most the default tolerance; otherwise true. Success does not certify that a matrix with shear or perspective is a pure TRS transform.