quaternion_transform.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /// @ref ext_quaternion_transform
  2. /// @file glm/ext/quaternion_transform.hpp
  3. ///
  4. /// @defgroup ext_quaternion_transform GLM_EXT_quaternion_transform
  5. /// @ingroup ext
  6. ///
  7. /// Include <glm/ext/quaternion_transform.hpp> to use the features of this extension.
  8. ///
  9. /// Defines a templated quaternion type and several quaternion operations.
  10. #pragma once
  11. // Dependency:
  12. #include "../common.hpp"
  13. #include "../trigonometric.hpp"
  14. #include "../geometric.hpp"
  15. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  16. # pragma message("GLM: GLM_EXT_quaternion_transform extension included")
  17. #endif
  18. namespace glm
  19. {
  20. /// @addtogroup ext_quaternion_transform
  21. /// @{
  22. /// Rotates a quaternion from a vector of 3 components axis and an angle.
  23. ///
  24. /// @param q Source orientation
  25. /// @param angle Angle expressed in radians.
  26. /// @param axis Axis of the rotation
  27. ///
  28. /// @tparam T Floating-point scalar types
  29. /// @tparam Q Value from qualifier enum
  30. template<typename T, qualifier Q>
  31. GLM_FUNC_DECL qua<T, Q> rotate(qua<T, Q> const& q, T const& angle, vec<3, T, Q> const& axis);
  32. /// @}
  33. } //namespace glm
  34. #include "quaternion_transform.inl"