Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
6.0KB

  1. /// @ref core
  2. /// @file glm/vector_relational.hpp
  3. ///
  4. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  5. ///
  6. /// @defgroup core_func_vector_relational Vector Relational Functions
  7. /// @ingroup core
  8. ///
  9. /// Include <glm/vector_relational.hpp> to use these core features.
  10. ///
  11. /// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to
  12. /// operate on scalars and produce scalar Boolean results. For vector results,
  13. /// use the following built-in functions.
  14. ///
  15. /// In all cases, the sizes of all the input and return vectors for any particular
  16. /// call must match.
  17. #pragma once
  18. #include "detail/qualifier.hpp"
  19. #include "detail/setup.hpp"
  20. namespace glm
  21. {
  22. /// @addtogroup core_func_vector_relational
  23. /// @{
  24. /// Returns the component-wise comparison result of x < y.
  25. ///
  26. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  27. /// @tparam T A floating-point or integer scalar type.
  28. ///
  29. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a>
  30. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  31. template<length_t L, typename T, qualifier Q>
  32. GLM_FUNC_DECL vec<L, bool, Q> lessThan(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
  33. /// Returns the component-wise comparison of result x <= y.
  34. ///
  35. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  36. /// @tparam T A floating-point or integer scalar type.
  37. ///
  38. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
  39. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  40. template<length_t L, typename T, qualifier Q>
  41. GLM_FUNC_DECL vec<L, bool, Q> lessThanEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
  42. /// Returns the component-wise comparison of result x > y.
  43. ///
  44. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  45. /// @tparam T A floating-point or integer scalar type.
  46. ///
  47. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
  48. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  49. template<length_t L, typename T, qualifier Q>
  50. GLM_FUNC_DECL vec<L, bool, Q> greaterThan(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
  51. /// Returns the component-wise comparison of result x >= y.
  52. ///
  53. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  54. /// @tparam T A floating-point or integer scalar type.
  55. ///
  56. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
  57. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  58. template<length_t L, typename T, qualifier Q>
  59. GLM_FUNC_DECL vec<L, bool, Q> greaterThanEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
  60. /// Returns the component-wise comparison of result x == y.
  61. ///
  62. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  63. /// @tparam T A floating-point, integer or bool scalar type.
  64. ///
  65. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a>
  66. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  67. template<length_t L, typename T, qualifier Q>
  68. GLM_FUNC_DECL vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
  69. /// Returns the component-wise comparison of result x != y.
  70. ///
  71. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  72. /// @tparam T A floating-point, integer or bool scalar type.
  73. ///
  74. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
  75. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  76. template<length_t L, typename T, qualifier Q>
  77. GLM_FUNC_DECL vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
  78. /// Returns true if any component of x is true.
  79. ///
  80. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  81. ///
  82. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
  83. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  84. template<length_t L, qualifier Q>
  85. GLM_FUNC_DECL bool any(vec<L, bool, Q> const& v);
  86. /// Returns true if all components of x are true.
  87. ///
  88. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  89. ///
  90. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
  91. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  92. template<length_t L, qualifier Q>
  93. GLM_FUNC_DECL bool all(vec<L, bool, Q> const& v);
  94. /// Returns the component-wise logical complement of x.
  95. /// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
  96. ///
  97. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
  98. ///
  99. /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
  100. /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
  101. template<length_t L, qualifier Q>
  102. GLM_FUNC_DECL vec<L, bool, Q> not_(vec<L, bool, Q> const& v);
  103. /// @}
  104. }//namespace glm
  105. #include "detail/func_vector_relational.inl"