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

API: engine
Project: Inno.Core.Mathematics

public static bool Inno.Core.Mathematics.Matrix.Decompose(Inno.Core.Mathematics.Matrix m, out Inno.Core.Mathematics.Vector3 scale, out Inno.Core.Mathematics.Quaternion rotation, out Inno.Core.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.