quaternion_relational.hpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #pragma once
  17. // Dependency:
  18. #include "../vector_relational.hpp"
  19. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  20. # pragma message("GLM: GLM_EXT_quaternion_relational extension included")
  21. #endif
  22. namespace glm
  23. {
  24. /// @addtogroup ext_quaternion_relational
  25. /// @{
  26. /// Returns the component-wise comparison of result x == y.
  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 vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y);
  32. /// Returns the component-wise comparison of |x - y| < epsilon.
  33. ///
  34. /// @tparam T Floating-point scalar types
  35. /// @tparam Q Value from qualifier enum
  36. template<typename T, qualifier Q>
  37. GLM_FUNC_DECL vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon);
  38. /// Returns the component-wise comparison of result x != y.
  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> notEqual(qua<T, Q> const& x, qua<T, Q> const& y);
  44. /// Returns the component-wise comparison of |x - y| >= epsilon.
  45. ///
  46. /// @tparam T Floating-point scalar types
  47. /// @tparam Q Value from qualifier enum
  48. template<typename T, qualifier Q>
  49. GLM_FUNC_DECL vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon);
  50. /// @}
  51. } //namespace glm
  52. #include "quaternion_relational.inl"