Template Function TRAP::Math::Decompose(Mat<4, 4, T>, Vec<3, T>&, Vec<3, T>&, Vec<3, T>&)#

Function Documentation#

template<typename T>
constexpr bool TRAP::Math::Decompose(Mat<4, 4, T> m, Vec<3, T> &outPosition, Vec<3, T> &outRotation, Vec<3, T> &outScale)#

Decompose a matrix into its position, rotation (euler angles) and scale components.

Parameters:
  • m – Matrix to decompose.

  • outPosition – Output for the position.

  • outRotation – Output for the rotation (in euler angles, radians).

  • outScale – Output for the scale.

Returns:

True on successful decompose, false otherwise.