quaternion_transform.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /// Provides transformation functions for quaternion types
  8. ///
  9. /// Include <glm/ext/quaternion_transform.hpp> to use the features of this extension.
  10. ///
  11. /// @see ext_quaternion_float
  12. /// @see ext_quaternion_double
  13. /// @see ext_quaternion_exponential
  14. /// @see ext_quaternion_geometric
  15. /// @see ext_quaternion_relational
  16. /// @see ext_quaternion_trigonometric
  17. #pragma once
  18. // Dependency:
  19. #include "../common.hpp"
  20. #include "../trigonometric.hpp"
  21. #include "../geometric.hpp"
  22. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  23. # pragma message("GLM: GLM_EXT_quaternion_transform extension included")
  24. #endif
  25. namespace glm
  26. {
  27. /// @addtogroup ext_quaternion_transform
  28. /// @{
  29. /// Rotates a quaternion from a vector of 3 components axis and an angle.
  30. ///
  31. /// @param q Source orientation
  32. /// @param angle Angle expressed in radians.
  33. /// @param axis Axis of the rotation
  34. ///
  35. /// @tparam T Floating-point scalar types
  36. /// @tparam Q Value from qualifier enum
  37. template<typename T, qualifier Q>
  38. GLM_FUNC_DECL qua<T, Q> rotate(qua<T, Q> const& q, T const& angle, vec<3, T, Q> const& axis);
  39. /// @}
  40. } //namespace glm
  41. #include "quaternion_transform.inl"