master
ブランチ master
VulkanExample / dep / include / glm / gtx / associated_min_max.hpp
7.6 KB、205行 生 Blame 履歴
1/// @ref gtx_associated_min_max
2/// @file glm/gtx/associated_min_max.hpp
3///
4/// @see core (dependence)
5/// @see gtx_extented_min_max (dependence)
6///
7/// @defgroup gtx_associated_min_max GLM_GTX_associated_min_max
8/// @ingroup gtx
9///
10/// Include <glm/gtx/associated_min_max.hpp> to use the features of this extension.
11///
12/// @brief Min and max functions that return associated values not the compared ones.
13
14#pragma once
15
16// Dependency:
17#include "../glm.hpp"
18
19#ifndef GLM_ENABLE_EXPERIMENTAL
20# error "GLM: GLM_GTX_associated_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
22# pragma message("GLM: GLM_GTX_associated_min_max extension included")
23#endif
24
25namespace glm
26{
27 /// @addtogroup gtx_associated_min_max
28 /// @{
29
30 /// Minimum comparison between 2 variables and returns 2 associated variable values
31 /// @see gtx_associated_min_max
32 template<typename T, typename U>
33 GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b);
34
35 /// Minimum comparison between 2 variables and returns 2 associated variable values
36 /// @see gtx_associated_min_max
37 template<length_t L, typename T, typename U, qualifier Q>
38 GLM_FUNC_DECL vec<L, U, Q> associatedMin(
39 vec<L, T, Q> const& x, vec<L, U, Q> const& a,
40 vec<L, T, Q> const& y, vec<L, U, Q> const& b);
41
42 /// Minimum comparison between 2 variables and returns 2 associated variable values
43 /// @see gtx_associated_min_max
44 template<length_t L, typename T, typename U, qualifier Q>
45 GLM_FUNC_DECL vec<L, U, Q> associatedMin(
46 T x, const vec<L, U, Q>& a,
47 T y, const vec<L, U, Q>& b);
48
49 /// Minimum comparison between 2 variables and returns 2 associated variable values
50 /// @see gtx_associated_min_max
51 template<length_t L, typename T, typename U, qualifier Q>
52 GLM_FUNC_DECL vec<L, U, Q> associatedMin(
53 vec<L, T, Q> const& x, U a,
54 vec<L, T, Q> const& y, U b);
55
56 /// Minimum comparison between 3 variables and returns 3 associated variable values
57 /// @see gtx_associated_min_max
58 template<typename T, typename U>
59 GLM_FUNC_DECL U associatedMin(
60 T x, U a,
61 T y, U b,
62 T z, U c);
63
64 /// Minimum comparison between 3 variables and returns 3 associated variable values
65 /// @see gtx_associated_min_max
66 template<length_t L, typename T, typename U, qualifier Q>
67 GLM_FUNC_DECL vec<L, U, Q> associatedMin(
68 vec<L, T, Q> const& x, vec<L, U, Q> const& a,
69 vec<L, T, Q> const& y, vec<L, U, Q> const& b,
70 vec<L, T, Q> const& z, vec<L, U, Q> const& c);
71
72 /// Minimum comparison between 4 variables and returns 4 associated variable values
73 /// @see gtx_associated_min_max
74 template<typename T, typename U>
75 GLM_FUNC_DECL U associatedMin(
76 T x, U a,
77 T y, U b,
78 T z, U c,
79 T w, U d);
80
81 /// Minimum comparison between 4 variables and returns 4 associated variable values
82 /// @see gtx_associated_min_max
83 template<length_t L, typename T, typename U, qualifier Q>
84 GLM_FUNC_DECL vec<L, U, Q> associatedMin(
85 vec<L, T, Q> const& x, vec<L, U, Q> const& a,
86 vec<L, T, Q> const& y, vec<L, U, Q> const& b,
87 vec<L, T, Q> const& z, vec<L, U, Q> const& c,
88 vec<L, T, Q> const& w, vec<L, U, Q> const& d);
89
90 /// Minimum comparison between 4 variables and returns 4 associated variable values
91 /// @see gtx_associated_min_max
92 template<length_t L, typename T, typename U, qualifier Q>
93 GLM_FUNC_DECL vec<L, U, Q> associatedMin(
94 T x, vec<L, U, Q> const& a,
95 T y, vec<L, U, Q> const& b,
96 T z, vec<L, U, Q> const& c,
97 T w, vec<L, U, Q> const& d);
98
99 /// Minimum comparison between 4 variables and returns 4 associated variable values
100 /// @see gtx_associated_min_max
101 template<length_t L, typename T, typename U, qualifier Q>
102 GLM_FUNC_DECL vec<L, U, Q> associatedMin(
103 vec<L, T, Q> const& x, U a,
104 vec<L, T, Q> const& y, U b,
105 vec<L, T, Q> const& z, U c,
106 vec<L, T, Q> const& w, U d);
107
108 /// Maximum comparison between 2 variables and returns 2 associated variable values
109 /// @see gtx_associated_min_max
110 template<typename T, typename U>
111 GLM_FUNC_DECL U associatedMax(T x, U a, T y, U b);
112
113 /// Maximum comparison between 2 variables and returns 2 associated variable values
114 /// @see gtx_associated_min_max
115 template<length_t L, typename T, typename U, qualifier Q>
116 GLM_FUNC_DECL vec<L, U, Q> associatedMax(
117 vec<L, T, Q> const& x, vec<L, U, Q> const& a,
118 vec<L, T, Q> const& y, vec<L, U, Q> const& b);
119
120 /// Maximum comparison between 2 variables and returns 2 associated variable values
121 /// @see gtx_associated_min_max
122 template<length_t L, typename T, typename U, qualifier Q>
123 GLM_FUNC_DECL vec<L, T, Q> associatedMax(
124 T x, vec<L, U, Q> const& a,
125 T y, vec<L, U, Q> const& b);
126
127 /// Maximum comparison between 2 variables and returns 2 associated variable values
128 /// @see gtx_associated_min_max
129 template<length_t L, typename T, typename U, qualifier Q>
130 GLM_FUNC_DECL vec<L, U, Q> associatedMax(
131 vec<L, T, Q> const& x, U a,
132 vec<L, T, Q> const& y, U b);
133
134 /// Maximum comparison between 3 variables and returns 3 associated variable values
135 /// @see gtx_associated_min_max
136 template<typename T, typename U>
137 GLM_FUNC_DECL U associatedMax(
138 T x, U a,
139 T y, U b,
140 T z, U c);
141
142 /// Maximum comparison between 3 variables and returns 3 associated variable values
143 /// @see gtx_associated_min_max
144 template<length_t L, typename T, typename U, qualifier Q>
145 GLM_FUNC_DECL vec<L, U, Q> associatedMax(
146 vec<L, T, Q> const& x, vec<L, U, Q> const& a,
147 vec<L, T, Q> const& y, vec<L, U, Q> const& b,
148 vec<L, T, Q> const& z, vec<L, U, Q> const& c);
149
150 /// Maximum comparison between 3 variables and returns 3 associated variable values
151 /// @see gtx_associated_min_max
152 template<length_t L, typename T, typename U, qualifier Q>
153 GLM_FUNC_DECL vec<L, T, Q> associatedMax(
154 T x, vec<L, U, Q> const& a,
155 T y, vec<L, U, Q> const& b,
156 T z, vec<L, U, Q> const& c);
157
158 /// Maximum comparison between 3 variables and returns 3 associated variable values
159 /// @see gtx_associated_min_max
160 template<length_t L, typename T, typename U, qualifier Q>
161 GLM_FUNC_DECL vec<L, U, Q> associatedMax(
162 vec<L, T, Q> const& x, U a,
163 vec<L, T, Q> const& y, U b,
164 vec<L, T, Q> const& z, U c);
165
166 /// Maximum comparison between 4 variables and returns 4 associated variable values
167 /// @see gtx_associated_min_max
168 template<typename T, typename U>
169 GLM_FUNC_DECL U associatedMax(
170 T x, U a,
171 T y, U b,
172 T z, U c,
173 T w, U d);
174
175 /// Maximum comparison between 4 variables and returns 4 associated variable values
176 /// @see gtx_associated_min_max
177 template<length_t L, typename T, typename U, qualifier Q>
178 GLM_FUNC_DECL vec<L, U, Q> associatedMax(
179 vec<L, T, Q> const& x, vec<L, U, Q> const& a,
180 vec<L, T, Q> const& y, vec<L, U, Q> const& b,
181 vec<L, T, Q> const& z, vec<L, U, Q> const& c,
182 vec<L, T, Q> const& w, vec<L, U, Q> const& d);
183
184 /// Maximum comparison between 4 variables and returns 4 associated variable values
185 /// @see gtx_associated_min_max
186 template<length_t L, typename T, typename U, qualifier Q>
187 GLM_FUNC_DECL vec<L, U, Q> associatedMax(
188 T x, vec<L, U, Q> const& a,
189 T y, vec<L, U, Q> const& b,
190 T z, vec<L, U, Q> const& c,
191 T w, vec<L, U, Q> const& d);
192
193 /// Maximum comparison between 4 variables and returns 4 associated variable values
194 /// @see gtx_associated_min_max
195 template<length_t L, typename T, typename U, qualifier Q>
196 GLM_FUNC_DECL vec<L, U, Q> associatedMax(
197 vec<L, T, Q> const& x, U a,
198 vec<L, T, Q> const& y, U b,
199 vec<L, T, Q> const& z, U c,
200 vec<L, T, Q> const& w, U d);
201
202 /// @}
203} //namespace glm
204
205#include "associated_min_max.inl"