quaternion_relational.hpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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"