quaternion_exponential.hpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /// @ref ext_quaternion_exponential
  2. /// @file glm/ext/quaternion_exponential.hpp
  3. ///
  4. /// @defgroup ext_quaternion_exponential GLM_EXT_quaternion_exponential
  5. /// @ingroup ext
  6. ///
  7. /// Provides exponential functions for quaternion types
  8. ///
  9. /// Include <glm/ext/quaternion_exponential.hpp> to use the features of this extension.
  10. ///
  11. /// @see core_exponential
  12. /// @see ext_quaternion_float
  13. /// @see ext_quaternion_double
  14. #pragma once
  15. // Dependency:
  16. #include "../common.hpp"
  17. #include "../trigonometric.hpp"
  18. #include "../geometric.hpp"
  19. #include "../ext/scalar_constants.hpp"
  20. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  21. # pragma message("GLM: GLM_EXT_quaternion_exponential extension included")
  22. #endif
  23. namespace glm
  24. {
  25. /// @addtogroup ext_quaternion_transform
  26. /// @{
  27. /// Returns a exponential of a quaternion.
  28. ///
  29. /// @tparam T A floating-point scalar type
  30. /// @tparam Q A value from qualifier enum
  31. template<typename T, qualifier Q>
  32. GLM_FUNC_DECL qua<T, Q> exp(qua<T, Q> const& q);
  33. /// Returns a logarithm of a quaternion
  34. ///
  35. /// @tparam T A floating-point scalar type
  36. /// @tparam Q A value from qualifier enum
  37. template<typename T, qualifier Q>
  38. GLM_FUNC_DECL qua<T, Q> log(qua<T, Q> const& q);
  39. /// Returns a quaternion raised to a power.
  40. ///
  41. /// @tparam T A floating-point scalar type
  42. /// @tparam Q A value from qualifier enum
  43. template<typename T, qualifier Q>
  44. GLM_FUNC_DECL qua<T, Q> pow(qua<T, Q> const& q, T y);
  45. /// Returns the square root of a quaternion
  46. ///
  47. /// @tparam T A floating-point scalar type
  48. /// @tparam Q A value from qualifier enum
  49. template<typename T, qualifier Q>
  50. GLM_FUNC_DECL qua<T, Q> sqrt(qua<T, Q> const& q);
  51. /// @}
  52. } //namespace glm
  53. #include "quaternion_exponential.inl"