Synced
Matrix.Decompose
Section titled “Matrix.Decompose”
- Decomposes a matrix into scale, rotation and translation.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Core.Mathematics
Declaration
Section titled “Declaration”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)Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”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.