6 #include "qualifier.hpp"
7 #if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
8 # include "_swizzle.hpp"
9 #elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
10 # include "_swizzle_func.hpp"
16 template<
typename T, qualifier Q>
22 typedef vec<4, T, Q> type;
23 typedef vec<4, bool, Q> bool_type;
27 # if GLM_SILENT_WARNINGS == GLM_ENABLE
28 # if GLM_COMPILER & GLM_COMPILER_GCC
29 # pragma GCC diagnostic push
30 # pragma GCC diagnostic ignored "-Wpedantic"
31 # elif GLM_COMPILER & GLM_COMPILER_CLANG
32 # pragma clang diagnostic push
33 # pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
34 # pragma clang diagnostic ignored "-Wnested-anon-types"
35 # elif GLM_COMPILER & GLM_COMPILER_VC
36 # pragma warning(push)
37 # pragma warning(disable: 4201) // nonstandard extension used : nameless struct/union
41 # if GLM_CONFIG_XYZW_ONLY
43 # elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
46 struct { T x, y, z, w; };
47 struct { T r, g, b, a; };
48 struct { T s, t, p, q; };
50 typename detail::storage<4, T, detail::is_aligned<Q>::value>::type data;
52 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
53 GLM_SWIZZLE4_2_MEMBERS(T, Q, x, y, z, w)
54 GLM_SWIZZLE4_2_MEMBERS(T, Q, r, g, b, a)
55 GLM_SWIZZLE4_2_MEMBERS(T, Q, s, t, p, q)
56 GLM_SWIZZLE4_3_MEMBERS(T, Q, x, y, z, w)
57 GLM_SWIZZLE4_3_MEMBERS(T, Q, r, g, b, a)
58 GLM_SWIZZLE4_3_MEMBERS(T, Q, s, t, p, q)
59 GLM_SWIZZLE4_4_MEMBERS(T, Q, x, y, z, w)
60 GLM_SWIZZLE4_4_MEMBERS(T, Q, r, g, b, a)
61 GLM_SWIZZLE4_4_MEMBERS(T, Q, s, t, p, q)
70 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
71 GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, Q)
75 # if GLM_SILENT_WARNINGS == GLM_ENABLE
76 # if GLM_COMPILER & GLM_COMPILER_CLANG
77 # pragma clang diagnostic pop
78 # elif GLM_COMPILER & GLM_COMPILER_GCC
79 # pragma GCC diagnostic pop
80 # elif GLM_COMPILER & GLM_COMPILER_VC
87 typedef length_t length_type;
90 GLM_FUNC_DECL
static GLM_CONSTEXPR length_type
length(){
return 4;}
92 GLM_FUNC_DECL GLM_CONSTEXPR T & operator[](length_type i);
93 GLM_FUNC_DECL GLM_CONSTEXPR T
const& operator[](length_type i)
const;
97 GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
98 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, Q> const& v) GLM_DEFAULT;
100 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, P> const& v);
104 GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
105 GLM_FUNC_DECL GLM_CONSTEXPR vec(T x, T y, T z, T w);
109 template<typename U, qualifier P>
110 GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
113 template<typename X, typename Y, typename Z, typename W>
114 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, Z _z, W _w);
115 template<typename X, typename Y, typename Z, typename W>
116 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w);
117 template<typename X, typename Y, typename Z, typename W>
118 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w);
119 template<typename X, typename Y, typename Z, typename W>
120 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, W _w);
121 template<typename X, typename Y, typename Z, typename W>
122 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w);
123 template<typename X, typename Y, typename Z, typename W>
124 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, W _w);
125 template<typename X, typename Y, typename Z, typename W>
126 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
127 template<typename X, typename Y, typename Z, typename W>
128 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
129 template<typename X, typename Y, typename Z, typename W>
130 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z, vec<1, W, Q> const& _w);
131 template<typename X, typename Y, typename Z, typename W>
132 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
133 template<typename X, typename Y, typename Z, typename W>
134 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
135 template<typename X, typename Y, typename Z, typename W>
136 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
137 template<typename X, typename Y, typename Z, typename W>
138 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
139 template<typename X, typename Y, typename Z, typename W>
140 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
141 template<typename X, typename Y, typename Z, typename W>
142 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _Y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
147 template<typename A, typename B, typename C, qualifier P>
148 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z, C _w);
150 template<typename A, typename B, typename C, qualifier P>
151 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w);
153 template<typename A, typename B, typename C, qualifier P>
154 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w);
156 template<typename A, typename B, typename C, qualifier P>
157 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, vec<1, C, P> const& _w);
159 template<typename A, typename B, typename C, qualifier P>
160 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz, C _w);
162 template<typename A, typename B, typename C, qualifier P>
163 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w);
165 template<typename A, typename B, typename C, qualifier P>
166 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
168 template<typename A, typename B, typename C, qualifier P>
169 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
171 template<typename A, typename B, typename C, qualifier P>
172 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, B _y, vec<2, C, P> const& _zw);
174 template<typename A, typename B, typename C, qualifier P>
175 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw);
177 template<typename A, typename B, typename C, qualifier P>
178 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
180 template<typename A, typename B, typename C, qualifier P>
181 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
183 template<typename A, typename B, qualifier P>
184 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, P> const& _xyz, B _w);
186 template<typename A, typename B, qualifier P>
187 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w);
189 template<typename A, typename B, qualifier P>
190 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<3, B, P> const& _yzw);
192 template<typename A, typename B, qualifier P>
193 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw);
195 template<typename A, typename B, qualifier P>
196 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw);
199 template<typename U, qualifier P>
200 GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
203 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
204 template<
int E0,
int E1,
int E2,
int E3>
205 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<4, T, Q, E0, E1, E2, E3>
const& that)
210 template<
int E0,
int E1,
int F0,
int F1>
211 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2>
const& v, detail::_swizzle<2, T, Q, F0, F1, -1, -2>
const& u)
213 *
this = vec<4, T, Q>(v(), u());
216 template<
int E0,
int E1>
217 GLM_FUNC_DECL GLM_CONSTEXPR vec(T
const& x, T
const& y, detail::_swizzle<2, T, Q, E0, E1, -1, -2>
const& v)
219 *
this = vec<4, T, Q>(x, y, v());
222 template<
int E0,
int E1>
223 GLM_FUNC_DECL GLM_CONSTEXPR vec(T
const& x, detail::_swizzle<2, T, Q, E0, E1, -1, -2>
const& v, T
const& w)
225 *
this = vec<4, T, Q>(x, v(), w);
228 template<
int E0,
int E1>
229 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2>
const& v, T
const& z, T
const& w)
231 *
this = vec<4, T, Q>(v(), z, w);
234 template<
int E0,
int E1,
int E2>
235 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<3, T, Q, E0, E1, E2, -1>
const& v, T
const& w)
237 *
this = vec<4, T, Q>(v(), w);
240 template<
int E0,
int E1,
int E2>
241 GLM_FUNC_DECL GLM_CONSTEXPR vec(T
const& x, detail::_swizzle<3, T, Q, E0, E1, E2, -1>
const& v)
243 *
this = vec<4, T, Q>(x, v());
245 # endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
249 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator=(vec<4, T, Q>
const& v) GLM_DEFAULT;
252 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator=(vec<4, U, Q>
const& v);
254 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(U scalar);
256 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(vec<1, U, Q>
const& v);
258 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(vec<4, U, Q>
const& v);
260 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(U scalar);
262 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(vec<1, U, Q>
const& v);
264 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(vec<4, U, Q>
const& v);
266 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(U scalar);
268 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(vec<1, U, Q>
const& v);
270 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(vec<4, U, Q>
const& v);
272 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(U scalar);
274 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(vec<1, U, Q>
const& v);
276 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(vec<4, U, Q>
const& v);
280 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator++();
281 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator--();
282 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator++(
int);
283 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator--(
int);
288 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(U scalar);
290 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(vec<1, U, Q>
const& v);
292 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(vec<4, U, Q>
const& v);
294 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(U scalar);
296 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(vec<1, U, Q>
const& v);
298 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(vec<4, U, Q>
const& v);
300 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(U scalar);
302 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(vec<1, U, Q>
const& v);
304 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(vec<4, U, Q>
const& v);
306 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(U scalar);
308 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(vec<1, U, Q>
const& v);
310 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(vec<4, U, Q>
const& v);
312 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(U scalar);
314 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(vec<1, U, Q>
const& v);
316 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(vec<4, U, Q>
const& v);
318 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(U scalar);
320 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(vec<1, U, Q>
const& v);
322 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(vec<4, U, Q>
const& v);
327 template<
typename T, qualifier Q>
328 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q>
const& v);
330 template<
typename T, qualifier Q>
331 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q>
const& v);
335 template<
typename T, qualifier Q>
336 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q>
const& v, T
const & scalar);
338 template<
typename T, qualifier Q>
339 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q>
const& v1, vec<1, T, Q>
const& v2);
341 template<
typename T, qualifier Q>
342 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(T scalar, vec<4, T, Q>
const& v);
344 template<
typename T, qualifier Q>
345 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<1, T, Q>
const& v1, vec<4, T, Q>
const& v2);
347 template<
typename T, qualifier Q>
348 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
350 template<
typename T, qualifier Q>
351 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q>
const& v, T
const & scalar);
353 template<
typename T, qualifier Q>
354 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q>
const& v1, vec<1, T, Q>
const& v2);
356 template<
typename T, qualifier Q>
357 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(T scalar, vec<4, T, Q>
const& v);
359 template<
typename T, qualifier Q>
360 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<1, T, Q>
const& v1, vec<4, T, Q>
const& v2);
362 template<
typename T, qualifier Q>
363 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
365 template<
typename T, qualifier Q>
366 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q>
const& v, T
const & scalar);
368 template<
typename T, qualifier Q>
369 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q>
const& v1, vec<1, T, Q>
const& v2);
371 template<
typename T, qualifier Q>
372 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(T scalar, vec<4, T, Q>
const& v);
374 template<
typename T, qualifier Q>
375 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<1, T, Q>
const& v1, vec<4, T, Q>
const& v2);
377 template<
typename T, qualifier Q>
378 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
380 template<
typename T, qualifier Q>
381 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q>
const& v, T
const & scalar);
383 template<
typename T, qualifier Q>
384 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q>
const& v1, vec<1, T, Q>
const& v2);
386 template<
typename T, qualifier Q>
387 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(T scalar, vec<4, T, Q>
const& v);
389 template<
typename T, qualifier Q>
390 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<1, T, Q>
const& v1, vec<4, T, Q>
const& v2);
392 template<
typename T, qualifier Q>
393 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
395 template<
typename T, qualifier Q>
396 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q>
const& v, T scalar);
398 template<
typename T, qualifier Q>
399 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
401 template<
typename T, qualifier Q>
402 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(T scalar, vec<4, T, Q>
const& v);
404 template<
typename T, qualifier Q>
405 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
407 template<
typename T, qualifier Q>
408 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
410 template<
typename T, qualifier Q>
411 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q>
const& v, T scalar);
413 template<
typename T, qualifier Q>
414 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
416 template<
typename T, qualifier Q>
417 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(T scalar, vec<4, T, Q>
const& v);
419 template<
typename T, qualifier Q>
420 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
422 template<
typename T, qualifier Q>
423 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
425 template<
typename T, qualifier Q>
426 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q>
const& v, T scalar);
428 template<
typename T, qualifier Q>
429 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
431 template<
typename T, qualifier Q>
432 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(T scalar, vec<4, T, Q>
const& v);
434 template<
typename T, qualifier Q>
435 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
437 template<
typename T, qualifier Q>
438 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
440 template<
typename T, qualifier Q>
441 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q>
const& v, T scalar);
443 template<
typename T, qualifier Q>
444 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
446 template<
typename T, qualifier Q>
447 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(T scalar, vec<4, T, Q>
const& v);
449 template<
typename T, qualifier Q>
450 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
452 template<
typename T, qualifier Q>
453 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
455 template<
typename T, qualifier Q>
456 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q>
const& v, T scalar);
458 template<
typename T, qualifier Q>
459 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
461 template<
typename T, qualifier Q>
462 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(T scalar, vec<4, T, Q>
const& v);
464 template<
typename T, qualifier Q>
465 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
467 template<
typename T, qualifier Q>
468 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
470 template<
typename T, qualifier Q>
471 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q>
const& v, T scalar);
473 template<
typename T, qualifier Q>
474 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
476 template<
typename T, qualifier Q>
477 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(T scalar, vec<4, T, Q>
const& v);
479 template<
typename T, qualifier Q>
480 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
482 template<
typename T, qualifier Q>
483 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
485 template<
typename T, qualifier Q>
486 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator~(vec<4, T, Q>
const& v);
490 template<
typename T, qualifier Q>
491 GLM_FUNC_DECL GLM_CONSTEXPR
bool operator==(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
493 template<
typename T, qualifier Q>
494 GLM_FUNC_DECL GLM_CONSTEXPR
bool operator!=(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
496 template<qualifier Q>
497 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> operator&&(vec<4, bool, Q>
const& v1, vec<4, bool, Q>
const& v2);
499 template<qualifier Q>
500 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> operator||(vec<4, bool, Q>
const& v1, vec<4, bool, Q>
const& v2);
503 #ifndef GLM_EXTERNAL_TEMPLATE
504 #include "type_vec4.inl"
505 #endif//GLM_EXTERNAL_TEMPLATE
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.