| 1 | /// @ref ext_quaternion_relational |
| 2 | /// @file glm/ext/quaternion_relational.hpp |
| 3 | /// |
| 4 | /// @defgroup ext_quaternion_relational GLM_EXT_quaternion_relational |
| 5 | /// @ingroup ext |
| 6 | /// |
| 7 | /// Exposes comparison functions for quaternion types that take a user defined epsilon values. |
| 8 | /// |
| 9 | /// Include <glm/ext/quaternion_relational.hpp> to use the features of this extension. |
| 10 | /// |
| 11 | /// @see core_vector_relational |
| 12 | /// @see ext_vector_relational |
| 13 | /// @see ext_matrix_relational |
| 14 | /// @see ext_quaternion_float |
| 15 | /// @see ext_quaternion_double |
| 16 | |
| 17 | #pragma once |
| 18 | |
| 19 | // Dependency: |
| 20 | #include "../vector_relational.hpp" |
| 21 | |
| 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
| 23 | # pragma message("GLM: GLM_EXT_quaternion_relational extension included") |
| 24 | #endif |
| 25 | |
| 26 | namespace glm |
| 27 | { |
| 28 | /// @addtogroup ext_quaternion_relational |
| 29 | /// @{ |
| 30 | |
| 31 | /// Returns the component-wise comparison of result x == y. |
| 32 | /// |
| 33 | /// @tparam T Floating-point scalar types |
| 34 | /// @tparam Q Value from qualifier enum |
| 35 | template<typename T, qualifier Q> |
| 36 | GLM_FUNC_DECL vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y); |
| 37 | |
| 38 | /// Returns the component-wise comparison of |x - y| < epsilon. |
| 39 | /// |
| 40 | /// @tparam T Floating-point scalar types |
| 41 | /// @tparam Q Value from qualifier enum |
| 42 | template<typename T, qualifier Q> |
| 43 | GLM_FUNC_DECL vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon); |
| 44 | |
| 45 | /// Returns the component-wise comparison of result x != y. |
| 46 | /// |
| 47 | /// @tparam T Floating-point scalar types |
| 48 | /// @tparam Q Value from qualifier enum |
| 49 | template<typename T, qualifier Q> |
| 50 | GLM_FUNC_DECL vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y); |
| 51 | |
| 52 | /// Returns the component-wise comparison of |x - y| >= epsilon. |
| 53 | /// |
| 54 | /// @tparam T Floating-point scalar types |
| 55 | /// @tparam Q Value from qualifier enum |
| 56 | template<typename T, qualifier Q> |
| 57 | GLM_FUNC_DECL vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon); |
| 58 | |
| 59 | /// @} |
| 60 | } //namespace glm |
| 61 | |
| 62 | #include "quaternion_relational.inl" |