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_CONFIG_XYZW_ONLY 29 # elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE 32 struct { T x, y, z, w; };
33 struct { T r, g, b, a; };
34 struct { T s, t, p, q; };
36 typename detail::storage<4, T, detail::is_aligned<Q>::value>::type data;
38 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR 39 GLM_SWIZZLE4_2_MEMBERS(T, Q, x, y, z, w)
40 GLM_SWIZZLE4_2_MEMBERS(T, Q, r, g, b, a)
41 GLM_SWIZZLE4_2_MEMBERS(T, Q, s, t, p, q)
42 GLM_SWIZZLE4_3_MEMBERS(T, Q, x, y, z, w)
43 GLM_SWIZZLE4_3_MEMBERS(T, Q, r, g, b, a)
44 GLM_SWIZZLE4_3_MEMBERS(T, Q, s, t, p, q)
45 GLM_SWIZZLE4_4_MEMBERS(T, Q, x, y, z, w)
46 GLM_SWIZZLE4_4_MEMBERS(T, Q, r, g, b, a)
47 GLM_SWIZZLE4_4_MEMBERS(T, Q, s, t, p, q)
56 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION 57 GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, Q)
64 typedef length_t length_type;
65 GLM_FUNC_DECL
static GLM_CONSTEXPR length_type
length(){
return 4;}
67 GLM_FUNC_DECL GLM_CONSTEXPR T & operator[](length_type i);
68 GLM_FUNC_DECL GLM_CONSTEXPR T
const& operator[](length_type i)
const;
72 GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
73 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, Q> const& v) GLM_DEFAULT;
75 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, P> const& v);
79 GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
80 GLM_FUNC_DECL GLM_CONSTEXPR vec(T x, T y, T z, T w);
84 template<typename U, qualifier P>
85 GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
88 template<typename X, typename Y, typename Z, typename W>
89 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, Z _z, W _w);
90 template<typename X, typename Y, typename Z, typename W>
91 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w);
92 template<typename X, typename Y, typename Z, typename W>
93 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w);
94 template<typename X, typename Y, typename Z, typename W>
95 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, W _w);
96 template<typename X, typename Y, typename Z, typename W>
97 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w);
98 template<typename X, typename Y, typename Z, typename W>
99 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, W _w);
100 template<typename X, typename Y, typename Z, typename W>
101 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
102 template<typename X, typename Y, typename Z, typename W>
103 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);
104 template<typename X, typename Y, typename Z, typename W>
105 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z, vec<1, W, Q> const& _w);
106 template<typename X, typename Y, typename Z, typename W>
107 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
108 template<typename X, typename Y, typename Z, typename W>
109 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);
110 template<typename X, typename Y, typename Z, typename W>
111 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
112 template<typename X, typename Y, typename Z, typename W>
113 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);
114 template<typename X, typename Y, typename Z, typename W>
115 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);
116 template<typename X, typename Y, typename Z, typename W>
117 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);
122 template<typename A, typename B, typename C, qualifier P>
123 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z, C _w);
125 template<typename A, typename B, typename C, qualifier P>
126 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w);
128 template<typename A, typename B, typename C, qualifier P>
129 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w);
131 template<typename A, typename B, typename C, qualifier P>
132 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, vec<1, C, P> const& _w);
134 template<typename A, typename B, typename C, qualifier P>
135 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz, C _w);
137 template<typename A, typename B, typename C, qualifier P>
138 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w);
140 template<typename A, typename B, typename C, qualifier P>
141 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
143 template<typename A, typename B, typename C, qualifier P>
144 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
146 template<typename A, typename B, typename C, qualifier P>
147 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, B _y, vec<2, C, P> const& _zw);
149 template<typename A, typename B, typename C, qualifier P>
150 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw);
152 template<typename A, typename B, typename C, qualifier P>
153 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
155 template<typename A, typename B, typename C, qualifier P>
156 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
158 template<typename A, typename B, qualifier P>
159 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, P> const& _xyz, B _w);
161 template<typename A, typename B, qualifier P>
162 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w);
164 template<typename A, typename B, qualifier P>
165 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<3, B, P> const& _yzw);
167 template<typename A, typename B, qualifier P>
168 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw);
170 template<typename A, typename B, qualifier P>
171 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw);
174 template<typename U, qualifier P>
175 GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
178 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR 179 template<
int E0,
int E1,
int E2,
int E3>
180 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<4, T, Q, E0, E1, E2, E3>
const& that)
185 template<
int E0,
int E1,
int F0,
int F1>
186 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)
188 *
this = vec<4, T, Q>(v(), u());
191 template<
int E0,
int E1>
192 GLM_FUNC_DECL GLM_CONSTEXPR vec(T
const& x, T
const& y, detail::_swizzle<2, T, Q, E0, E1, -1, -2>
const& v)
194 *
this = vec<4, T, Q>(x, y, v());
197 template<
int E0,
int E1>
198 GLM_FUNC_DECL GLM_CONSTEXPR vec(T
const& x, detail::_swizzle<2, T, Q, E0, E1, -1, -2>
const& v, T
const& w)
200 *
this = vec<4, T, Q>(x, v(), w);
203 template<
int E0,
int E1>
204 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2>
const& v, T
const& z, T
const& w)
206 *
this = vec<4, T, Q>(v(), z, w);
209 template<
int E0,
int E1,
int E2>
210 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<3, T, Q, E0, E1, E2, -1>
const& v, T
const& w)
212 *
this = vec<4, T, Q>(v(), w);
215 template<
int E0,
int E1,
int E2>
216 GLM_FUNC_DECL GLM_CONSTEXPR vec(T
const& x, detail::_swizzle<3, T, Q, E0, E1, E2, -1>
const& v)
218 *
this = vec<4, T, Q>(x, v());
220 # endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR 224 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator=(vec<4, T, Q>
const& v) GLM_DEFAULT;
227 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator=(vec<4, U, Q>
const& v);
229 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(U scalar);
231 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(vec<1, U, Q>
const& v);
233 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(vec<4, U, Q>
const& v);
235 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(U scalar);
237 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(vec<1, U, Q>
const& v);
239 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(vec<4, U, Q>
const& v);
241 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(U scalar);
243 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(vec<1, U, Q>
const& v);
245 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(vec<4, U, Q>
const& v);
247 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(U scalar);
249 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(vec<1, U, Q>
const& v);
251 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(vec<4, U, Q>
const& v);
255 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator++();
256 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator--();
257 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator++(
int);
258 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator--(
int);
263 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(U scalar);
265 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(vec<1, U, Q>
const& v);
267 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(vec<4, U, Q>
const& v);
269 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(U scalar);
271 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(vec<1, U, Q>
const& v);
273 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(vec<4, U, Q>
const& v);
275 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(U scalar);
277 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(vec<1, U, Q>
const& v);
279 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(vec<4, U, Q>
const& v);
281 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(U scalar);
283 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(vec<1, U, Q>
const& v);
285 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(vec<4, U, Q>
const& v);
287 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(U scalar);
289 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(vec<1, U, Q>
const& v);
291 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(vec<4, U, Q>
const& v);
293 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(U scalar);
295 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(vec<1, U, Q>
const& v);
297 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(vec<4, U, Q>
const& v);
302 template<
typename T, qualifier Q>
303 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q>
const& v);
305 template<
typename T, qualifier Q>
306 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q>
const& v);
310 template<
typename T, qualifier Q>
311 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q>
const& v, T
const & scalar);
313 template<
typename T, qualifier Q>
314 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q>
const& v1, vec<1, T, Q>
const& v2);
316 template<
typename T, qualifier Q>
317 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(T scalar, vec<4, T, Q>
const& v);
319 template<
typename T, qualifier Q>
320 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<1, T, Q>
const& v1, vec<4, T, Q>
const& v2);
322 template<
typename T, qualifier Q>
323 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
325 template<
typename T, qualifier Q>
326 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q>
const& v, T
const & scalar);
328 template<
typename T, qualifier Q>
329 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q>
const& v1, vec<1, T, Q>
const& v2);
331 template<
typename T, qualifier Q>
332 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(T scalar, vec<4, T, Q>
const& v);
334 template<
typename T, qualifier Q>
335 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<1, T, Q>
const& v1, vec<4, T, Q>
const& v2);
337 template<
typename T, qualifier Q>
338 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
340 template<
typename T, qualifier Q>
341 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q>
const& v, T
const & scalar);
343 template<
typename T, qualifier Q>
344 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q>
const& v1, vec<1, T, Q>
const& v2);
346 template<
typename T, qualifier Q>
347 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(T scalar, vec<4, T, Q>
const& v);
349 template<
typename T, qualifier Q>
350 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<1, T, Q>
const& v1, vec<4, T, Q>
const& v2);
352 template<
typename T, qualifier Q>
353 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
355 template<
typename T, qualifier Q>
356 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q>
const& v, T
const & scalar);
358 template<
typename T, qualifier Q>
359 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q>
const& v1, vec<1, T, Q>
const& v2);
361 template<
typename T, qualifier Q>
362 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(T scalar, vec<4, T, Q>
const& v);
364 template<
typename T, qualifier Q>
365 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<1, T, Q>
const& v1, vec<4, T, Q>
const& v2);
367 template<
typename T, qualifier Q>
368 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
370 template<
typename T, qualifier Q>
371 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q>
const& v, T scalar);
373 template<
typename T, qualifier Q>
374 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
376 template<
typename T, qualifier Q>
377 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(T scalar, vec<4, T, Q>
const& v);
379 template<
typename T, qualifier Q>
380 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
382 template<
typename T, qualifier Q>
383 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
385 template<
typename T, qualifier Q>
386 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q>
const& v, T scalar);
388 template<
typename T, qualifier Q>
389 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
391 template<
typename T, qualifier Q>
392 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(T scalar, vec<4, T, Q>
const& v);
394 template<
typename T, qualifier Q>
395 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
397 template<
typename T, qualifier Q>
398 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
400 template<
typename T, qualifier Q>
401 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q>
const& v, T scalar);
403 template<
typename T, qualifier Q>
404 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
406 template<
typename T, qualifier Q>
407 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(T scalar, vec<4, T, Q>
const& v);
409 template<
typename T, qualifier Q>
410 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
412 template<
typename T, qualifier Q>
413 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
415 template<
typename T, qualifier Q>
416 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q>
const& v, T scalar);
418 template<
typename T, qualifier Q>
419 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
421 template<
typename T, qualifier Q>
422 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(T scalar, vec<4, T, Q>
const& v);
424 template<
typename T, qualifier Q>
425 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
427 template<
typename T, qualifier Q>
428 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
430 template<
typename T, qualifier Q>
431 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q>
const& v, T scalar);
433 template<
typename T, qualifier Q>
434 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
436 template<
typename T, qualifier Q>
437 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(T scalar, vec<4, T, Q>
const& v);
439 template<
typename T, qualifier Q>
440 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
442 template<
typename T, qualifier Q>
443 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
445 template<
typename T, qualifier Q>
446 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q>
const& v, T scalar);
448 template<
typename T, qualifier Q>
449 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q>
const& v, vec<1, T, Q>
const& scalar);
451 template<
typename T, qualifier Q>
452 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(T scalar, vec<4, T, Q>
const& v);
454 template<
typename T, qualifier Q>
455 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<1, T, Q>
const& scalar, vec<4, T, Q>
const& v);
457 template<
typename T, qualifier Q>
458 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
460 template<
typename T, qualifier Q>
461 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator~(vec<4, T, Q>
const& v);
465 template<
typename T, qualifier Q>
466 GLM_FUNC_DECL GLM_CONSTEXPR
bool operator==(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
468 template<
typename T, qualifier Q>
469 GLM_FUNC_DECL GLM_CONSTEXPR
bool operator!=(vec<4, T, Q>
const& v1, vec<4, T, Q>
const& v2);
471 template<qualifier Q>
472 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> operator&&(vec<4, bool, Q>
const& v1, vec<4, bool, Q>
const& v2);
474 template<qualifier Q>
475 GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> operator||(vec<4, bool, Q>
const& v1, vec<4, bool, Q>
const& v2);
478 #ifndef GLM_EXTERNAL_TEMPLATE 479 #include "type_vec4.inl" 480 #endif//GLM_EXTERNAL_TEMPLATE
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.