decompose

Function decompose 

Source
pub fn decompose<T>(m: &Matrix4<T>) -> Option<(Vector3<T>, Quat<T>, Vector3<T>)>
where T: FloatScalar,
Expand description

Decomposes a transformation matrix into scale, rotation, and translation.

§Returns

  • Some((scale, rotation, translation)) if successful
  • None if the matrix is singular or has zero scale

§Note

This assumes the matrix represents a valid affine transformation.