| 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 | |
| 15 | #pragma once |
| 16 | |
| 17 | // Dependency: |
| 18 | #include "../common.hpp" |
| 19 | #include "../trigonometric.hpp" |
| 20 | #include "../geometric.hpp" |
| 21 | #include "../ext/scalar_constants.hpp" |
| 22 | |
| 23 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
| 24 | # pragma message("GLM: GLM_EXT_quaternion_exponential extension included") |
| 25 | #endif |
| 26 | |
| 27 | namespace glm |
| 28 | { |
| 29 | /// @addtogroup ext_quaternion_transform |
| 30 | /// @{ |
| 31 | |
| 32 | /// Returns a exponential of a quaternion. |
| 33 | /// |
| 34 | /// @tparam T A floating-point scalar type |
| 35 | /// @tparam Q A value from qualifier enum |
| 36 | template<typename T, qualifier Q> |
| 37 | GLM_FUNC_DECL qua<T, Q> exp(qua<T, Q> const& q); |
| 38 | |
| 39 | /// Returns a logarithm of a quaternion |
| 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> log(qua<T, Q> const& q); |
| 45 | |
| 46 | /// Returns a quaternion raised to a power. |
| 47 | /// |
| 48 | /// @tparam T A floating-point scalar type |
| 49 | /// @tparam Q A value from qualifier enum |
| 50 | template<typename T, qualifier Q> |
| 51 | GLM_FUNC_DECL qua<T, Q> pow(qua<T, Q> const& q, T y); |
| 52 | |
| 53 | /// Returns the square root of a quaternion |
| 54 | /// |
| 55 | /// @tparam T A floating-point scalar type |
| 56 | /// @tparam Q A value from qualifier enum |
| 57 | template<typename T, qualifier Q> |
| 58 | GLM_FUNC_DECL qua<T, Q> sqrt(qua<T, Q> const& q); |
| 59 | |
| 60 | /// @} |
| 61 | } //namespace glm |
| 62 | |
| 63 | #include "quaternion_exponential.inl" |