0.9.6
type_vec.hpp
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include "precision.hpp"
36 #include "type_int.hpp"
37 
38 namespace glm
39 {
40  template <typename T, precision P> struct tvec1;
41  template <typename T, precision P> struct tvec2;
42  template <typename T, precision P> struct tvec3;
43  template <typename T, precision P> struct tvec4;
44 
45  typedef tvec1<float, highp> highp_vec1_t;
46  typedef tvec1<float, mediump> mediump_vec1_t;
47  typedef tvec1<float, lowp> lowp_vec1_t;
48  typedef tvec1<double, highp> highp_dvec1_t;
49  typedef tvec1<double, mediump> mediump_dvec1_t;
50  typedef tvec1<double, lowp> lowp_dvec1_t;
51  typedef tvec1<int, highp> highp_ivec1_t;
52  typedef tvec1<int, mediump> mediump_ivec1_t;
53  typedef tvec1<int, lowp> lowp_ivec1_t;
54  typedef tvec1<uint, highp> highp_uvec1_t;
55  typedef tvec1<uint, mediump> mediump_uvec1_t;
56  typedef tvec1<uint, lowp> lowp_uvec1_t;
57  typedef tvec1<bool, highp> highp_bvec1_t;
58  typedef tvec1<bool, mediump> mediump_bvec1_t;
59  typedef tvec1<bool, lowp> lowp_bvec1_t;
60 
63 
69  typedef tvec2<float, highp> highp_vec2;
70 
76  typedef tvec2<float, mediump> mediump_vec2;
77 
83  typedef tvec2<float, lowp> lowp_vec2;
84 
90  typedef tvec2<double, highp> highp_dvec2;
91 
97  typedef tvec2<double, mediump> mediump_dvec2;
98 
104  typedef tvec2<double, lowp> lowp_dvec2;
105 
111  typedef tvec2<int, highp> highp_ivec2;
112 
118  typedef tvec2<int, mediump> mediump_ivec2;
119 
125  typedef tvec2<int, lowp> lowp_ivec2;
126 
132  typedef tvec2<uint, highp> highp_uvec2;
133 
139  typedef tvec2<uint, mediump> mediump_uvec2;
140 
146  typedef tvec2<uint, lowp> lowp_uvec2;
147 
153  typedef tvec2<bool, highp> highp_bvec2;
154 
160  typedef tvec2<bool, mediump> mediump_bvec2;
161 
167  typedef tvec2<bool, lowp> lowp_bvec2;
168 
170 
171 
174 
180  typedef tvec3<float, highp> highp_vec3;
181 
187  typedef tvec3<float, mediump> mediump_vec3;
188 
194  typedef tvec3<float, lowp> lowp_vec3;
195 
201  typedef tvec3<double, highp> highp_dvec3;
202 
208  typedef tvec3<double, mediump> mediump_dvec3;
209 
215  typedef tvec3<double, lowp> lowp_dvec3;
216 
222  typedef tvec3<int, highp> highp_ivec3;
223 
229  typedef tvec3<int, mediump> mediump_ivec3;
230 
236  typedef tvec3<int, lowp> lowp_ivec3;
237 
243  typedef tvec3<uint, highp> highp_uvec3;
244 
250  typedef tvec3<uint, mediump> mediump_uvec3;
251 
257  typedef tvec3<uint, lowp> lowp_uvec3;
258 
263  typedef tvec3<bool, highp> highp_bvec3;
264 
269  typedef tvec3<bool, mediump> mediump_bvec3;
270 
275  typedef tvec3<bool, lowp> lowp_bvec3;
276 
278 
281 
286  typedef tvec4<float, highp> highp_vec4;
287 
292  typedef tvec4<float, mediump> mediump_vec4;
293 
298  typedef tvec4<float, lowp> lowp_vec4;
299 
304  typedef tvec4<double, highp> highp_dvec4;
305 
310  typedef tvec4<double, mediump> mediump_dvec4;
311 
316  typedef tvec4<double, lowp> lowp_dvec4;
317 
322  typedef tvec4<int, highp> highp_ivec4;
323 
328  typedef tvec4<int, mediump> mediump_ivec4;
329 
334  typedef tvec4<int, lowp> lowp_ivec4;
335 
340  typedef tvec4<uint, highp> highp_uvec4;
341 
346  typedef tvec4<uint, mediump> mediump_uvec4;
347 
352  typedef tvec4<uint, lowp> lowp_uvec4;
353 
358  typedef tvec4<bool, highp> highp_bvec4;
359 
364  typedef tvec4<bool, mediump> mediump_bvec4;
365 
370  typedef tvec4<bool, lowp> lowp_bvec4;
371 
373 
376 
378  // Default float definition
379 
380 #if(defined(GLM_PRECISION_LOWP_FLOAT))
381  typedef lowp_vec2 vec2;
382  typedef lowp_vec3 vec3;
383  typedef lowp_vec4 vec4;
384 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
385  typedef mediump_vec2 vec2;
386  typedef mediump_vec3 vec3;
387  typedef mediump_vec4 vec4;
388 #else //defined(GLM_PRECISION_HIGHP_FLOAT)
389  typedef highp_vec2 vec2;
393 
397  typedef highp_vec3 vec3;
398 
402  typedef highp_vec4 vec4;
403 #endif//GLM_PRECISION
404 
406  // Default double definition
407 
408 #if(defined(GLM_PRECISION_LOWP_DOUBLE))
409  typedef lowp_dvec2 dvec2;
410  typedef lowp_dvec3 dvec3;
411  typedef lowp_dvec4 dvec4;
412 #elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
413  typedef mediump_dvec2 dvec2;
414  typedef mediump_dvec3 dvec3;
415  typedef mediump_dvec4 dvec4;
416 #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
417  typedef highp_dvec2 dvec2;
421 
425  typedef highp_dvec3 dvec3;
426 
430  typedef highp_dvec4 dvec4;
431 #endif//GLM_PRECISION
432 
434  // Signed integer definition
435 
436 #if(defined(GLM_PRECISION_LOWP_INT))
437  typedef lowp_ivec2 ivec2;
438  typedef lowp_ivec3 ivec3;
439  typedef lowp_ivec4 ivec4;
440 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
441  typedef mediump_ivec2 ivec2;
442  typedef mediump_ivec3 ivec3;
443  typedef mediump_ivec4 ivec4;
444 #else //defined(GLM_PRECISION_HIGHP_INT)
445  typedef highp_ivec2 ivec2;
449 
453  typedef highp_ivec3 ivec3;
454 
458  typedef highp_ivec4 ivec4;
459 #endif//GLM_PRECISION
460 
462  // Unsigned integer definition
463 
464 #if(defined(GLM_PRECISION_LOWP_UINT))
465  typedef lowp_uvec2 uvec2;
466  typedef lowp_uvec3 uvec3;
467  typedef lowp_uvec4 uvec4;
468 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
469  typedef mediump_uvec2 uvec2;
470  typedef mediump_uvec3 uvec3;
471  typedef mediump_uvec4 uvec4;
472 #else //defined(GLM_PRECISION_HIGHP_UINT)
473  typedef highp_uvec2 uvec2;
477 
481  typedef highp_uvec3 uvec3;
482 
486  typedef highp_uvec4 uvec4;
487 #endif//GLM_PRECISION
488 
490  // Boolean definition
491 
492 #if(defined(GLM_PRECISION_LOWP_BOOL))
493  typedef lowp_bvec2 bvec2;
494  typedef lowp_bvec3 bvec3;
495  typedef lowp_bvec4 bvec4;
496 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
497  typedef mediump_bvec2 bvec2;
498  typedef mediump_bvec3 bvec3;
499  typedef mediump_bvec4 bvec4;
500 #else //defined(GLM_PRECISION_HIGHP_BOOL)
501  typedef highp_bvec2 bvec2;
505 
509  typedef highp_bvec3 bvec3;
510 
514  typedef highp_bvec4 bvec4;
515 #endif//GLM_PRECISION
516 
518 }//namespace glm
tvec3< bool, lowp > lowp_bvec3
3 components vector of low precision bool numbers.
Definition: type_vec.hpp:275
tvec4< uint, mediump > mediump_uvec4
4 components vector of medium precision unsigned integer numbers.
Definition: type_vec.hpp:346
OpenGL Mathematics (glm.g-truc.net)
tvec4< uint, lowp > lowp_uvec4
4 components vector of low precision unsigned integer numbers.
Definition: type_vec.hpp:352
tvec2< bool, lowp > lowp_bvec2
2 components vector of low precision bool numbers.
Definition: type_vec.hpp:167
tvec4< double, lowp > lowp_dvec4
4 components vector of low double-precision floating-point numbers.
Definition: type_vec.hpp:316
tvec2< uint, lowp > lowp_uvec2
2 components vector of low precision unsigned integer numbers.
Definition: type_vec.hpp:146
tvec3< int, highp > highp_ivec3
3 components vector of high precision signed integer numbers.
Definition: type_vec.hpp:222
tvec4< float, lowp > lowp_vec4
4 components vector of low single-precision floating-point numbers.
Definition: type_vec.hpp:298
highp_vec4 vec4
4 components vector of floating-point numbers.
Definition: type_vec.hpp:402
tvec4< double, mediump > mediump_dvec4
4 components vector of medium double-precision floating-point numbers.
Definition: type_vec.hpp:310
tvec2< float, lowp > lowp_vec2
2 components vector of low single-precision floating-point numbers.
Definition: type_vec.hpp:83
tvec3< uint, mediump > mediump_uvec3
3 components vector of medium precision unsigned integer numbers.
Definition: type_vec.hpp:250
highp_ivec4 ivec4
4 components vector of signed integer numbers.
Definition: type_vec.hpp:458
highp_bvec4 bvec4
4 components vector of boolean.
Definition: type_vec.hpp:514
tvec4< bool, highp > highp_bvec4
4 components vector of high precision bool numbers.
Definition: type_vec.hpp:358
tvec3< uint, highp > highp_uvec3
3 components vector of high precision unsigned integer numbers.
Definition: type_vec.hpp:243
tvec2< bool, mediump > mediump_bvec2
2 components vector of medium precision bool numbers.
Definition: type_vec.hpp:160
tvec4< float, mediump > mediump_vec4
4 components vector of medium single-precision floating-point numbers.
Definition: type_vec.hpp:292
highp_bvec2 bvec2
2 components vector of boolean.
Definition: type_vec.hpp:504
OpenGL Mathematics (glm.g-truc.net)
tvec4< int, highp > highp_ivec4
4 components vector of high precision signed integer numbers.
Definition: type_vec.hpp:322
tvec3< int, lowp > lowp_ivec3
3 components vector of low precision signed integer numbers.
Definition: type_vec.hpp:236
tvec3< float, highp > highp_vec3
3 components vector of high single-precision floating-point numbers.
Definition: type_vec.hpp:180
highp_uvec3 uvec3
3 components vector of unsigned integer numbers.
Definition: type_vec.hpp:481
tvec4< int, mediump > mediump_ivec4
4 components vector of medium precision signed integer numbers.
Definition: type_vec.hpp:328
tvec4< bool, mediump > mediump_bvec4
4 components vector of medium precision bool numbers.
Definition: type_vec.hpp:364
tvec3< uint, lowp > lowp_uvec3
3 components vector of low precision unsigned integer numbers.
Definition: type_vec.hpp:257
tvec4< bool, lowp > lowp_bvec4
4 components vector of low precision bool numbers.
Definition: type_vec.hpp:370
highp_dvec2 dvec2
2 components vector of double-precision floating-point numbers.
Definition: type_vec.hpp:420
tvec3< bool, mediump > mediump_bvec3
3 components vector of medium precision bool numbers.
Definition: type_vec.hpp:269
tvec3< double, mediump > mediump_dvec3
3 components vector of medium double-precision floating-point numbers.
Definition: type_vec.hpp:208
tvec3< float, lowp > lowp_vec3
3 components vector of low single-precision floating-point numbers.
Definition: type_vec.hpp:194
tvec2< float, highp > highp_vec2
2 components vector of high single-precision floating-point numbers.
Definition: type_vec.hpp:69
tvec3< double, highp > highp_dvec3
3 components vector of high double-precision floating-point numbers.
Definition: type_vec.hpp:201
tvec2< int, highp > highp_ivec2
2 components vector of high precision signed integer numbers.
Definition: type_vec.hpp:111
tvec4< double, highp > highp_dvec4
4 components vector of high double-precision floating-point numbers.
Definition: type_vec.hpp:304
tvec2< int, mediump > mediump_ivec2
2 components vector of medium precision signed integer numbers.
Definition: type_vec.hpp:118
tvec2< bool, highp > highp_bvec2
2 components vector of high precision bool numbers.
Definition: type_vec.hpp:153
tvec2< double, lowp > lowp_dvec2
2 components vector of low double-precision floating-point numbers.
Definition: type_vec.hpp:104
tvec3< double, lowp > lowp_dvec3
3 components vector of low double-precision floating-point numbers.
Definition: type_vec.hpp:215
highp_uvec2 uvec2
2 components vector of unsigned integer numbers.
Definition: type_vec.hpp:476
tvec2< uint, highp > highp_uvec2
2 components vector of high precision unsigned integer numbers.
Definition: type_vec.hpp:132
tvec2< uint, mediump > mediump_uvec2
2 components vector of medium precision unsigned integer numbers.
Definition: type_vec.hpp:139
highp_bvec3 bvec3
3 components vector of boolean.
Definition: type_vec.hpp:509
tvec2< double, mediump > mediump_dvec2
2 components vector of medium double-precision floating-point numbers.
Definition: type_vec.hpp:97
tvec4< float, highp > highp_vec4
4 components vector of high single-precision floating-point numbers.
Definition: type_vec.hpp:286
highp_ivec3 ivec3
3 components vector of signed integer numbers.
Definition: type_vec.hpp:453
tvec4< uint, highp > highp_uvec4
4 components vector of high precision unsigned integer numbers.
Definition: type_vec.hpp:340
tvec4< int, lowp > lowp_ivec4
4 components vector of low precision signed integer numbers.
Definition: type_vec.hpp:334
Definition: _noise.hpp:39
tvec3< bool, highp > highp_bvec3
3 components vector of high precision bool numbers.
Definition: type_vec.hpp:263
tvec3< int, mediump > mediump_ivec3
3 components vector of medium precision signed integer numbers.
Definition: type_vec.hpp:229
highp_vec3 vec3
3 components vector of floating-point numbers.
Definition: type_vec.hpp:397
tvec2< double, highp > highp_dvec2
2 components vector of high double-precision floating-point numbers.
Definition: type_vec.hpp:90
highp_dvec3 dvec3
3 components vector of double-precision floating-point numbers.
Definition: type_vec.hpp:425
highp_vec2 vec2
2 components vector of floating-point numbers.
Definition: type_vec.hpp:392
tvec3< float, mediump > mediump_vec3
3 components vector of medium single-precision floating-point numbers.
Definition: type_vec.hpp:187
tvec2< int, lowp > lowp_ivec2
2 components vector of low precision signed integer numbers.
Definition: type_vec.hpp:125
highp_ivec2 ivec2
2 components vector of signed integer numbers.
Definition: type_vec.hpp:448
highp_uvec4 uvec4
4 components vector of unsigned integer numbers.
Definition: type_vec.hpp:486
tvec2< float, mediump > mediump_vec2
2 components vector of medium single-precision floating-point numbers.
Definition: type_vec.hpp:76
highp_dvec4 dvec4
4 components vector of double-precision floating-point numbers.
Definition: type_vec.hpp:430