0.9.8
gtc/type_aligned.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 
14 #if !GLM_HAS_ALIGNED_TYPE
15 # error "GLM: Aligned types are not supported on this platform"
16 #endif
17 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
18 # pragma message("GLM: GLM_GTC_type_aligned extension included")
19 #endif
20 
21 #include "../vec2.hpp"
22 #include "../vec3.hpp"
23 #include "../vec4.hpp"
24 #include "../gtc/vec1.hpp"
25 
26 namespace glm
27 {
28  template <typename T, precision P> struct tvec1;
29  template <typename T, precision P> struct tvec2;
30  template <typename T, precision P> struct tvec3;
31  template <typename T, precision P> struct tvec4;
34 
35  // -- *vec1 --
36 
37  typedef tvec1<float, aligned_highp> aligned_highp_vec1;
38  typedef tvec1<float, aligned_mediump> aligned_mediump_vec1;
39  typedef tvec1<float, aligned_lowp> aligned_lowp_vec1;
40  typedef tvec1<double, aligned_highp> aligned_highp_dvec1;
41  typedef tvec1<double, aligned_mediump> aligned_mediump_dvec1;
42  typedef tvec1<double, aligned_lowp> aligned_lowp_dvec1;
43  typedef tvec1<int, aligned_highp> aligned_highp_ivec1;
44  typedef tvec1<int, aligned_mediump> aligned_mediump_ivec1;
45  typedef tvec1<int, aligned_lowp> aligned_lowp_ivec1;
46  typedef tvec1<uint, aligned_highp> aligned_highp_uvec1;
47  typedef tvec1<uint, aligned_mediump> aligned_mediump_uvec1;
48  typedef tvec1<uint, aligned_lowp> aligned_lowp_uvec1;
49  typedef tvec1<bool, aligned_highp> aligned_highp_bvec1;
50  typedef tvec1<bool, aligned_mediump> aligned_mediump_bvec1;
51  typedef tvec1<bool, aligned_lowp> aligned_lowp_bvec1;
52 
53  typedef tvec1<float, packed_highp> packed_highp_vec1;
54  typedef tvec1<float, packed_mediump> packed_mediump_vec1;
55  typedef tvec1<float, packed_lowp> packed_lowp_vec1;
56  typedef tvec1<double, packed_highp> packed_highp_dvec1;
57  typedef tvec1<double, packed_mediump> packed_mediump_dvec1;
58  typedef tvec1<double, packed_lowp> packed_lowp_dvec1;
59  typedef tvec1<int, packed_highp> packed_highp_ivec1;
60  typedef tvec1<int, packed_mediump> packed_mediump_ivec1;
61  typedef tvec1<int, packed_lowp> packed_lowp_ivec1;
62  typedef tvec1<uint, packed_highp> packed_highp_uvec1;
63  typedef tvec1<uint, packed_mediump> packed_mediump_uvec1;
64  typedef tvec1<uint, packed_lowp> packed_lowp_uvec1;
65  typedef tvec1<bool, packed_highp> packed_highp_bvec1;
66  typedef tvec1<bool, packed_mediump> packed_mediump_bvec1;
67  typedef tvec1<bool, packed_lowp> packed_lowp_bvec1;
68 
69  // -- *vec2 --
70 
73  typedef tvec2<float, aligned_highp> aligned_highp_vec2;
74 
77  typedef tvec2<float, aligned_mediump> aligned_mediump_vec2;
78 
81  typedef tvec2<float, aligned_lowp> aligned_lowp_vec2;
82 
85  typedef tvec2<double, aligned_highp> aligned_highp_dvec2;
86 
89  typedef tvec2<double, aligned_mediump> aligned_mediump_dvec2;
90 
93  typedef tvec2<double, aligned_lowp> aligned_lowp_dvec2;
94 
97  typedef tvec2<int, aligned_highp> aligned_highp_ivec2;
98 
101  typedef tvec2<int, aligned_mediump> aligned_mediump_ivec2;
102 
105  typedef tvec2<int, aligned_lowp> aligned_lowp_ivec2;
106 
109  typedef tvec2<uint, aligned_highp> aligned_highp_uvec2;
110 
113  typedef tvec2<uint, aligned_mediump> aligned_mediump_uvec2;
114 
117  typedef tvec2<uint, aligned_lowp> aligned_lowp_uvec2;
118 
121  typedef tvec2<bool, aligned_highp> aligned_highp_bvec2;
122 
125  typedef tvec2<bool, aligned_mediump> aligned_mediump_bvec2;
126 
129  typedef tvec2<bool, aligned_lowp> aligned_lowp_bvec2;
130 
131  // -- *vec3 --
132 
135  typedef tvec3<float, aligned_highp> aligned_highp_vec3;
136 
139  typedef tvec3<float, aligned_mediump> aligned_mediump_vec3;
140 
143  typedef tvec3<float, aligned_lowp> aligned_lowp_vec3;
144 
147  typedef tvec3<double, aligned_highp> aligned_highp_dvec3;
148 
151  typedef tvec3<double, aligned_mediump> aligned_mediump_dvec3;
152 
155  typedef tvec3<double, aligned_lowp> aligned_lowp_dvec3;
156 
159  typedef tvec3<int, aligned_highp> aligned_highp_ivec3;
160 
163  typedef tvec3<int, aligned_mediump> aligned_mediump_ivec3;
164 
167  typedef tvec3<int, aligned_lowp> aligned_lowp_ivec3;
168 
171  typedef tvec3<uint, aligned_highp> aligned_highp_uvec3;
172 
175  typedef tvec3<uint, aligned_mediump> aligned_mediump_uvec3;
176 
179  typedef tvec3<uint, aligned_lowp> aligned_lowp_uvec3;
180 
182  typedef tvec3<bool, aligned_highp> aligned_highp_bvec3;
183 
185  typedef tvec3<bool, aligned_mediump> aligned_mediump_bvec3;
186 
188  typedef tvec3<bool, aligned_lowp> aligned_lowp_bvec3;
189 
190  // -- *vec4 --
191 
193  typedef tvec4<float, aligned_highp> aligned_highp_vec4;
194 
196  typedef tvec4<float, aligned_mediump> aligned_mediump_vec4;
197 
199  typedef tvec4<float, aligned_lowp> aligned_lowp_vec4;
200 
202  typedef tvec4<double, aligned_highp> aligned_highp_dvec4;
203 
205  typedef tvec4<double, aligned_mediump> aligned_mediump_dvec4;
206 
208  typedef tvec4<double, aligned_lowp> aligned_lowp_dvec4;
209 
211  typedef tvec4<int, aligned_highp> aligned_highp_ivec4;
212 
214  typedef tvec4<int, aligned_mediump> aligned_mediump_ivec4;
215 
217  typedef tvec4<int, aligned_lowp> aligned_lowp_ivec4;
218 
220  typedef tvec4<uint, aligned_highp> aligned_highp_uvec4;
221 
223  typedef tvec4<uint, aligned_mediump> aligned_mediump_uvec4;
224 
226  typedef tvec4<uint, aligned_lowp> aligned_lowp_uvec4;
227 
229  typedef tvec4<bool, aligned_highp> aligned_highp_bvec4;
230 
232  typedef tvec4<bool, aligned_mediump> aligned_mediump_bvec4;
233 
235  typedef tvec4<bool, aligned_lowp> aligned_lowp_bvec4;
236 
237  // -- default --
238 
239 #if(defined(GLM_PRECISION_LOWP_FLOAT))
240  typedef aligned_lowp_vec1 aligned_vec1;
241  typedef aligned_lowp_vec2 aligned_vec2;
242  typedef aligned_lowp_vec3 aligned_vec3;
243  typedef aligned_lowp_vec4 aligned_vec4;
244 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
245  typedef aligned_mediump_vec1 aligned_vec1;
246  typedef aligned_mediump_vec2 aligned_vec2;
247  typedef aligned_mediump_vec3 aligned_vec3;
248  typedef aligned_mediump_vec4 aligned_vec4;
249 #else //defined(GLM_PRECISION_HIGHP_FLOAT)
250  typedef aligned_highp_vec1 aligned_vec1;
252 
254  typedef aligned_highp_vec2 aligned_vec2;
255 
257  typedef aligned_highp_vec3 aligned_vec3;
258 
260  typedef aligned_highp_vec4 aligned_vec4;
261 #endif//GLM_PRECISION
262 
263 #if(defined(GLM_PRECISION_LOWP_DOUBLE))
264  typedef aligned_lowp_dvec1 aligned_dvec1;
265  typedef aligned_lowp_dvec2 aligned_dvec2;
266  typedef aligned_lowp_dvec3 aligned_dvec3;
267  typedef aligned_lowp_dvec4 aligned_dvec4;
268 #elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
269  typedef aligned_mediump_dvec1 aligned_dvec1;
270  typedef aligned_mediump_dvec2 aligned_dvec2;
271  typedef aligned_mediump_dvec3 aligned_dvec3;
272  typedef aligned_mediump_dvec4 aligned_dvec4;
273 #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
274  typedef aligned_highp_dvec1 aligned_dvec1;
276 
278  typedef aligned_highp_dvec2 aligned_dvec2;
279 
281  typedef aligned_highp_dvec3 aligned_dvec3;
282 
284  typedef aligned_highp_dvec4 aligned_dvec4;
285 #endif//GLM_PRECISION
286 
287 #if(defined(GLM_PRECISION_LOWP_INT))
288  typedef aligned_lowp_ivec1 aligned_ivec1;
289  typedef aligned_lowp_ivec2 aligned_ivec2;
290  typedef aligned_lowp_ivec3 aligned_ivec3;
291  typedef aligned_lowp_ivec4 aligned_ivec4;
292 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
293  typedef aligned_mediump_ivec1 aligned_ivec1;
294  typedef aligned_mediump_ivec2 aligned_ivec2;
295  typedef aligned_mediump_ivec3 aligned_ivec3;
296  typedef aligned_mediump_ivec4 aligned_ivec4;
297 #else //defined(GLM_PRECISION_HIGHP_INT)
298  typedef aligned_highp_ivec1 aligned_ivec1;
300 
302  typedef aligned_highp_ivec2 aligned_ivec2;
303 
305  typedef aligned_highp_ivec3 aligned_ivec3;
306 
308  typedef aligned_highp_ivec4 aligned_ivec4;
309 #endif//GLM_PRECISION
310 
311  // -- Unsigned integer definition --
312 
313 #if(defined(GLM_PRECISION_LOWP_UINT))
314  typedef aligned_lowp_uvec1 aligned_uvec1;
315  typedef aligned_lowp_uvec2 aligned_uvec2;
316  typedef aligned_lowp_uvec3 aligned_uvec3;
317  typedef aligned_lowp_uvec4 aligned_uvec4;
318 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
319  typedef aligned_mediump_uvec1 aligned_uvec1;
320  typedef aligned_mediump_uvec2 aligned_uvec2;
321  typedef aligned_mediump_uvec3 aligned_uvec3;
322  typedef aligned_mediump_uvec4 aligned_uvec4;
323 #else //defined(GLM_PRECISION_HIGHP_UINT)
324  typedef aligned_highp_uvec1 aligned_uvec1;
326 
328  typedef aligned_highp_uvec2 aligned_uvec2;
329 
331  typedef aligned_highp_uvec3 aligned_uvec3;
332 
334  typedef aligned_highp_uvec4 aligned_uvec4;
335 #endif//GLM_PRECISION
336 
337 #if(defined(GLM_PRECISION_LOWP_BOOL))
338  typedef aligned_lowp_bvec1 aligned_bvec1;
339  typedef aligned_lowp_bvec2 aligned_bvec2;
340  typedef aligned_lowp_bvec3 aligned_bvec3;
341  typedef aligned_lowp_bvec4 aligned_bvec4;
342 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
343  typedef aligned_mediump_bvec1 aligned_bvec1;
344  typedef aligned_mediump_bvec2 aligned_bvec2;
345  typedef aligned_mediump_bvec3 aligned_bvec3;
346  typedef aligned_mediump_bvec4 aligned_bvec4;
347 #else //defined(GLM_PRECISION_HIGHP_BOOL)
348  typedef aligned_highp_bvec1 aligned_bvec1;
350 
352  typedef aligned_highp_bvec2 aligned_bvec2;
353 
355  typedef aligned_highp_bvec3 aligned_bvec3;
356 
358  typedef aligned_highp_bvec4 aligned_bvec4;
359 #endif//GLM_PRECISION
360 
362 }//namespace glm
aligned_highp_bvec2 aligned_bvec2
2 components vector of boolean.
tvec2< double, aligned_mediump > aligned_mediump_dvec2
2 components vector of medium double-precision floating-point numbers.
tvec4< bool, aligned_highp > aligned_highp_bvec4
4 components vector of high precision bool numbers.
tvec3< uint, aligned_highp > aligned_highp_uvec3
3 components vector of high precision unsigned integer numbers.
aligned_highp_dvec4 aligned_dvec4
4 components vector of double-precision floating-point numbers.
aligned_highp_dvec1 aligned_dvec1
1 component vector of double-precision floating-point numbers.
tvec3< int, aligned_lowp > aligned_lowp_ivec3
3 components vector of low precision signed integer numbers.
tvec3< double, aligned_mediump > aligned_mediump_dvec3
3 components vector of medium double-precision floating-point numbers.
tvec3< float, aligned_lowp > aligned_lowp_vec3
3 components vector of low single-precision floating-point numbers.
tvec2< bool, aligned_lowp > aligned_lowp_bvec2
2 components vector of low precision bool numbers.
tvec3< uint, aligned_mediump > aligned_mediump_uvec3
3 components vector of medium precision unsigned integer numbers.
tvec4< float, aligned_lowp > aligned_lowp_vec4
4 components vector of low single-precision floating-point numbers.
Definition: _noise.hpp:11
tvec4< double, aligned_mediump > aligned_mediump_dvec4
4 components vector of medium double-precision floating-point numbers.
tvec2< uint, aligned_mediump > aligned_mediump_uvec2
2 components vector of medium precision unsigned integer numbers.
tvec2< int, aligned_mediump > aligned_mediump_ivec2
2 components vector of medium precision signed integer numbers.
tvec4< uint, aligned_mediump > aligned_mediump_uvec4
4 components vector of medium precision unsigned integer numbers.
aligned_highp_bvec4 aligned_bvec4
4 components vector of boolean.
tvec2< bool, aligned_highp > aligned_highp_bvec2
2 components vector of high precision bool numbers.
aligned_highp_ivec1 aligned_ivec1
1 component vector of signed integer numbers.
tvec3< uint, aligned_lowp > aligned_lowp_uvec3
3 components vector of low precision unsigned integer numbers.
tvec4< bool, aligned_lowp > aligned_lowp_bvec4
4 components vector of low precision bool numbers.
aligned_highp_dvec3 aligned_dvec3
3 components vector of double-precision floating-point numbers.
aligned_highp_vec2 aligned_vec2
2 components vector of floating-point numbers.
aligned_highp_bvec3 aligned_bvec3
3 components vector of boolean.
tvec2< double, aligned_lowp > aligned_lowp_dvec2
2 components vector of low double-precision floating-point numbers.
tvec3< double, aligned_highp > aligned_highp_dvec3
3 components vector of high double-precision floating-point numbers.
aligned_highp_uvec4 aligned_uvec4
4 components vector of unsigned integer numbers.
tvec3< int, aligned_highp > aligned_highp_ivec3
3 components vector of high precision signed integer numbers.
tvec4< uint, aligned_highp > aligned_highp_uvec4
4 components vector of high precision unsigned integer numbers.
tvec2< uint, aligned_lowp > aligned_lowp_uvec2
2 components vector of low precision unsigned integer numbers.
tvec3< int, aligned_mediump > aligned_mediump_ivec3
3 components vector of medium precision signed integer numbers.
tvec2< float, aligned_lowp > aligned_lowp_vec2
2 components vector of low single-precision floating-point numbers.
aligned_highp_uvec3 aligned_uvec3
3 components vector of unsigned integer numbers.
tvec4< float, aligned_highp > aligned_highp_vec4
4 components vector of high single-precision floating-point numbers.
tvec4< float, aligned_mediump > aligned_mediump_vec4
4 components vector of medium single-precision floating-point numbers.
tvec2< uint, aligned_highp > aligned_highp_uvec2
2 components vector of high precision unsigned integer numbers.
tvec3< bool, aligned_lowp > aligned_lowp_bvec3
3 components vector of low precision bool numbers.
aligned_highp_bvec1 aligned_bvec1
1 component vector of boolean.
tvec3< float, aligned_highp > aligned_highp_vec3
3 components vector of high single-precision floating-point numbers.
tvec4< double, aligned_highp > aligned_highp_dvec4
4 components vector of high double-precision floating-point numbers.
aligned_highp_uvec1 aligned_uvec1
1 component vector of unsigned integer numbers.
tvec2< float, aligned_highp > aligned_highp_vec2
2 components vector of high single-precision floating-point numbers.
tvec3< float, aligned_mediump > aligned_mediump_vec3
3 components vector of medium single-precision floating-point numbers.
aligned_highp_vec4 aligned_vec4
4 components vector of floating-point numbers.
tvec3< bool, aligned_mediump > aligned_mediump_bvec3
3 components vector of medium precision bool numbers.
tvec4< bool, aligned_mediump > aligned_mediump_bvec4
4 components vector of medium precision bool numbers.
tvec2< float, aligned_mediump > aligned_mediump_vec2
2 components vector of medium single-precision floating-point numbers.
aligned_highp_ivec4 aligned_ivec4
4 components vector of signed integer numbers.
tvec2< bool, aligned_mediump > aligned_mediump_bvec2
2 components vector of medium precision bool numbers.
tvec3< double, aligned_lowp > aligned_lowp_dvec3
3 components vector of low double-precision floating-point numbers.
tvec4< uint, aligned_lowp > aligned_lowp_uvec4
4 components vector of low precision unsigned integer numbers.
tvec2< int, aligned_highp > aligned_highp_ivec2
2 components vector of high precision signed integer numbers.
aligned_highp_dvec2 aligned_dvec2
2 components vector of double-precision floating-point numbers.
aligned_highp_uvec2 aligned_uvec2
2 components vector of unsigned integer numbers.
tvec4< int, aligned_lowp > aligned_lowp_ivec4
4 components vector of low precision signed integer numbers.
tvec2< int, aligned_lowp > aligned_lowp_ivec2
2 components vector of low precision signed integer numbers.
aligned_highp_vec1 aligned_vec1
1 component vector of floating-point numbers.
tvec4< double, aligned_lowp > aligned_lowp_dvec4
4 components vector of low double-precision floating-point numbers.
tvec4< int, aligned_mediump > aligned_mediump_ivec4
4 components vector of medium precision signed integer numbers.
tvec3< bool, aligned_highp > aligned_highp_bvec3
3 components vector of high precision bool numbers.
aligned_highp_ivec2 aligned_ivec2
2 components vector of signed integer numbers.
tvec4< int, aligned_highp > aligned_highp_ivec4
4 components vector of high precision signed integer numbers.
aligned_highp_ivec3 aligned_ivec3
3 components vector of signed integer numbers.
tvec2< double, aligned_highp > aligned_highp_dvec2
2 components vector of high double-precision floating-point numbers.
aligned_highp_vec3 aligned_vec3
3 components vector of floating-point numbers.