| 1 | /// @ref ext_matrix_relational |
| 2 | /// @file glm/ext/matrix_relational.hpp |
| 3 | /// |
| 4 | /// @defgroup ext_matrix_relational GLM_EXT_matrix_relational |
| 5 | /// @ingroup ext |
| 6 | /// |
| 7 | /// Exposes comparison functions for matrix types that take a user defined epsilon values. |
| 8 | /// |
| 9 | /// Include <glm/ext/matrix_relational.hpp> to use the features of this extension. |
| 10 | /// |
| 11 | /// @see ext_vector_relational |
| 12 | /// @see ext_scalar_relational |
| 13 | /// @see ext_quaternion_relational |
| 14 | |
| 15 | #pragma once |
| 16 | |
| 17 | // Dependencies |
| 18 | #include "../detail/qualifier.hpp" |
| 19 | |
| 20 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
| 21 | # pragma message("GLM: GLM_EXT_matrix_relational extension included") |
| 22 | #endif |
| 23 | |
| 24 | namespace glm |
| 25 | { |
| 26 | /// @addtogroup ext_matrix_relational |
| 27 | /// @{ |
| 28 | |
| 29 | /// Perform a component-wise equal-to comparison of two matrices. |
| 30 | /// Return a boolean vector which components value is True if this expression is satisfied per column of the matrices. |
| 31 | /// |
| 32 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 33 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 34 | /// @tparam T Floating-point or integer scalar types |
| 35 | /// @tparam Q Value from qualifier enum |
| 36 | template<length_t C, length_t R, typename T, qualifier Q> |
| 37 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y); |
| 38 | |
| 39 | /// Perform a component-wise not-equal-to comparison of two matrices. |
| 40 | /// Return a boolean vector which components value is True if this expression is satisfied per column of the matrices. |
| 41 | /// |
| 42 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 43 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 44 | /// @tparam T Floating-point or integer scalar types |
| 45 | /// @tparam Q Value from qualifier enum |
| 46 | template<length_t C, length_t R, typename T, qualifier Q> |
| 47 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y); |
| 48 | |
| 49 | /// Returns the component-wise comparison of |x - y| < epsilon. |
| 50 | /// True if this expression is satisfied. |
| 51 | /// |
| 52 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 53 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 54 | /// @tparam T Floating-point or integer scalar types |
| 55 | /// @tparam Q Value from qualifier enum |
| 56 | template<length_t C, length_t R, typename T, qualifier Q> |
| 57 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, T epsilon); |
| 58 | |
| 59 | /// Returns the component-wise comparison of |x - y| < epsilon. |
| 60 | /// True if this expression is satisfied. |
| 61 | /// |
| 62 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 63 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 64 | /// @tparam T Floating-point or integer scalar types |
| 65 | /// @tparam Q Value from qualifier enum |
| 66 | template<length_t C, length_t R, typename T, qualifier Q> |
| 67 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, T, Q> const& epsilon); |
| 68 | |
| 69 | /// Returns the component-wise comparison of |x - y| < epsilon. |
| 70 | /// True if this expression is not satisfied. |
| 71 | /// |
| 72 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 73 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 74 | /// @tparam T Floating-point or integer scalar types |
| 75 | /// @tparam Q Value from qualifier enum |
| 76 | template<length_t C, length_t R, typename T, qualifier Q> |
| 77 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, T epsilon); |
| 78 | |
| 79 | /// Returns the component-wise comparison of |x - y| >= epsilon. |
| 80 | /// True if this expression is not satisfied. |
| 81 | /// |
| 82 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 83 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 84 | /// @tparam T Floating-point or integer scalar types |
| 85 | /// @tparam Q Value from qualifier enum |
| 86 | template<length_t C, length_t R, typename T, qualifier Q> |
| 87 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, T, Q> const& epsilon); |
| 88 | |
| 89 | /// Returns the component-wise comparison between two vectors in term of ULPs. |
| 90 | /// True if this expression is satisfied. |
| 91 | /// |
| 92 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 93 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 94 | /// @tparam T Floating-point |
| 95 | /// @tparam Q Value from qualifier enum |
| 96 | template<length_t C, length_t R, typename T, qualifier Q> |
| 97 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, int ULPs); |
| 98 | |
| 99 | /// Returns the component-wise comparison between two vectors in term of ULPs. |
| 100 | /// True if this expression is satisfied. |
| 101 | /// |
| 102 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 103 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 104 | /// @tparam T Floating-point |
| 105 | /// @tparam Q Value from qualifier enum |
| 106 | template<length_t C, length_t R, typename T, qualifier Q> |
| 107 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, int, Q> const& ULPs); |
| 108 | |
| 109 | /// Returns the component-wise comparison between two vectors in term of ULPs. |
| 110 | /// True if this expression is not satisfied. |
| 111 | /// |
| 112 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 113 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 114 | /// @tparam T Floating-point |
| 115 | /// @tparam Q Value from qualifier enum |
| 116 | template<length_t C, length_t R, typename T, qualifier Q> |
| 117 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, int ULPs); |
| 118 | |
| 119 | /// Returns the component-wise comparison between two vectors in term of ULPs. |
| 120 | /// True if this expression is not satisfied. |
| 121 | /// |
| 122 | /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix |
| 123 | /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix |
| 124 | /// @tparam T Floating-point |
| 125 | /// @tparam Q Value from qualifier enum |
| 126 | template<length_t C, length_t R, typename T, qualifier Q> |
| 127 | GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, int, Q> const& ULPs); |
| 128 | |
| 129 | /// @} |
| 130 | }//namespace glm |
| 131 | |
| 132 | #include "matrix_relational.inl" |