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

Function Documentation#

template<typename T>
constexpr Mat<4, 4, T> TRAP::Math::Rotate(const Mat<4, 4, T> &m, T angleInRadians, const Vec<3, T> &v)#

Builds a rotation 4 * 4 matrix created from an axis vector and an angle.

Parameters:
  • mInput matrix multiplied by this rotation matrix.

  • angleInRadians – Rotation angle expressed in radians.

  • v – Rotation axis, recommended to be normalized.

Returns:

Rotation matrix.