Update upstream source from tag 'upstream/0.9.9.8+ds'
Update to upstream version '0.9.9.8+ds'
with Debian dir 36e592196eafcef2344c3656bdb57b23bc73cd4e
Carsten Schoenert
3 years ago
76 | 76 | |
77 | 77 | test_script: |
78 | 78 | - ctest -j4 -C %CONFIGURATION% |
79 | - cd .. | |
80 | - ps: | | |
81 | mkdir build_test_cmake | |
82 | cd build_test_cmake | |
83 | cmake ..\test\cmake\ -G "$env:generator" -Dglm_DIR="$env:APPVEYOR_BUILD_FOLDER/cmake/glm/" | |
84 | - cmake --build . --config %CONFIGURATION% -- /m /v:minimal | |
79 | 85 | |
80 | 86 | deploy: off |
32 | 32 | cmake_install.cmake |
33 | 33 | install_manifest.txt |
34 | 34 | *.cmake |
35 | !glmConfig.cmake | |
36 | !glmConfig-version.cmake | |
35 | 37 | # ^ May need to add future .cmake files as exceptions |
36 | 38 | |
37 | 39 | # Test logs |
55 | 57 | /.vscode |
56 | 58 | /CMakeSettings.json |
57 | 59 | .DS_Store |
60 | *.swp |
10 | 10 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_DISABLE_AUTO_DETECTION=ON .. |
11 | 11 | - cmake -E time cmake --build . |
12 | 12 | - ctest |
13 | - cd $TRAVIS_BUILD_DIR | |
14 | - mkdir ./build_test_cmake | |
15 | - cd ./build_test_cmake | |
16 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
17 | - cmake --build . | |
13 | 18 | env: |
14 | 19 | - MATRIX_EVAL="INFO=C++unknown-release" |
15 | 20 | |
22 | 27 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. |
23 | 28 | - cmake -E time cmake --build . |
24 | 29 | - ctest |
30 | - cd $TRAVIS_BUILD_DIR | |
31 | - mkdir ./build_test_cmake | |
32 | - cd ./build_test_cmake | |
33 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
34 | - cmake --build . | |
25 | 35 | env: |
26 | 36 | - MATRIX_EVAL="INFO=C++98-pure-release" |
27 | 37 | |
34 | 44 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON .. |
35 | 45 | - cmake -E time cmake --build . |
36 | 46 | - ctest |
47 | - cd $TRAVIS_BUILD_DIR | |
48 | - mkdir ./build_test_cmake | |
49 | - cd ./build_test_cmake | |
50 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
51 | - cmake --build . | |
37 | 52 | env: |
38 | 53 | - MATRIX_EVAL="INFO=C++98-pure-ms-release" |
39 | 54 | |
46 | 61 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. |
47 | 62 | - cmake -E time cmake --build . |
48 | 63 | - ctest |
64 | - cd $TRAVIS_BUILD_DIR | |
65 | - mkdir ./build_test_cmake | |
66 | - cd ./build_test_cmake | |
67 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
68 | - cmake --build . | |
49 | 69 | env: |
50 | 70 | - MATRIX_EVAL="INFO=C++11-pure-release" |
51 | 71 | |
58 | 78 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON .. |
59 | 79 | - cmake -E time cmake --build . |
60 | 80 | - ctest |
81 | - cd $TRAVIS_BUILD_DIR | |
82 | - mkdir ./build_test_cmake | |
83 | - cd ./build_test_cmake | |
84 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
85 | - cmake --build . | |
61 | 86 | env: |
62 | 87 | - MATRIX_EVAL="INFO=C++11-sse2-release" |
63 | 88 | |
70 | 95 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. |
71 | 96 | - cmake -E time cmake --build . |
72 | 97 | - ctest |
98 | - cd $TRAVIS_BUILD_DIR | |
99 | - mkdir ./build_test_cmake | |
100 | - cd ./build_test_cmake | |
101 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
102 | - cmake --build . | |
73 | 103 | env: |
74 | 104 | - MATRIX_EVAL="INFO=C++14-pure-release" |
75 | 105 | |
82 | 112 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. |
83 | 113 | - cmake -E time cmake --build . |
84 | 114 | - ctest |
115 | - cd $TRAVIS_BUILD_DIR | |
116 | - mkdir ./build_test_cmake | |
117 | - cd ./build_test_cmake | |
118 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
119 | - cmake --build . | |
85 | 120 | env: |
86 | 121 | - MATRIX_EVAL="INFO=C++14-sse3-release" |
87 | 122 | |
94 | 129 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. |
95 | 130 | - cmake -E time cmake --build . |
96 | 131 | - ctest |
132 | - cd $TRAVIS_BUILD_DIR | |
133 | - mkdir ./build_test_cmake | |
134 | - cd ./build_test_cmake | |
135 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
136 | - cmake --build . | |
97 | 137 | env: |
98 | 138 | - MATRIX_EVAL="INFO=C++14-avx-release" |
99 | 139 | |
106 | 146 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. |
107 | 147 | - cmake -E time cmake --build . |
108 | 148 | - ctest |
149 | - cd $TRAVIS_BUILD_DIR | |
150 | - mkdir ./build_test_cmake | |
151 | - cd ./build_test_cmake | |
152 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
153 | - cmake --build . | |
109 | 154 | env: |
110 | 155 | - MATRIX_EVAL="INFO=C++14-avx-debug" |
111 | 156 | |
118 | 163 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. |
119 | 164 | - cmake -E time cmake --build . |
120 | 165 | - ctest |
166 | - cd $TRAVIS_BUILD_DIR | |
167 | - mkdir ./build_test_cmake | |
168 | - cd ./build_test_cmake | |
169 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
170 | - cmake --build . | |
121 | 171 | env: |
122 | 172 | - MATRIX_EVAL="INFO=C++17-pure-release" |
123 | 173 | |
130 | 180 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. |
131 | 181 | - cmake -E time cmake --build . |
132 | 182 | - ctest |
183 | - cd $TRAVIS_BUILD_DIR | |
184 | - mkdir ./build_test_cmake | |
185 | - cd ./build_test_cmake | |
186 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
187 | - cmake --build . | |
133 | 188 | env: |
134 | 189 | - MATRIX_EVAL="INFO=C++17-pure-debug" |
135 | 190 | |
142 | 197 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. |
143 | 198 | - cmake -E time cmake --build . |
144 | 199 | - ctest |
200 | - cd $TRAVIS_BUILD_DIR | |
201 | - mkdir ./build_test_cmake | |
202 | - cd ./build_test_cmake | |
203 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
204 | - cmake --build . | |
145 | 205 | env: |
146 | 206 | - MATRIX_EVAL="INFO=C++17-avx-release" |
147 | 207 | |
154 | 214 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. |
155 | 215 | - cmake -E time cmake --build . |
156 | 216 | - ctest |
217 | - cd $TRAVIS_BUILD_DIR | |
218 | - mkdir ./build_test_cmake | |
219 | - cd ./build_test_cmake | |
220 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
221 | - cmake --build . | |
157 | 222 | env: |
158 | 223 | - MATRIX_EVAL="INFO=C++17-avx-debug" |
159 | 224 | |
173 | 238 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. |
174 | 239 | - cmake --build . |
175 | 240 | - ctest |
241 | - cd $TRAVIS_BUILD_DIR | |
242 | - mkdir ./build_test_cmake | |
243 | - cd ./build_test_cmake | |
244 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
245 | - cmake --build . | |
176 | 246 | |
177 | 247 | - os: linux |
178 | 248 | addons: |
190 | 260 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. |
191 | 261 | - cmake --build . |
192 | 262 | - ctest |
263 | - cd $TRAVIS_BUILD_DIR | |
264 | - mkdir ./build_test_cmake | |
265 | - cd ./build_test_cmake | |
266 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
267 | - cmake --build . | |
193 | 268 | |
194 | 269 | - os: linux |
195 | 270 | addons: |
207 | 282 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. |
208 | 283 | - cmake --build . |
209 | 284 | - ctest |
285 | - cd $TRAVIS_BUILD_DIR | |
286 | - mkdir ./build_test_cmake | |
287 | - cd ./build_test_cmake | |
288 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
289 | - cmake --build . | |
210 | 290 | |
211 | 291 | - os: linux |
212 | 292 | addons: |
224 | 304 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. |
225 | 305 | - cmake --build . |
226 | 306 | - ctest |
307 | - cd $TRAVIS_BUILD_DIR | |
308 | - mkdir ./build_test_cmake | |
309 | - cd ./build_test_cmake | |
310 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
311 | - cmake --build . | |
227 | 312 | |
228 | 313 | - os: linux |
229 | 314 | addons: |
241 | 326 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. |
242 | 327 | - cmake --build . |
243 | 328 | - ctest |
329 | - cd $TRAVIS_BUILD_DIR | |
330 | - mkdir ./build_test_cmake | |
331 | - cd ./build_test_cmake | |
332 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
333 | - cmake --build . | |
244 | 334 | |
245 | 335 | - os: linux |
246 | 336 | addons: |
258 | 348 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. |
259 | 349 | - cmake --build . |
260 | 350 | - ctest |
351 | - cd $TRAVIS_BUILD_DIR | |
352 | - mkdir ./build_test_cmake | |
353 | - cd ./build_test_cmake | |
354 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
355 | - cmake --build . | |
261 | 356 | |
262 | 357 | - os: linux |
263 | 358 | addons: |
275 | 370 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. |
276 | 371 | - cmake --build . |
277 | 372 | - ctest |
373 | - cd $TRAVIS_BUILD_DIR | |
374 | - mkdir ./build_test_cmake | |
375 | - cd ./build_test_cmake | |
376 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
377 | - cmake --build . | |
278 | 378 | |
279 | 379 | - os: linux |
280 | 380 | addons: |
292 | 392 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. |
293 | 393 | - cmake --build . |
294 | 394 | - ctest |
395 | - cd $TRAVIS_BUILD_DIR | |
396 | - mkdir ./build_test_cmake | |
397 | - cd ./build_test_cmake | |
398 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
399 | - cmake --build . | |
295 | 400 | |
296 | 401 | - os: linux |
297 | 402 | addons: |
309 | 414 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. |
310 | 415 | - cmake --build . |
311 | 416 | - ctest |
417 | - cd $TRAVIS_BUILD_DIR | |
418 | - mkdir ./build_test_cmake | |
419 | - cd ./build_test_cmake | |
420 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
421 | - cmake --build . | |
312 | 422 | |
313 | 423 | - os: linux |
314 | 424 | addons: |
326 | 436 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. |
327 | 437 | - cmake --build . |
328 | 438 | - ctest |
439 | - cd $TRAVIS_BUILD_DIR | |
440 | - mkdir ./build_test_cmake | |
441 | - cd ./build_test_cmake | |
442 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
443 | - cmake --build . | |
329 | 444 | |
330 | 445 | - os: linux |
331 | 446 | addons: |
343 | 458 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. |
344 | 459 | - cmake --build . |
345 | 460 | - ctest |
461 | - cd $TRAVIS_BUILD_DIR | |
462 | - mkdir ./build_test_cmake | |
463 | - cd ./build_test_cmake | |
464 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
465 | - cmake --build . | |
346 | 466 | |
347 | 467 | - os: linux |
348 | 468 | addons: |
360 | 480 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. |
361 | 481 | - cmake -E time cmake --build . |
362 | 482 | - ctest |
483 | - cd $TRAVIS_BUILD_DIR | |
484 | - mkdir ./build_test_cmake | |
485 | - cd ./build_test_cmake | |
486 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
487 | - cmake --build . | |
363 | 488 | |
364 | 489 | - os: linux |
365 | 490 | addons: |
377 | 502 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON .. |
378 | 503 | - cmake -E time cmake --build . |
379 | 504 | - ctest |
505 | - cd $TRAVIS_BUILD_DIR | |
506 | - mkdir ./build_test_cmake | |
507 | - cd ./build_test_cmake | |
508 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
509 | - cmake --build . | |
380 | 510 | |
381 | 511 | - os: linux |
382 | 512 | addons: |
394 | 524 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. |
395 | 525 | - cmake -E time cmake --build . |
396 | 526 | - ctest |
527 | - cd $TRAVIS_BUILD_DIR | |
528 | - mkdir ./build_test_cmake | |
529 | - cd ./build_test_cmake | |
530 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
531 | - cmake --build . | |
397 | 532 | |
398 | 533 | - os: linux |
399 | 534 | addons: |
411 | 546 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. |
412 | 547 | - cmake -E time cmake --build . |
413 | 548 | - ctest |
549 | - cd $TRAVIS_BUILD_DIR | |
550 | - mkdir ./build_test_cmake | |
551 | - cd ./build_test_cmake | |
552 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
553 | - cmake --build . | |
414 | 554 | |
415 | 555 | - os: linux |
416 | 556 | addons: |
428 | 568 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX2=ON .. |
429 | 569 | - cmake -E time cmake --build . |
430 | 570 | - ctest |
571 | - cd $TRAVIS_BUILD_DIR | |
572 | - mkdir ./build_test_cmake | |
573 | - cd ./build_test_cmake | |
574 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
575 | - cmake --build . | |
431 | 576 | |
432 | 577 | - os: linux |
433 | 578 | addons: |
446 | 591 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. |
447 | 592 | - cmake -E time cmake --build . |
448 | 593 | - ctest |
594 | - cd $TRAVIS_BUILD_DIR | |
595 | - mkdir ./build_test_cmake | |
596 | - cd ./build_test_cmake | |
597 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
598 | - cmake --build . | |
449 | 599 | |
450 | 600 | - os: linux |
451 | 601 | addons: |
464 | 614 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. |
465 | 615 | - cmake -E time cmake --build . |
466 | 616 | - ctest |
617 | - cd $TRAVIS_BUILD_DIR | |
618 | - mkdir ./build_test_cmake | |
619 | - cd ./build_test_cmake | |
620 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
621 | - cmake --build . | |
467 | 622 | |
468 | 623 | - os: linux |
469 | 624 | addons: |
482 | 637 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. |
483 | 638 | - cmake -E time cmake --build . |
484 | 639 | - ctest |
640 | - cd $TRAVIS_BUILD_DIR | |
641 | - mkdir ./build_test_cmake | |
642 | - cd ./build_test_cmake | |
643 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
644 | - cmake --build . | |
485 | 645 | |
486 | 646 | - os: linux |
487 | 647 | dist: bionic |
488 | 648 | env: |
489 | - MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-pure-release" | |
649 | - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-pure-release" | |
490 | 650 | script: |
491 | 651 | - cmake --version |
492 | 652 | - mkdir ./build_pure_17_release |
494 | 654 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. |
495 | 655 | - cmake -E time cmake --build . |
496 | 656 | - ctest |
657 | - cd $TRAVIS_BUILD_DIR | |
658 | - mkdir ./build_test_cmake | |
659 | - cd ./build_test_cmake | |
660 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
661 | - cmake --build . | |
497 | 662 | |
498 | 663 | - os: linux |
499 | 664 | dist: bionic |
500 | 665 | env: |
501 | - MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-pure-debug" | |
666 | - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-pure-debug" | |
502 | 667 | script: |
503 | 668 | - cmake --version |
504 | 669 | - mkdir ./build_pure_17_debug |
506 | 671 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. |
507 | 672 | - cmake -E time cmake --build . |
508 | 673 | - ctest |
674 | - cd $TRAVIS_BUILD_DIR | |
675 | - mkdir ./build_test_cmake | |
676 | - cd ./build_test_cmake | |
677 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
678 | - cmake --build . | |
509 | 679 | |
510 | 680 | - os: linux |
511 | 681 | dist: bionic |
512 | 682 | env: |
513 | - MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-sse3-release" | |
683 | - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-sse3-release | |
514 | 684 | script: |
515 | 685 | - cmake --version |
516 | 686 | - mkdir ./build_sse3_17_release |
518 | 688 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. |
519 | 689 | - cmake -E time cmake --build . |
520 | 690 | - ctest |
691 | - cd $TRAVIS_BUILD_DIR | |
692 | - mkdir ./build_test_cmake | |
693 | - cd ./build_test_cmake | |
694 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
695 | - cmake --build . | |
521 | 696 | |
522 | 697 | - os: linux |
523 | 698 | dist: bionic |
524 | 699 | env: |
525 | - MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-sse3-debug" | |
700 | - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-sse3-debug" | |
526 | 701 | script: |
527 | 702 | - cmake --version |
528 | 703 | - mkdir ./build_sse3_17_debug |
530 | 705 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. |
531 | 706 | - cmake -E time cmake --build . |
532 | 707 | - ctest |
708 | - cd $TRAVIS_BUILD_DIR | |
709 | - mkdir ./build_test_cmake | |
710 | - cd ./build_test_cmake | |
711 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
712 | - cmake --build . | |
533 | 713 | |
534 | 714 | - os: linux |
535 | 715 | dist: bionic |
536 | 716 | env: |
537 | - MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-ssse3-release" | |
717 | - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-ssse3-release" | |
538 | 718 | script: |
539 | 719 | - cmake --version |
540 | 720 | - mkdir ./build_ssse3_17_release |
542 | 722 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSSE3=ON .. |
543 | 723 | - cmake -E time cmake --build . |
544 | 724 | - ctest |
725 | - cd $TRAVIS_BUILD_DIR | |
726 | - mkdir ./build_test_cmake | |
727 | - cd ./build_test_cmake | |
728 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/ | |
729 | - cmake --build . | |
545 | 730 | |
546 | 731 | before_install: |
547 | 732 | - eval "${MATRIX_EVAL}" |
0 | if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 0) | |
1 | if (${PACKAGE_FIND_VERSION} VERSION_LESS ${GLM_VERSION}) | |
2 | set(PACKAGE_VERSION_COMPATIBLE 1) | |
3 | endif() | |
4 | if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${GLM_VERSION}) | |
5 | set(PACKAGE_VERSION_EXACT 1) | |
6 | endif() | |
7 | else() | |
8 | set(PACKAGE_VERSION_UNSUITABLE 1) | |
9 | endif() | |
10 |
0 | cmake_minimum_required(VERSION 3.2 FATAL_ERROR) | |
1 | cmake_policy(VERSION 3.2) | |
2 | ||
3 | set(GLM_VERSION 0.9.9) | |
4 | ||
5 | get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) | |
6 | get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) | |
7 | get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) | |
8 | if (_IMPORT_PREFIX STREQUAL "/") | |
9 | set(_IMPORT_PREFIX "") | |
10 | endif() | |
11 | ||
12 | # Set the old GLM_INCLUDE_DIRS variable for backwards compatibility | |
13 | set(GLM_INCLUDE_DIRS ${_IMPORT_PREFIX}) | |
14 | ||
15 | add_library(glm::glm INTERFACE IMPORTED) | |
16 | set_target_properties(glm::glm PROPERTIES | |
17 | INTERFACE_INCLUDE_DIRECTORIES ${GLM_INCLUDE_DIRS}) | |
18 | ||
19 | mark_as_advanced(glm_DIR) | |
20 | set(_IMPORT_PREFIX) | |
21 |
104 | 104 | { |
105 | 105 | GLM_FUNC_QUALIFIER static float call(vec<4, float, Q> const& v) |
106 | 106 | { |
107 | return compute_dot<vec<4, float, Q>, float, true>::call(v, v); | |
107 | return sqrt(compute_dot<vec<4, float, Q>, float, true>::call(v, v)); | |
108 | 108 | } |
109 | 109 | }; |
110 | 110 | |
125 | 125 | { |
126 | 126 | #if GLM_ARCH & GLM_ARCH_ARMV8_BIT |
127 | 127 | float32x4_t v = vmulq_f32(x.data, y.data); |
128 | v = vpaddq_f32(v, v); | |
129 | v = vpaddq_f32(v, v); | |
130 | return vgetq_lane_f32(v, 0); | |
128 | return vaddvq_f32(v); | |
131 | 129 | #else // Armv7a with Neon |
132 | 130 | float32x4_t p = vmulq_f32(x.data, y.data); |
133 | 131 | float32x2_t v = vpadd_f32(vget_low_f32(p), vget_high_f32(p)); |
5 | 5 | #define GLM_VERSION_MAJOR 0 |
6 | 6 | #define GLM_VERSION_MINOR 9 |
7 | 7 | #define GLM_VERSION_PATCH 9 |
8 | #define GLM_VERSION_REVISION 7 | |
9 | #define GLM_VERSION 997 | |
10 | #define GLM_VERSION_MESSAGE "GLM: version 0.9.9.7" | |
8 | #define GLM_VERSION_REVISION 8 | |
9 | #define GLM_VERSION 998 | |
10 | #define GLM_VERSION_MESSAGE "GLM: version 0.9.9.8" | |
11 | 11 | |
12 | 12 | #define GLM_SETUP_INCLUDED GLM_VERSION |
13 | 13 |
484 | 484 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator<<(T scalar, vec<1, T, Q> const& v) |
485 | 485 | { |
486 | 486 | return vec<1, T, Q>( |
487 | scalar << v.x); | |
487 | static_cast<T>(scalar << v.x)); | |
488 | 488 | } |
489 | 489 | |
490 | 490 | template<typename T, qualifier Q> |
491 | 491 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator<<(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2) |
492 | 492 | { |
493 | 493 | return vec<1, T, Q>( |
494 | v1.x << v2.x); | |
494 | static_cast<T>(v1.x << v2.x)); | |
495 | 495 | } |
496 | 496 | |
497 | 497 | template<typename T, qualifier Q> |
498 | 498 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator>>(vec<1, T, Q> const& v, T scalar) |
499 | 499 | { |
500 | 500 | return vec<1, T, Q>( |
501 | v.x >> scalar); | |
501 | static_cast<T>(v.x >> scalar)); | |
502 | 502 | } |
503 | 503 | |
504 | 504 | template<typename T, qualifier Q> |
505 | 505 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator>>(T scalar, vec<1, T, Q> const& v) |
506 | 506 | { |
507 | 507 | return vec<1, T, Q>( |
508 | scalar >> v.x); | |
508 | static_cast<T>(scalar >> v.x)); | |
509 | 509 | } |
510 | 510 | |
511 | 511 | template<typename T, qualifier Q> |
512 | 512 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator>>(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2) |
513 | 513 | { |
514 | 514 | return vec<1, T, Q>( |
515 | v1.x >> v2.x); | |
515 | static_cast<T>(v1.x >> v2.x)); | |
516 | 516 | } |
517 | 517 | |
518 | 518 | template<typename T, qualifier Q> |
0 | /// @ref ext_matrix_int2x2 | |
1 | /// @file glm/ext/matrix_int2x2.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int2x2 GLM_EXT_matrix_int2x2 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int2x2.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x2.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int2x2 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int2x2 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 2x2 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int2x2 | |
29 | typedef mat<2, 2, int, defaultp> imat2x2; | |
30 | ||
31 | /// Signed integer 2x2 matrix. | |
32 | /// | |
33 | /// @see ext_matrix_int2x2 | |
34 | typedef mat<2, 2, int, defaultp> imat2; | |
35 | ||
36 | /// @} | |
37 | }//namespace glm |
0 | /// @ref ext_matrix_int2x2_sized | |
1 | /// @file glm/ext/matrix_int2x2_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int2x2_sized GLM_EXT_matrix_int2x2_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int2x2_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x2.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int2x2_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int2x2_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 2x2 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int2x2_sized | |
30 | typedef mat<2, 2, int8, defaultp> i8mat2x2; | |
31 | ||
32 | /// 16 bit signed integer 2x2 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int2x2_sized | |
35 | typedef mat<2, 2, int16, defaultp> i16mat2x2; | |
36 | ||
37 | /// 32 bit signed integer 2x2 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int2x2_sized | |
40 | typedef mat<2, 2, int32, defaultp> i32mat2x2; | |
41 | ||
42 | /// 64 bit signed integer 2x2 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int2x2_sized | |
45 | typedef mat<2, 2, int64, defaultp> i64mat2x2; | |
46 | ||
47 | ||
48 | /// 8 bit signed integer 2x2 matrix. | |
49 | /// | |
50 | /// @see ext_matrix_int2x2_sized | |
51 | typedef mat<2, 2, int8, defaultp> i8mat2; | |
52 | ||
53 | /// 16 bit signed integer 2x2 matrix. | |
54 | /// | |
55 | /// @see ext_matrix_int2x2_sized | |
56 | typedef mat<2, 2, int16, defaultp> i16mat2; | |
57 | ||
58 | /// 32 bit signed integer 2x2 matrix. | |
59 | /// | |
60 | /// @see ext_matrix_int2x2_sized | |
61 | typedef mat<2, 2, int32, defaultp> i32mat2; | |
62 | ||
63 | /// 64 bit signed integer 2x2 matrix. | |
64 | /// | |
65 | /// @see ext_matrix_int2x2_sized | |
66 | typedef mat<2, 2, int64, defaultp> i64mat2; | |
67 | ||
68 | /// @} | |
69 | }//namespace glm |
0 | /// @ref ext_matrix_int2x3 | |
1 | /// @file glm/ext/matrix_int2x3.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int2x3 GLM_EXT_matrix_int2x3 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int2x3.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x3.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int2x3 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int2x3 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 2x3 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int2x3 | |
29 | typedef mat<2, 3, int, defaultp> imat2x3; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_int2x3_sized | |
1 | /// @file glm/ext/matrix_int2x3_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int2x3_sized GLM_EXT_matrix_int2x3_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int2x3_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x3.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int2x3_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int2x3_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 2x3 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int2x3_sized | |
30 | typedef mat<2, 3, int8, defaultp> i8mat2x3; | |
31 | ||
32 | /// 16 bit signed integer 2x3 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int2x3_sized | |
35 | typedef mat<2, 3, int16, defaultp> i16mat2x3; | |
36 | ||
37 | /// 32 bit signed integer 2x3 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int2x3_sized | |
40 | typedef mat<2, 3, int32, defaultp> i32mat2x3; | |
41 | ||
42 | /// 64 bit signed integer 2x3 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int2x3_sized | |
45 | typedef mat<2, 3, int64, defaultp> i64mat2x3; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_int2x4 | |
1 | /// @file glm/ext/matrix_int2x4.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int2x4 GLM_EXT_matrix_int2x4 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int2x4.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x4.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int2x4 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int2x4 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 2x4 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int2x4 | |
29 | typedef mat<2, 4, int, defaultp> imat2x4; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_int2x4_sized | |
1 | /// @file glm/ext/matrix_int2x4_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int2x4_sized GLM_EXT_matrix_int2x4_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int2x4_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x4.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int2x4_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int2x4_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 2x4 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int2x4_sized | |
30 | typedef mat<2, 4, int8, defaultp> i8mat2x4; | |
31 | ||
32 | /// 16 bit signed integer 2x4 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int2x4_sized | |
35 | typedef mat<2, 4, int16, defaultp> i16mat2x4; | |
36 | ||
37 | /// 32 bit signed integer 2x4 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int2x4_sized | |
40 | typedef mat<2, 4, int32, defaultp> i32mat2x4; | |
41 | ||
42 | /// 64 bit signed integer 2x4 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int2x4_sized | |
45 | typedef mat<2, 4, int64, defaultp> i64mat2x4; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_int3x2 | |
1 | /// @file glm/ext/matrix_int3x2.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int3x2 GLM_EXT_matrix_int3x2 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int3x2.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x2.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int3x2 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int3x2 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 3x2 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int3x2 | |
29 | typedef mat<3, 2, int, defaultp> imat3x2; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_int3x2_sized | |
1 | /// @file glm/ext/matrix_int3x2_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int3x2_sized GLM_EXT_matrix_int3x2_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int3x2_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x2.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int3x2_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int3x2_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 3x2 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int3x2_sized | |
30 | typedef mat<3, 2, int8, defaultp> i8mat3x2; | |
31 | ||
32 | /// 16 bit signed integer 3x2 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int3x2_sized | |
35 | typedef mat<3, 2, int16, defaultp> i16mat3x2; | |
36 | ||
37 | /// 32 bit signed integer 3x2 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int3x2_sized | |
40 | typedef mat<3, 2, int32, defaultp> i32mat3x2; | |
41 | ||
42 | /// 64 bit signed integer 3x2 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int3x2_sized | |
45 | typedef mat<3, 2, int64, defaultp> i64mat3x2; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_int3x3 | |
1 | /// @file glm/ext/matrix_int3x3.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int3x3 GLM_EXT_matrix_int3x3 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int3x3.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x3.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int3x3 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int3x3 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 3x3 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int3x3 | |
29 | typedef mat<3, 3, int, defaultp> imat3x3; | |
30 | ||
31 | /// Signed integer 3x3 matrix. | |
32 | /// | |
33 | /// @see ext_matrix_int3x3 | |
34 | typedef mat<3, 3, int, defaultp> imat3; | |
35 | ||
36 | /// @} | |
37 | }//namespace glm |
0 | /// @ref ext_matrix_int3x3_sized | |
1 | /// @file glm/ext/matrix_int3x3_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int3x3_sized GLM_EXT_matrix_int3x3_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int3x3_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x3.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int3x3_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int3x3_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 3x3 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int3x3_sized | |
30 | typedef mat<3, 3, int8, defaultp> i8mat3x3; | |
31 | ||
32 | /// 16 bit signed integer 3x3 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int3x3_sized | |
35 | typedef mat<3, 3, int16, defaultp> i16mat3x3; | |
36 | ||
37 | /// 32 bit signed integer 3x3 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int3x3_sized | |
40 | typedef mat<3, 3, int32, defaultp> i32mat3x3; | |
41 | ||
42 | /// 64 bit signed integer 3x3 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int3x3_sized | |
45 | typedef mat<3, 3, int64, defaultp> i64mat3x3; | |
46 | ||
47 | ||
48 | /// 8 bit signed integer 3x3 matrix. | |
49 | /// | |
50 | /// @see ext_matrix_int3x3_sized | |
51 | typedef mat<3, 3, int8, defaultp> i8mat3; | |
52 | ||
53 | /// 16 bit signed integer 3x3 matrix. | |
54 | /// | |
55 | /// @see ext_matrix_int3x3_sized | |
56 | typedef mat<3, 3, int16, defaultp> i16mat3; | |
57 | ||
58 | /// 32 bit signed integer 3x3 matrix. | |
59 | /// | |
60 | /// @see ext_matrix_int3x3_sized | |
61 | typedef mat<3, 3, int32, defaultp> i32mat3; | |
62 | ||
63 | /// 64 bit signed integer 3x3 matrix. | |
64 | /// | |
65 | /// @see ext_matrix_int3x3_sized | |
66 | typedef mat<3, 3, int64, defaultp> i64mat3; | |
67 | ||
68 | /// @} | |
69 | }//namespace glm |
0 | /// @ref ext_matrix_int3x4 | |
1 | /// @file glm/ext/matrix_int3x4.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int3x4 GLM_EXT_matrix_int3x4 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int3x4.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x4.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int3x4 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int3x4 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 3x4 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int3x4 | |
29 | typedef mat<3, 4, int, defaultp> imat3x4; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_int3x4_sized | |
1 | /// @file glm/ext/matrix_int3x2_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int3x4_sized GLM_EXT_matrix_int3x4_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int3x4_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x4.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int3x4_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int3x4_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 3x4 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int3x4_sized | |
30 | typedef mat<3, 4, int8, defaultp> i8mat3x4; | |
31 | ||
32 | /// 16 bit signed integer 3x4 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int3x4_sized | |
35 | typedef mat<3, 4, int16, defaultp> i16mat3x4; | |
36 | ||
37 | /// 32 bit signed integer 3x4 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int3x4_sized | |
40 | typedef mat<3, 4, int32, defaultp> i32mat3x4; | |
41 | ||
42 | /// 64 bit signed integer 3x4 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int3x4_sized | |
45 | typedef mat<3, 4, int64, defaultp> i64mat3x4; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_int4x2 | |
1 | /// @file glm/ext/matrix_int4x2.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int4x2 GLM_EXT_matrix_int4x2 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int4x2.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x2.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int4x2 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int4x2 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 4x2 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int4x2 | |
29 | typedef mat<4, 2, int, defaultp> imat4x2; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_int4x2_sized | |
1 | /// @file glm/ext/matrix_int4x2_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int4x2_sized GLM_EXT_matrix_int4x2_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int4x2_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x2.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int4x2_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int4x2_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 4x2 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int4x2_sized | |
30 | typedef mat<4, 2, int8, defaultp> i8mat4x2; | |
31 | ||
32 | /// 16 bit signed integer 4x2 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int4x2_sized | |
35 | typedef mat<4, 2, int16, defaultp> i16mat4x2; | |
36 | ||
37 | /// 32 bit signed integer 4x2 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int4x2_sized | |
40 | typedef mat<4, 2, int32, defaultp> i32mat4x2; | |
41 | ||
42 | /// 64 bit signed integer 4x2 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int4x2_sized | |
45 | typedef mat<4, 2, int64, defaultp> i64mat4x2; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_int4x3 | |
1 | /// @file glm/ext/matrix_int4x3.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int4x3 GLM_EXT_matrix_int4x3 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int4x3.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x3.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int4x3 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int4x3 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 4x3 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int4x3 | |
29 | typedef mat<4, 3, int, defaultp> imat4x3; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_int4x3_sized | |
1 | /// @file glm/ext/matrix_int4x3_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int4x3_sized GLM_EXT_matrix_int4x3_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int4x3_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x3.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int4x3_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int4x3_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 4x3 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int4x3_sized | |
30 | typedef mat<4, 3, int8, defaultp> i8mat4x3; | |
31 | ||
32 | /// 16 bit signed integer 4x3 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int4x3_sized | |
35 | typedef mat<4, 3, int16, defaultp> i16mat4x3; | |
36 | ||
37 | /// 32 bit signed integer 4x3 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int4x3_sized | |
40 | typedef mat<4, 3, int32, defaultp> i32mat4x3; | |
41 | ||
42 | /// 64 bit signed integer 4x3 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int4x3_sized | |
45 | typedef mat<4, 3, int64, defaultp> i64mat4x3; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_int4x4 | |
1 | /// @file glm/ext/matrix_int4x4.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int4x4 GLM_EXT_matrix_int4x4 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int4x4.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x4.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_int4x4 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_int4x4 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 4x4 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_int4x4 | |
29 | typedef mat<4, 4, int, defaultp> imat4x4; | |
30 | ||
31 | /// Signed integer 4x4 matrix. | |
32 | /// | |
33 | /// @see ext_matrix_int4x4 | |
34 | typedef mat<4, 4, int, defaultp> imat4; | |
35 | ||
36 | /// @} | |
37 | }//namespace glm |
0 | /// @ref ext_matrix_int4x4_sized | |
1 | /// @file glm/ext/matrix_int4x4_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int4x4_sized GLM_EXT_matrix_int4x4_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_int4x4_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x4.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_int4x4_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_int4x4_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 4x4 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_int4x4_sized | |
30 | typedef mat<4, 4, int8, defaultp> i8mat4x4; | |
31 | ||
32 | /// 16 bit signed integer 4x4 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_int4x4_sized | |
35 | typedef mat<4, 4, int16, defaultp> i16mat4x4; | |
36 | ||
37 | /// 32 bit signed integer 4x4 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_int4x4_sized | |
40 | typedef mat<4, 4, int32, defaultp> i32mat4x4; | |
41 | ||
42 | /// 64 bit signed integer 4x4 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_int4x4_sized | |
45 | typedef mat<4, 4, int64, defaultp> i64mat4x4; | |
46 | ||
47 | ||
48 | /// 8 bit signed integer 4x4 matrix. | |
49 | /// | |
50 | /// @see ext_matrix_int4x4_sized | |
51 | typedef mat<4, 4, int8, defaultp> i8mat4; | |
52 | ||
53 | /// 16 bit signed integer 4x4 matrix. | |
54 | /// | |
55 | /// @see ext_matrix_int4x4_sized | |
56 | typedef mat<4, 4, int16, defaultp> i16mat4; | |
57 | ||
58 | /// 32 bit signed integer 4x4 matrix. | |
59 | /// | |
60 | /// @see ext_matrix_int4x4_sized | |
61 | typedef mat<4, 4, int32, defaultp> i32mat4; | |
62 | ||
63 | /// 64 bit signed integer 4x4 matrix. | |
64 | /// | |
65 | /// @see ext_matrix_int4x4_sized | |
66 | typedef mat<4, 4, int64, defaultp> i64mat4; | |
67 | ||
68 | /// @} | |
69 | }//namespace glm |
34 | 34 | template<typename T, typename U, qualifier Q> |
35 | 35 | GLM_FUNC_QUALIFIER vec<3, T, Q> project(vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport) |
36 | 36 | { |
37 | if(GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT) | |
37 | # if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT | |
38 | 38 | return projectZO(obj, model, proj, viewport); |
39 | else | |
39 | # else | |
40 | 40 | return projectNO(obj, model, proj, viewport); |
41 | # endif | |
41 | 42 | } |
42 | 43 | |
43 | 44 | template<typename T, typename U, qualifier Q> |
76 | 77 | template<typename T, typename U, qualifier Q> |
77 | 78 | GLM_FUNC_QUALIFIER vec<3, T, Q> unProject(vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport) |
78 | 79 | { |
79 | if(GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT) | |
80 | # if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT | |
80 | 81 | return unProjectZO(win, model, proj, viewport); |
81 | else | |
82 | # else | |
82 | 83 | return unProjectNO(win, model, proj, viewport); |
84 | # endif | |
83 | 85 | } |
84 | 86 | |
85 | 87 | template<typename T, qualifier Q, typename U> |
0 | /// @ref ext_matrix_uint2x2 | |
1 | /// @file glm/ext/matrix_uint2x2.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint2x2 GLM_EXT_matrix_uint2x2 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint2x2.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x2.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint2x2 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint2x2 | |
24 | /// @{ | |
25 | ||
26 | /// Unsigned integer 2x2 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint2x2 | |
29 | typedef mat<2, 2, uint, defaultp> umat2x2; | |
30 | ||
31 | /// Unsigned integer 2x2 matrix. | |
32 | /// | |
33 | /// @see ext_matrix_uint2x2 | |
34 | typedef mat<2, 2, uint, defaultp> umat2; | |
35 | ||
36 | /// @} | |
37 | }//namespace glm |
0 | /// @ref ext_matrix_uint2x2_sized | |
1 | /// @file glm/ext/matrix_uint2x2_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint2x2_sized GLM_EXT_matrix_uint2x2_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint2x2_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x2.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint2x2_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint2x2_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer 2x2 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint2x2_sized | |
30 | typedef mat<2, 2, uint8, defaultp> u8mat2x2; | |
31 | ||
32 | /// 16 bit unsigned integer 2x2 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint2x2_sized | |
35 | typedef mat<2, 2, uint16, defaultp> u16mat2x2; | |
36 | ||
37 | /// 32 bit unsigned integer 2x2 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint2x2_sized | |
40 | typedef mat<2, 2, uint32, defaultp> u32mat2x2; | |
41 | ||
42 | /// 64 bit unsigned integer 2x2 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint2x2_sized | |
45 | typedef mat<2, 2, uint64, defaultp> u64mat2x2; | |
46 | ||
47 | ||
48 | /// 8 bit unsigned integer 2x2 matrix. | |
49 | /// | |
50 | /// @see ext_matrix_uint2x2_sized | |
51 | typedef mat<2, 2, uint8, defaultp> u8mat2; | |
52 | ||
53 | /// 16 bit unsigned integer 2x2 matrix. | |
54 | /// | |
55 | /// @see ext_matrix_uint2x2_sized | |
56 | typedef mat<2, 2, uint16, defaultp> u16mat2; | |
57 | ||
58 | /// 32 bit unsigned integer 2x2 matrix. | |
59 | /// | |
60 | /// @see ext_matrix_uint2x2_sized | |
61 | typedef mat<2, 2, uint32, defaultp> u32mat2; | |
62 | ||
63 | /// 64 bit unsigned integer 2x2 matrix. | |
64 | /// | |
65 | /// @see ext_matrix_uint2x2_sized | |
66 | typedef mat<2, 2, uint64, defaultp> u64mat2; | |
67 | ||
68 | /// @} | |
69 | }//namespace glm |
0 | /// @ref ext_matrix_uint2x3 | |
1 | /// @file glm/ext/matrix_uint2x3.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int2x3 GLM_EXT_matrix_uint2x3 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint2x3.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x3.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint2x3 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint2x3 | |
24 | /// @{ | |
25 | ||
26 | /// Unsigned integer 2x3 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint2x3 | |
29 | typedef mat<2, 3, uint, defaultp> umat2x3; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_uint2x3_sized | |
1 | /// @file glm/ext/matrix_uint2x3_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint2x3_sized GLM_EXT_matrix_uint2x3_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint2x3_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x3.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint2x3_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint2x3_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer 2x3 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint2x3_sized | |
30 | typedef mat<2, 3, uint8, defaultp> u8mat2x3; | |
31 | ||
32 | /// 16 bit unsigned integer 2x3 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint2x3_sized | |
35 | typedef mat<2, 3, uint16, defaultp> u16mat2x3; | |
36 | ||
37 | /// 32 bit unsigned integer 2x3 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint2x3_sized | |
40 | typedef mat<2, 3, uint32, defaultp> u32mat2x3; | |
41 | ||
42 | /// 64 bit unsigned integer 2x3 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint2x3_sized | |
45 | typedef mat<2, 3, uint64, defaultp> u64mat2x3; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_uint2x4 | |
1 | /// @file glm/ext/matrix_uint2x4.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint2x4 GLM_EXT_matrix_int2x4 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint2x4.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x4.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint2x4 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint2x4 | |
24 | /// @{ | |
25 | ||
26 | /// Unsigned integer 2x4 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint2x4 | |
29 | typedef mat<2, 4, uint, defaultp> umat2x4; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_uint2x4_sized | |
1 | /// @file glm/ext/matrixu_uint2x4_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint2x4_sized GLM_EXT_matrix_uint2x4_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint2x4_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat2x4.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint2x4_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint2x4_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer 2x4 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint2x4_sized | |
30 | typedef mat<2, 4, uint8, defaultp> u8mat2x4; | |
31 | ||
32 | /// 16 bit unsigned integer 2x4 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint2x4_sized | |
35 | typedef mat<2, 4, uint16, defaultp> u16mat2x4; | |
36 | ||
37 | /// 32 bit unsigned integer 2x4 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint2x4_sized | |
40 | typedef mat<2, 4, uint32, defaultp> u32mat2x4; | |
41 | ||
42 | /// 64 bit unsigned integer 2x4 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint2x4_sized | |
45 | typedef mat<2, 4, uint64, defaultp> u64mat2x4; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_uint3x2 | |
1 | /// @file glm/ext/matrix_uint3x2.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_int3x2 GLM_EXT_matrix_uint3x2 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint3x2.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x2.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint3x2 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint3x2 | |
24 | /// @{ | |
25 | ||
26 | /// Unsigned integer 3x2 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint3x2 | |
29 | typedef mat<3, 2, uint, defaultp> umat3x2; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_uint3x2_sized | |
1 | /// @file glm/ext/matrix_uint3x2_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint3x2_sized GLM_EXT_matrix_uint3x2_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint3x2_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x2.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint3x2_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint3x2_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer 3x2 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint3x2_sized | |
30 | typedef mat<3, 2, uint8, defaultp> u8mat3x2; | |
31 | ||
32 | /// 16 bit signed integer 3x2 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint3x2_sized | |
35 | typedef mat<3, 2, uint16, defaultp> u16mat3x2; | |
36 | ||
37 | /// 32 bit signed integer 3x2 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint3x2_sized | |
40 | typedef mat<3, 2, uint32, defaultp> u32mat3x2; | |
41 | ||
42 | /// 64 bit signed integer 3x2 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint3x2_sized | |
45 | typedef mat<3, 2, uint64, defaultp> u64mat3x2; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_uint3x3 | |
1 | /// @file glm/ext/matrix_uint3x3.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint3x3 GLM_EXT_matrix_uint3x3 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint3x3.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x3.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint3x3 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint3x3 | |
24 | /// @{ | |
25 | ||
26 | /// Unsigned integer 3x3 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint3x3 | |
29 | typedef mat<3, 3, uint, defaultp> umat3x3; | |
30 | ||
31 | /// Unsigned integer 3x3 matrix. | |
32 | /// | |
33 | /// @see ext_matrix_uint3x3 | |
34 | typedef mat<3, 3, uint, defaultp> umat3; | |
35 | ||
36 | /// @} | |
37 | }//namespace glm |
0 | /// @ref ext_matrix_uint3x3_sized | |
1 | /// @file glm/ext/matrix_uint3x3_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint3x3_sized GLM_EXT_matrix_uint3x3_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint3x3_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x3.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint3x3_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint3x3_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer 3x3 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint3x3_sized | |
30 | typedef mat<3, 3, uint8, defaultp> u8mat3x3; | |
31 | ||
32 | /// 16 bit unsigned integer 3x3 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint3x3_sized | |
35 | typedef mat<3, 3, uint16, defaultp> u16mat3x3; | |
36 | ||
37 | /// 32 bit unsigned integer 3x3 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint3x3_sized | |
40 | typedef mat<3, 3, uint32, defaultp> u32mat3x3; | |
41 | ||
42 | /// 64 bit unsigned integer 3x3 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint3x3_sized | |
45 | typedef mat<3, 3, uint64, defaultp> u64mat3x3; | |
46 | ||
47 | ||
48 | /// 8 bit unsigned integer 3x3 matrix. | |
49 | /// | |
50 | /// @see ext_matrix_uint3x3_sized | |
51 | typedef mat<3, 3, uint8, defaultp> u8mat3; | |
52 | ||
53 | /// 16 bit unsigned integer 3x3 matrix. | |
54 | /// | |
55 | /// @see ext_matrix_uint3x3_sized | |
56 | typedef mat<3, 3, uint16, defaultp> u16mat3; | |
57 | ||
58 | /// 32 bit unsigned integer 3x3 matrix. | |
59 | /// | |
60 | /// @see ext_matrix_uint3x3_sized | |
61 | typedef mat<3, 3, uint32, defaultp> u32mat3; | |
62 | ||
63 | /// 64 bit unsigned integer 3x3 matrix. | |
64 | /// | |
65 | /// @see ext_matrix_uint3x3_sized | |
66 | typedef mat<3, 3, uint64, defaultp> u64mat3; | |
67 | ||
68 | /// @} | |
69 | }//namespace glm |
0 | /// @ref ext_matrix_uint3x4 | |
1 | /// @file glm/ext/matrix_uint3x4.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint3x4 GLM_EXT_matrix_uint3x4 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint3x4.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x4.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint3x4 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint3x4 | |
24 | /// @{ | |
25 | ||
26 | /// Signed integer 3x4 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint3x4 | |
29 | typedef mat<3, 4, uint, defaultp> umat3x4; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_uint3x4_sized | |
1 | /// @file glm/ext/matrix_uint3x2_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint3x4_sized GLM_EXT_matrix_uint3x4_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint3x4_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat3x4.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint3x4_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint3x4_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer 3x4 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint3x4_sized | |
30 | typedef mat<3, 4, uint8, defaultp> u8mat3x4; | |
31 | ||
32 | /// 16 bit unsigned integer 3x4 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint3x4_sized | |
35 | typedef mat<3, 4, uint16, defaultp> u16mat3x4; | |
36 | ||
37 | /// 32 bit unsigned integer 3x4 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint3x4_sized | |
40 | typedef mat<3, 4, uint32, defaultp> u32mat3x4; | |
41 | ||
42 | /// 64 bit unsigned integer 3x4 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint3x4_sized | |
45 | typedef mat<3, 4, uint64, defaultp> u64mat3x4; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_uint4x2 | |
1 | /// @file glm/ext/matrix_uint4x2.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint4x2 GLM_EXT_matrix_uint4x2 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint4x2.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x2.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint4x2 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint4x2 | |
24 | /// @{ | |
25 | ||
26 | /// Unsigned integer 4x2 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint4x2 | |
29 | typedef mat<4, 2, uint, defaultp> umat4x2; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_uint4x2_sized | |
1 | /// @file glm/ext/matrix_uint4x2_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint4x2_sized GLM_EXT_matrix_uint4x2_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint4x2_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x2.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint4x2_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint4x2_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer 4x2 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint4x2_sized | |
30 | typedef mat<4, 2, uint8, defaultp> u8mat4x2; | |
31 | ||
32 | /// 16 bit unsigned integer 4x2 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint4x2_sized | |
35 | typedef mat<4, 2, uint16, defaultp> u16mat4x2; | |
36 | ||
37 | /// 32 bit unsigned integer 4x2 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint4x2_sized | |
40 | typedef mat<4, 2, uint32, defaultp> u32mat4x2; | |
41 | ||
42 | /// 64 bit unsigned integer 4x2 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint4x2_sized | |
45 | typedef mat<4, 2, uint64, defaultp> u64mat4x2; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_uint4x3 | |
1 | /// @file glm/ext/matrix_uint4x3.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint4x3 GLM_EXT_matrix_uint4x3 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint4x3.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x3.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint4x3 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint4x3 | |
24 | /// @{ | |
25 | ||
26 | /// Unsigned integer 4x3 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint4x3 | |
29 | typedef mat<4, 3, uint, defaultp> umat4x3; | |
30 | ||
31 | /// @} | |
32 | }//namespace glm |
0 | /// @ref ext_matrix_uint4x3_sized | |
1 | /// @file glm/ext/matrix_uint4x3_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint4x3_sized GLM_EXT_matrix_uint4x3_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint4x3_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x3.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint4x3_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint4x3_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer 4x3 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint4x3_sized | |
30 | typedef mat<4, 3, uint8, defaultp> u8mat4x3; | |
31 | ||
32 | /// 16 bit unsigned integer 4x3 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint4x3_sized | |
35 | typedef mat<4, 3, uint16, defaultp> u16mat4x3; | |
36 | ||
37 | /// 32 bit unsigned integer 4x3 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint4x3_sized | |
40 | typedef mat<4, 3, uint32, defaultp> u32mat4x3; | |
41 | ||
42 | /// 64 bit unsigned integer 4x3 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint4x3_sized | |
45 | typedef mat<4, 3, uint64, defaultp> u64mat4x3; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_matrix_uint4x4 | |
1 | /// @file glm/ext/matrix_uint4x4.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint4x4 GLM_EXT_matrix_uint4x4 | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint4x4.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x4.hpp" | |
16 | ||
17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
18 | # pragma message("GLM: GLM_EXT_matrix_uint4x4 extension included") | |
19 | #endif | |
20 | ||
21 | namespace glm | |
22 | { | |
23 | /// @addtogroup ext_matrix_uint4x4 | |
24 | /// @{ | |
25 | ||
26 | /// Unsigned integer 4x4 matrix. | |
27 | /// | |
28 | /// @see ext_matrix_uint4x4 | |
29 | typedef mat<4, 4, uint, defaultp> umat4x4; | |
30 | ||
31 | /// Unsigned integer 4x4 matrix. | |
32 | /// | |
33 | /// @see ext_matrix_uint4x4 | |
34 | typedef mat<4, 4, uint, defaultp> umat4; | |
35 | ||
36 | /// @} | |
37 | }//namespace glm |
0 | /// @ref ext_matrix_uint4x4_sized | |
1 | /// @file glm/ext/matrix_uint4x4_sized.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_matrix_uint4x4_sized GLM_EXT_matrix_uint4x4_sized | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/matrix_uint4x4_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// Defines a number of matrices with integer types. | |
11 | ||
12 | #pragma once | |
13 | ||
14 | // Dependency: | |
15 | #include "../mat4x4.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_matrix_uint4x4_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_matrix_uint4x4_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer 4x4 matrix. | |
28 | /// | |
29 | /// @see ext_matrix_uint4x4_sized | |
30 | typedef mat<4, 4, uint8, defaultp> u8mat4x4; | |
31 | ||
32 | /// 16 bit unsigned integer 4x4 matrix. | |
33 | /// | |
34 | /// @see ext_matrix_uint4x4_sized | |
35 | typedef mat<4, 4, uint16, defaultp> u16mat4x4; | |
36 | ||
37 | /// 32 bit unsigned integer 4x4 matrix. | |
38 | /// | |
39 | /// @see ext_matrix_uint4x4_sized | |
40 | typedef mat<4, 4, uint32, defaultp> u32mat4x4; | |
41 | ||
42 | /// 64 bit unsigned integer 4x4 matrix. | |
43 | /// | |
44 | /// @see ext_matrix_uint4x4_sized | |
45 | typedef mat<4, 4, uint64, defaultp> u64mat4x4; | |
46 | ||
47 | ||
48 | /// 8 bit unsigned integer 4x4 matrix. | |
49 | /// | |
50 | /// @see ext_matrix_uint4x4_sized | |
51 | typedef mat<4, 4, uint8, defaultp> u8mat4; | |
52 | ||
53 | /// 16 bit unsigned integer 4x4 matrix. | |
54 | /// | |
55 | /// @see ext_matrix_uint4x4_sized | |
56 | typedef mat<4, 4, uint16, defaultp> u16mat4; | |
57 | ||
58 | /// 32 bit unsigned integer 4x4 matrix. | |
59 | /// | |
60 | /// @see ext_matrix_uint4x4_sized | |
61 | typedef mat<4, 4, uint32, defaultp> u32mat4; | |
62 | ||
63 | /// 64 bit unsigned integer 4x4 matrix. | |
64 | /// | |
65 | /// @see ext_matrix_uint4x4_sized | |
66 | typedef mat<4, 4, uint64, defaultp> u64mat4; | |
67 | ||
68 | /// @} | |
69 | }//namespace glm |
75 | 75 | template<typename T, qualifier Q> |
76 | 76 | GLM_FUNC_DECL qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a); |
77 | 77 | |
78 | /// Spherical linear interpolation of two quaternions with multiple spins over rotation axis. | |
79 | /// The interpolation always take the short path when the spin count is positive and long path | |
80 | /// when count is negative. Rotation is performed at constant speed. | |
81 | /// | |
82 | /// @param x A quaternion | |
83 | /// @param y A quaternion | |
84 | /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. | |
85 | /// @param k Additional spin count. If Value is negative interpolation will be on "long" path. | |
86 | /// | |
87 | /// @tparam T A floating-point scalar type | |
88 | /// @tparam S An integer scalar type | |
89 | /// @tparam Q A value from qualifier enum | |
90 | template<typename T, typename S, qualifier Q> | |
91 | GLM_FUNC_DECL qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k); | |
92 | ||
78 | 93 | /// Returns the q conjugate. |
79 | 94 | /// |
80 | 95 | /// @tparam T A floating-point scalar type |
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | template<typename T, typename S, qualifier Q> | |
75 | GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k) | |
76 | { | |
77 | GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'slerp' only accept floating-point inputs"); | |
78 | GLM_STATIC_ASSERT(std::numeric_limits<S>::is_integer, "'slerp' only accept integer for spin count"); | |
79 | ||
80 | qua<T, Q> z = y; | |
81 | ||
82 | T cosTheta = dot(x, y); | |
83 | ||
84 | // If cosTheta < 0, the interpolation will take the long way around the sphere. | |
85 | // To fix this, one quat must be negated. | |
86 | if (cosTheta < static_cast<T>(0)) | |
87 | { | |
88 | z = -y; | |
89 | cosTheta = -cosTheta; | |
90 | } | |
91 | ||
92 | // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator | |
93 | if (cosTheta > static_cast<T>(1) - epsilon<T>()) | |
94 | { | |
95 | // Linear interpolation | |
96 | return qua<T, Q>( | |
97 | mix(x.w, z.w, a), | |
98 | mix(x.x, z.x, a), | |
99 | mix(x.y, z.y, a), | |
100 | mix(x.z, z.z, a)); | |
101 | } | |
102 | else | |
103 | { | |
104 | // Graphics Gems III, page 96 | |
105 | T angle = acos(cosTheta); | |
106 | T phi = angle + k * glm::pi<T>(); | |
107 | return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle); | |
108 | } | |
109 | } | |
110 | ||
74 | 111 | template<typename T, qualifier Q> |
75 | 112 | GLM_FUNC_QUALIFIER qua<T, Q> conjugate(qua<T, Q> const& q) |
76 | 113 | { |
27 | 27 | /// Returns the minimum component-wise values of 3 inputs |
28 | 28 | /// |
29 | 29 | /// @tparam T A floating-point scalar type. |
30 | /// | |
31 | /// @see ext_scalar_common | |
30 | 32 | template<typename T> |
31 | 33 | GLM_FUNC_DECL T min(T a, T b, T c); |
32 | 34 | |
33 | 35 | /// Returns the minimum component-wise values of 4 inputs |
34 | 36 | /// |
35 | 37 | /// @tparam T A floating-point scalar type. |
38 | /// | |
39 | /// @see ext_scalar_common | |
36 | 40 | template<typename T> |
37 | 41 | GLM_FUNC_DECL T min(T a, T b, T c, T d); |
38 | 42 | |
39 | 43 | /// Returns the maximum component-wise values of 3 inputs |
40 | 44 | /// |
41 | 45 | /// @tparam T A floating-point scalar type. |
46 | /// | |
47 | /// @see ext_scalar_common | |
42 | 48 | template<typename T> |
43 | 49 | GLM_FUNC_DECL T max(T a, T b, T c); |
44 | 50 | |
45 | 51 | /// Returns the maximum component-wise values of 4 inputs |
46 | 52 | /// |
47 | 53 | /// @tparam T A floating-point scalar type. |
54 | /// | |
55 | /// @see ext_scalar_common | |
48 | 56 | template<typename T> |
49 | 57 | GLM_FUNC_DECL T max(T a, T b, T c, T d); |
50 | 58 | |
53 | 61 | /// @tparam T A floating-point scalar type. |
54 | 62 | /// |
55 | 63 | /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a> |
64 | /// @see ext_scalar_common | |
56 | 65 | template<typename T> |
57 | 66 | GLM_FUNC_DECL T fmin(T a, T b); |
58 | 67 | |
61 | 70 | /// @tparam T A floating-point scalar type. |
62 | 71 | /// |
63 | 72 | /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a> |
73 | /// @see ext_scalar_common | |
64 | 74 | template<typename T> |
65 | 75 | GLM_FUNC_DECL T fmin(T a, T b, T c); |
66 | 76 | |
69 | 79 | /// @tparam T A floating-point scalar type. |
70 | 80 | /// |
71 | 81 | /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a> |
82 | /// @see ext_scalar_common | |
72 | 83 | template<typename T> |
73 | 84 | GLM_FUNC_DECL T fmin(T a, T b, T c, T d); |
74 | 85 | |
77 | 88 | /// @tparam T A floating-point scalar type. |
78 | 89 | /// |
79 | 90 | /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> |
91 | /// @see ext_scalar_common | |
80 | 92 | template<typename T> |
81 | 93 | GLM_FUNC_DECL T fmax(T a, T b); |
82 | 94 | |
85 | 97 | /// @tparam T A floating-point scalar type. |
86 | 98 | /// |
87 | 99 | /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> |
100 | /// @see ext_scalar_common | |
88 | 101 | template<typename T> |
89 | 102 | GLM_FUNC_DECL T fmax(T a, T b, T C); |
90 | 103 | |
93 | 106 | /// @tparam T A floating-point scalar type. |
94 | 107 | /// |
95 | 108 | /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> |
109 | /// @see ext_scalar_common | |
96 | 110 | template<typename T> |
97 | 111 | GLM_FUNC_DECL T fmax(T a, T b, T C, T D); |
112 | ||
113 | /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned. | |
114 | /// | |
115 | /// @tparam genType Floating-point scalar types. | |
116 | /// | |
117 | /// @see ext_scalar_common | |
118 | template<typename genType> | |
119 | GLM_FUNC_DECL genType fclamp(genType x, genType minVal, genType maxVal); | |
120 | ||
121 | /// Simulate GL_CLAMP OpenGL wrap mode | |
122 | /// | |
123 | /// @tparam genType Floating-point scalar types. | |
124 | /// | |
125 | /// @see ext_scalar_common extension. | |
126 | template<typename genType> | |
127 | GLM_FUNC_DECL genType clamp(genType const& Texcoord); | |
128 | ||
129 | /// Simulate GL_REPEAT OpenGL wrap mode | |
130 | /// | |
131 | /// @tparam genType Floating-point scalar types. | |
132 | /// | |
133 | /// @see ext_scalar_common extension. | |
134 | template<typename genType> | |
135 | GLM_FUNC_DECL genType repeat(genType const& Texcoord); | |
136 | ||
137 | /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode | |
138 | /// | |
139 | /// @tparam genType Floating-point scalar types. | |
140 | /// | |
141 | /// @see ext_scalar_common extension. | |
142 | template<typename genType> | |
143 | GLM_FUNC_DECL genType mirrorClamp(genType const& Texcoord); | |
144 | ||
145 | /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode | |
146 | /// | |
147 | /// @tparam genType Floating-point scalar types. | |
148 | /// | |
149 | /// @see ext_scalar_common extension. | |
150 | template<typename genType> | |
151 | GLM_FUNC_DECL genType mirrorRepeat(genType const& Texcoord); | |
98 | 152 | |
99 | 153 | /// @} |
100 | 154 | }//namespace glm |
111 | 111 | return max(a, b, c); |
112 | 112 | return max(a, b, c, d); |
113 | 113 | } |
114 | ||
115 | // fclamp | |
116 | template<typename genType> | |
117 | GLM_FUNC_QUALIFIER genType fclamp(genType x, genType minVal, genType maxVal) | |
118 | { | |
119 | GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fclamp' only accept floating-point or integer inputs"); | |
120 | return fmin(fmax(x, minVal), maxVal); | |
121 | } | |
122 | ||
123 | template<typename genType> | |
124 | GLM_FUNC_QUALIFIER genType clamp(genType const& Texcoord) | |
125 | { | |
126 | return glm::clamp(Texcoord, static_cast<genType>(0), static_cast<genType>(1)); | |
127 | } | |
128 | ||
129 | template<typename genType> | |
130 | GLM_FUNC_QUALIFIER genType repeat(genType const& Texcoord) | |
131 | { | |
132 | return glm::fract(Texcoord); | |
133 | } | |
134 | ||
135 | template<typename genType> | |
136 | GLM_FUNC_QUALIFIER genType mirrorClamp(genType const& Texcoord) | |
137 | { | |
138 | return glm::fract(glm::abs(Texcoord)); | |
139 | } | |
140 | ||
141 | template<typename genType> | |
142 | GLM_FUNC_QUALIFIER genType mirrorRepeat(genType const& Texcoord) | |
143 | { | |
144 | genType const Abs = glm::abs(Texcoord); | |
145 | genType const Clamp = glm::mod(glm::floor(Abs), static_cast<genType>(2)); | |
146 | genType const Floor = glm::floor(Abs); | |
147 | genType const Rest = Abs - Floor; | |
148 | genType const Mirror = Clamp + Rest; | |
149 | return mix(Rest, static_cast<genType>(1) - Rest, Mirror >= static_cast<genType>(1)); | |
150 | } | |
114 | 151 | }//namespace glm |
0 | /// @ref ext_scalar_packing | |
1 | /// @file glm/ext/scalar_packing.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_scalar_packing GLM_EXT_scalar_packing | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/scalar_packing.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// This extension provides a set of function to convert scalar values to packed | |
11 | /// formats. | |
12 | ||
13 | #pragma once | |
14 | ||
15 | // Dependency: | |
16 | #include "../detail/qualifier.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_scalar_packing extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_scalar_packing | |
25 | /// @{ | |
26 | ||
27 | ||
28 | /// @} | |
29 | }// namespace glm | |
30 | ||
31 | #include "scalar_packing.inl" |
137 | 137 | template<length_t L, typename T, qualifier Q> |
138 | 138 | GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d); |
139 | 139 | |
140 | /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned. | |
141 | /// | |
142 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector | |
143 | /// @tparam T Floating-point scalar types | |
144 | /// @tparam Q Value from qualifier enum | |
145 | /// | |
146 | /// @see ext_vector_common | |
147 | template<length_t L, typename T, qualifier Q> | |
148 | GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal); | |
149 | ||
150 | /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned. | |
151 | /// | |
152 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector | |
153 | /// @tparam T Floating-point scalar types | |
154 | /// @tparam Q Value from qualifier enum | |
155 | /// | |
156 | /// @see ext_vector_common | |
157 | template<length_t L, typename T, qualifier Q> | |
158 | GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal); | |
159 | ||
160 | /// Simulate GL_CLAMP OpenGL wrap mode | |
161 | /// | |
162 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector | |
163 | /// @tparam T Floating-point scalar types | |
164 | /// @tparam Q Value from qualifier enum | |
165 | /// | |
166 | /// @see ext_vector_common extension. | |
167 | template<length_t L, typename T, qualifier Q> | |
168 | GLM_FUNC_DECL vec<L, T, Q> clamp(vec<L, T, Q> const& Texcoord); | |
169 | ||
170 | /// Simulate GL_REPEAT OpenGL wrap mode | |
171 | /// | |
172 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector | |
173 | /// @tparam T Floating-point scalar types | |
174 | /// @tparam Q Value from qualifier enum | |
175 | /// | |
176 | /// @see ext_vector_common extension. | |
177 | template<length_t L, typename T, qualifier Q> | |
178 | GLM_FUNC_DECL vec<L, T, Q> repeat(vec<L, T, Q> const& Texcoord); | |
179 | ||
180 | /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode | |
181 | /// | |
182 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector | |
183 | /// @tparam T Floating-point scalar types | |
184 | /// @tparam Q Value from qualifier enum | |
185 | /// | |
186 | /// @see ext_vector_common extension. | |
187 | template<length_t L, typename T, qualifier Q> | |
188 | GLM_FUNC_DECL vec<L, T, Q> mirrorClamp(vec<L, T, Q> const& Texcoord); | |
189 | ||
190 | /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode | |
191 | /// | |
192 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector | |
193 | /// @tparam T Floating-point scalar types | |
194 | /// @tparam Q Value from qualifier enum | |
195 | /// | |
196 | /// @see ext_vector_common extension. | |
197 | template<length_t L, typename T, qualifier Q> | |
198 | GLM_FUNC_DECL vec<L, T, Q> mirrorRepeat(vec<L, T, Q> const& Texcoord); | |
199 | ||
140 | 200 | /// @} |
141 | 201 | }//namespace glm |
142 | 202 |
84 | 84 | GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmax' only accept floating-point inputs"); |
85 | 85 | return fmax(fmax(a, b), fmax(c, d)); |
86 | 86 | } |
87 | ||
88 | template<length_t L, typename T, qualifier Q> | |
89 | GLM_FUNC_QUALIFIER vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal) | |
90 | { | |
91 | return fmin(fmax(x, vec<L, T, Q>(minVal)), vec<L, T, Q>(maxVal)); | |
92 | } | |
93 | ||
94 | template<length_t L, typename T, qualifier Q> | |
95 | GLM_FUNC_QUALIFIER vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal) | |
96 | { | |
97 | return fmin(fmax(x, minVal), maxVal); | |
98 | } | |
99 | ||
100 | template<length_t L, typename T, qualifier Q> | |
101 | GLM_FUNC_QUALIFIER vec<L, T, Q> clamp(vec<L, T, Q> const& Texcoord) | |
102 | { | |
103 | return glm::clamp(Texcoord, vec<L, T, Q>(0), vec<L, T, Q>(1)); | |
104 | } | |
105 | ||
106 | template<length_t L, typename T, qualifier Q> | |
107 | GLM_FUNC_QUALIFIER vec<L, T, Q> repeat(vec<L, T, Q> const& Texcoord) | |
108 | { | |
109 | return glm::fract(Texcoord); | |
110 | } | |
111 | ||
112 | template<length_t L, typename T, qualifier Q> | |
113 | GLM_FUNC_QUALIFIER vec<L, T, Q> mirrorClamp(vec<L, T, Q> const& Texcoord) | |
114 | { | |
115 | return glm::fract(glm::abs(Texcoord)); | |
116 | } | |
117 | ||
118 | template<length_t L, typename T, qualifier Q> | |
119 | GLM_FUNC_QUALIFIER vec<L, T, Q> mirrorRepeat(vec<L, T, Q> const& Texcoord) | |
120 | { | |
121 | vec<L, T, Q> const Abs = glm::abs(Texcoord); | |
122 | vec<L, T, Q> const Clamp = glm::mod(glm::floor(Abs), vec<L, T, Q>(2)); | |
123 | vec<L, T, Q> const Floor = glm::floor(Abs); | |
124 | vec<L, T, Q> const Rest = Abs - Floor; | |
125 | vec<L, T, Q> const Mirror = Clamp + Rest; | |
126 | return mix(Rest, vec<L, T, Q>(1) - Rest, glm::greaterThanEqual(Mirror, vec<L, T, Q>(1))); | |
127 | } | |
87 | 128 | }//namespace glm |
0 | /// @ref ext_vector_int1_precision | |
1 | /// @file glm/ext/vector_int1_precision.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_int1_precision GLM_EXT_vector_int1_precision | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes highp_ivec1, mediump_ivec1 and lowp_ivec1 types. | |
7 | /// | |
8 | /// Include <glm/ext/vector_int1_precision.hpp> to use the features of this extension. | |
9 | ||
10 | #pragma once | |
11 | ||
12 | #include "../detail/type_vec1.hpp" | |
13 | ||
14 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
15 | # pragma message("GLM: GLM_EXT_vector_int1_precision extension included") | |
16 | #endif | |
17 | ||
18 | namespace glm | |
19 | { | |
20 | /// @addtogroup ext_vector_int1_precision | |
21 | /// @{ | |
22 | ||
23 | /// 1 component vector of signed integer values. | |
24 | typedef vec<1, int, highp> highp_ivec1; | |
25 | ||
26 | /// 1 component vector of signed integer values. | |
27 | typedef vec<1, int, mediump> mediump_ivec1; | |
28 | ||
29 | /// 1 component vector of signed integer values. | |
30 | typedef vec<1, int, lowp> lowp_ivec1; | |
31 | ||
32 | /// @} | |
33 | }//namespace glm |
0 | /// @ref ext_vector_int1_sized | |
1 | /// @file glm/ext/vector_int1_sized.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_int1_sized GLM_EXT_vector_int1_sized | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes sized signed integer vector types. | |
7 | /// | |
8 | /// Include <glm/ext/vector_int1_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// @see ext_scalar_int_sized | |
11 | /// @see ext_vector_uint1_sized | |
12 | ||
13 | #pragma once | |
14 | ||
15 | #include "../ext/vector_int1.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_int1_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_int1_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer vector of 1 component type. | |
28 | /// | |
29 | /// @see ext_vector_int1_sized | |
30 | typedef vec<1, int8, defaultp> i8vec1; | |
31 | ||
32 | /// 16 bit signed integer vector of 1 component type. | |
33 | /// | |
34 | /// @see ext_vector_int1_sized | |
35 | typedef vec<1, int16, defaultp> i16vec1; | |
36 | ||
37 | /// 32 bit signed integer vector of 1 component type. | |
38 | /// | |
39 | /// @see ext_vector_int1_sized | |
40 | typedef vec<1, int32, defaultp> i32vec1; | |
41 | ||
42 | /// 64 bit signed integer vector of 1 component type. | |
43 | /// | |
44 | /// @see ext_vector_int1_sized | |
45 | typedef vec<1, int64, defaultp> i64vec1; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref core | |
1 | /// @file glm/ext/vector_int2_precision.hpp | |
2 | ||
3 | #pragma once | |
4 | #include "../detail/type_vec2.hpp" | |
5 | ||
6 | namespace glm | |
7 | { | |
8 | /// @addtogroup core_vector_precision | |
9 | /// @{ | |
10 | ||
11 | /// 2 components vector of high qualifier signed integer numbers. | |
12 | /// | |
13 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
14 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
15 | typedef vec<2, int, highp> highp_ivec2; | |
16 | ||
17 | /// 2 components vector of medium qualifier signed integer numbers. | |
18 | /// | |
19 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
20 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
21 | typedef vec<2, int, mediump> mediump_ivec2; | |
22 | ||
23 | /// 2 components vector of low qualifier signed integer numbers. | |
24 | /// | |
25 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
26 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
27 | typedef vec<2, int, lowp> lowp_ivec2; | |
28 | ||
29 | /// @} | |
30 | }//namespace glm |
0 | /// @ref ext_vector_int2_sized | |
1 | /// @file glm/ext/vector_int2_sized.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_int2_sized GLM_EXT_vector_int2_sized | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes sized signed integer vector of 2 components type. | |
7 | /// | |
8 | /// Include <glm/ext/vector_int2_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// @see ext_scalar_int_sized | |
11 | /// @see ext_vector_uint2_sized | |
12 | ||
13 | #pragma once | |
14 | ||
15 | #include "../ext/vector_int2.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_int2_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_int2_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer vector of 2 components type. | |
28 | /// | |
29 | /// @see ext_vector_int2_sized | |
30 | typedef vec<2, int8, defaultp> i8vec2; | |
31 | ||
32 | /// 16 bit signed integer vector of 2 components type. | |
33 | /// | |
34 | /// @see ext_vector_int2_sized | |
35 | typedef vec<2, int16, defaultp> i16vec2; | |
36 | ||
37 | /// 32 bit signed integer vector of 2 components type. | |
38 | /// | |
39 | /// @see ext_vector_int2_sized | |
40 | typedef vec<2, int32, defaultp> i32vec2; | |
41 | ||
42 | /// 64 bit signed integer vector of 2 components type. | |
43 | /// | |
44 | /// @see ext_vector_int2_sized | |
45 | typedef vec<2, int64, defaultp> i64vec2; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref core | |
1 | /// @file glm/ext/vector_int3_precision.hpp | |
2 | ||
3 | #pragma once | |
4 | #include "../detail/type_vec3.hpp" | |
5 | ||
6 | namespace glm | |
7 | { | |
8 | /// @addtogroup core_vector_precision | |
9 | /// @{ | |
10 | ||
11 | /// 3 components vector of high qualifier signed integer numbers. | |
12 | /// | |
13 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
14 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
15 | typedef vec<3, int, highp> highp_ivec3; | |
16 | ||
17 | /// 3 components vector of medium qualifier signed integer numbers. | |
18 | /// | |
19 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
20 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
21 | typedef vec<3, int, mediump> mediump_ivec3; | |
22 | ||
23 | /// 3 components vector of low qualifier signed integer numbers. | |
24 | /// | |
25 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
26 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
27 | typedef vec<3, int, lowp> lowp_ivec3; | |
28 | ||
29 | /// @} | |
30 | }//namespace glm |
0 | /// @ref ext_vector_int3_sized | |
1 | /// @file glm/ext/vector_int3_sized.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_int3_sized GLM_EXT_vector_int3_sized | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes sized signed integer vector of 3 components type. | |
7 | /// | |
8 | /// Include <glm/ext/vector_int3_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// @see ext_scalar_int_sized | |
11 | /// @see ext_vector_uint3_sized | |
12 | ||
13 | #pragma once | |
14 | ||
15 | #include "../ext/vector_int3.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_int3_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_int3_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer vector of 3 components type. | |
28 | /// | |
29 | /// @see ext_vector_int3_sized | |
30 | typedef vec<3, int8, defaultp> i8vec3; | |
31 | ||
32 | /// 16 bit signed integer vector of 3 components type. | |
33 | /// | |
34 | /// @see ext_vector_int3_sized | |
35 | typedef vec<3, int16, defaultp> i16vec3; | |
36 | ||
37 | /// 32 bit signed integer vector of 3 components type. | |
38 | /// | |
39 | /// @see ext_vector_int3_sized | |
40 | typedef vec<3, int32, defaultp> i32vec3; | |
41 | ||
42 | /// 64 bit signed integer vector of 3 components type. | |
43 | /// | |
44 | /// @see ext_vector_int3_sized | |
45 | typedef vec<3, int64, defaultp> i64vec3; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref core | |
1 | /// @file glm/ext/vector_int4_precision.hpp | |
2 | ||
3 | #pragma once | |
4 | #include "../detail/type_vec4.hpp" | |
5 | ||
6 | namespace glm | |
7 | { | |
8 | /// @addtogroup core_vector_precision | |
9 | /// @{ | |
10 | ||
11 | /// 4 components vector of high qualifier signed integer numbers. | |
12 | /// | |
13 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
14 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
15 | typedef vec<4, int, highp> highp_ivec4; | |
16 | ||
17 | /// 4 components vector of medium qualifier signed integer numbers. | |
18 | /// | |
19 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
20 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
21 | typedef vec<4, int, mediump> mediump_ivec4; | |
22 | ||
23 | /// 4 components vector of low qualifier signed integer numbers. | |
24 | /// | |
25 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
26 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
27 | typedef vec<4, int, lowp> lowp_ivec4; | |
28 | ||
29 | /// @} | |
30 | }//namespace glm |
0 | /// @ref ext_vector_int4_sized | |
1 | /// @file glm/ext/vector_int4_sized.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_int4_sized GLM_EXT_vector_int4_sized | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes sized signed integer vector of 4 components type. | |
7 | /// | |
8 | /// Include <glm/ext/vector_int4_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// @see ext_scalar_int_sized | |
11 | /// @see ext_vector_uint4_sized | |
12 | ||
13 | #pragma once | |
14 | ||
15 | #include "../ext/vector_int4.hpp" | |
16 | #include "../ext/scalar_int_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_int4_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_int4_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit signed integer vector of 4 components type. | |
28 | /// | |
29 | /// @see ext_vector_int4_sized | |
30 | typedef vec<4, int8, defaultp> i8vec4; | |
31 | ||
32 | /// 16 bit signed integer vector of 4 components type. | |
33 | /// | |
34 | /// @see ext_vector_int4_sized | |
35 | typedef vec<4, int16, defaultp> i16vec4; | |
36 | ||
37 | /// 32 bit signed integer vector of 4 components type. | |
38 | /// | |
39 | /// @see ext_vector_int4_sized | |
40 | typedef vec<4, int32, defaultp> i32vec4; | |
41 | ||
42 | /// 64 bit signed integer vector of 4 components type. | |
43 | /// | |
44 | /// @see ext_vector_int4_sized | |
45 | typedef vec<4, int64, defaultp> i64vec4; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref ext_vector_packing | |
1 | /// @file glm/ext/vector_packing.hpp | |
2 | /// | |
3 | /// @see core (dependence) | |
4 | /// | |
5 | /// @defgroup ext_vector_packing GLM_EXT_vector_packing | |
6 | /// @ingroup ext | |
7 | /// | |
8 | /// Include <glm/ext/vector_packing.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// This extension provides a set of function to convert vectors to packed | |
11 | /// formats. | |
12 | ||
13 | #pragma once | |
14 | ||
15 | // Dependency: | |
16 | #include "../detail/qualifier.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_packing extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_packing | |
25 | /// @{ | |
26 | ||
27 | ||
28 | /// @} | |
29 | }// namespace glm | |
30 | ||
31 | #include "vector_packing.inl" |
0 | /// @ref ext_vector_uint1_precision | |
1 | /// @file glm/ext/vector_uint1_precision.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_uint1_precision GLM_EXT_vector_uint1_precision | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes highp_uvec1, mediump_uvec1 and lowp_uvec1 types. | |
7 | /// | |
8 | /// Include <glm/ext/vector_uint1_precision.hpp> to use the features of this extension. | |
9 | ||
10 | #pragma once | |
11 | ||
12 | #include "../detail/type_vec1.hpp" | |
13 | ||
14 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
15 | # pragma message("GLM: GLM_EXT_vector_uint1_precision extension included") | |
16 | #endif | |
17 | ||
18 | namespace glm | |
19 | { | |
20 | /// @addtogroup ext_vector_uint1_precision | |
21 | /// @{ | |
22 | ||
23 | /// 1 component vector of unsigned integer values. | |
24 | /// | |
25 | /// @see ext_vector_uint1_precision | |
26 | typedef vec<1, unsigned int, highp> highp_uvec1; | |
27 | ||
28 | /// 1 component vector of unsigned integer values. | |
29 | /// | |
30 | /// @see ext_vector_uint1_precision | |
31 | typedef vec<1, unsigned int, mediump> mediump_uvec1; | |
32 | ||
33 | /// 1 component vector of unsigned integer values. | |
34 | /// | |
35 | /// @see ext_vector_uint1_precision | |
36 | typedef vec<1, unsigned int, lowp> lowp_uvec1; | |
37 | ||
38 | /// @} | |
39 | }//namespace glm |
0 | /// @ref ext_vector_uint1_sized | |
1 | /// @file glm/ext/vector_uint1_sized.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_uint1_sized GLM_EXT_vector_uint1_sized | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes sized unsigned integer vector types. | |
7 | /// | |
8 | /// Include <glm/ext/vector_uint1_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// @see ext_scalar_uint_sized | |
11 | /// @see ext_vector_int1_sized | |
12 | ||
13 | #pragma once | |
14 | ||
15 | #include "../ext/vector_uint1.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_uint1_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_uint1_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer vector of 1 component type. | |
28 | /// | |
29 | /// @see ext_vector_uint1_sized | |
30 | typedef vec<1, uint8, defaultp> u8vec1; | |
31 | ||
32 | /// 16 bit unsigned integer vector of 1 component type. | |
33 | /// | |
34 | /// @see ext_vector_uint1_sized | |
35 | typedef vec<1, uint16, defaultp> u16vec1; | |
36 | ||
37 | /// 32 bit unsigned integer vector of 1 component type. | |
38 | /// | |
39 | /// @see ext_vector_uint1_sized | |
40 | typedef vec<1, uint32, defaultp> u32vec1; | |
41 | ||
42 | /// 64 bit unsigned integer vector of 1 component type. | |
43 | /// | |
44 | /// @see ext_vector_uint1_sized | |
45 | typedef vec<1, uint64, defaultp> u64vec1; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref core | |
1 | /// @file glm/ext/vector_uint2_precision.hpp | |
2 | ||
3 | #pragma once | |
4 | #include "../detail/type_vec2.hpp" | |
5 | ||
6 | namespace glm | |
7 | { | |
8 | /// @addtogroup core_vector_precision | |
9 | /// @{ | |
10 | ||
11 | /// 2 components vector of high qualifier unsigned integer numbers. | |
12 | /// | |
13 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
14 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
15 | typedef vec<2, unsigned int, highp> highp_uvec2; | |
16 | ||
17 | /// 2 components vector of medium qualifier unsigned integer numbers. | |
18 | /// | |
19 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
20 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
21 | typedef vec<2, unsigned int, mediump> mediump_uvec2; | |
22 | ||
23 | /// 2 components vector of low qualifier unsigned integer numbers. | |
24 | /// | |
25 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
26 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
27 | typedef vec<2, unsigned int, lowp> lowp_uvec2; | |
28 | ||
29 | /// @} | |
30 | }//namespace glm |
0 | /// @ref ext_vector_uint2_sized | |
1 | /// @file glm/ext/vector_uint2_sized.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_uint2_sized GLM_EXT_vector_uint2_sized | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes sized unsigned integer vector of 2 components type. | |
7 | /// | |
8 | /// Include <glm/ext/vector_uint2_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// @see ext_scalar_uint_sized | |
11 | /// @see ext_vector_int2_sized | |
12 | ||
13 | #pragma once | |
14 | ||
15 | #include "../ext/vector_uint2.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_uint2_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_uint2_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer vector of 2 components type. | |
28 | /// | |
29 | /// @see ext_vector_uint2_sized | |
30 | typedef vec<2, uint8, defaultp> u8vec2; | |
31 | ||
32 | /// 16 bit unsigned integer vector of 2 components type. | |
33 | /// | |
34 | /// @see ext_vector_uint2_sized | |
35 | typedef vec<2, uint16, defaultp> u16vec2; | |
36 | ||
37 | /// 32 bit unsigned integer vector of 2 components type. | |
38 | /// | |
39 | /// @see ext_vector_uint2_sized | |
40 | typedef vec<2, uint32, defaultp> u32vec2; | |
41 | ||
42 | /// 64 bit unsigned integer vector of 2 components type. | |
43 | /// | |
44 | /// @see ext_vector_uint2_sized | |
45 | typedef vec<2, uint64, defaultp> u64vec2; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref core | |
1 | /// @file glm/ext/vector_uint3_precision.hpp | |
2 | ||
3 | #pragma once | |
4 | #include "../detail/type_vec3.hpp" | |
5 | ||
6 | namespace glm | |
7 | { | |
8 | /// @addtogroup core_vector_precision | |
9 | /// @{ | |
10 | ||
11 | /// 3 components vector of high qualifier unsigned integer numbers. | |
12 | /// | |
13 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
14 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
15 | typedef vec<3, unsigned int, highp> highp_uvec3; | |
16 | ||
17 | /// 3 components vector of medium qualifier unsigned integer numbers. | |
18 | /// | |
19 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
20 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
21 | typedef vec<3, unsigned int, mediump> mediump_uvec3; | |
22 | ||
23 | /// 3 components vector of low qualifier unsigned integer numbers. | |
24 | /// | |
25 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
26 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
27 | typedef vec<3, unsigned int, lowp> lowp_uvec3; | |
28 | ||
29 | /// @} | |
30 | }//namespace glm |
0 | /// @ref ext_vector_uint3_sized | |
1 | /// @file glm/ext/vector_uint3_sized.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_uint3_sized GLM_EXT_vector_uint3_sized | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes sized unsigned integer vector of 3 components type. | |
7 | /// | |
8 | /// Include <glm/ext/vector_uint3_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// @see ext_scalar_uint_sized | |
11 | /// @see ext_vector_int3_sized | |
12 | ||
13 | #pragma once | |
14 | ||
15 | #include "../ext/vector_uint3.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_uint3_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_uint3_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer vector of 3 components type. | |
28 | /// | |
29 | /// @see ext_vector_uint3_sized | |
30 | typedef vec<3, uint8, defaultp> u8vec3; | |
31 | ||
32 | /// 16 bit unsigned integer vector of 3 components type. | |
33 | /// | |
34 | /// @see ext_vector_uint3_sized | |
35 | typedef vec<3, uint16, defaultp> u16vec3; | |
36 | ||
37 | /// 32 bit unsigned integer vector of 3 components type. | |
38 | /// | |
39 | /// @see ext_vector_uint3_sized | |
40 | typedef vec<3, uint32, defaultp> u32vec3; | |
41 | ||
42 | /// 64 bit unsigned integer vector of 3 components type. | |
43 | /// | |
44 | /// @see ext_vector_uint3_sized | |
45 | typedef vec<3, uint64, defaultp> u64vec3; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
0 | /// @ref core | |
1 | /// @file glm/ext/vector_uint4_precision.hpp | |
2 | ||
3 | #pragma once | |
4 | #include "../detail/type_vec4.hpp" | |
5 | ||
6 | namespace glm | |
7 | { | |
8 | /// @addtogroup core_vector_precision | |
9 | /// @{ | |
10 | ||
11 | /// 4 components vector of high qualifier unsigned integer numbers. | |
12 | /// | |
13 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
14 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
15 | typedef vec<4, unsigned int, highp> highp_uvec4; | |
16 | ||
17 | /// 4 components vector of medium qualifier unsigned integer numbers. | |
18 | /// | |
19 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
20 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
21 | typedef vec<4, unsigned int, mediump> mediump_uvec4; | |
22 | ||
23 | /// 4 components vector of low qualifier unsigned integer numbers. | |
24 | /// | |
25 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> | |
26 | /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> | |
27 | typedef vec<4, unsigned int, lowp> lowp_uvec4; | |
28 | ||
29 | /// @} | |
30 | }//namespace glm |
0 | /// @ref ext_vector_uint4_sized | |
1 | /// @file glm/ext/vector_uint4_sized.hpp | |
2 | /// | |
3 | /// @defgroup ext_vector_uint4_sized GLM_EXT_vector_uint4_sized | |
4 | /// @ingroup ext | |
5 | /// | |
6 | /// Exposes sized unsigned integer vector of 4 components type. | |
7 | /// | |
8 | /// Include <glm/ext/vector_uint4_sized.hpp> to use the features of this extension. | |
9 | /// | |
10 | /// @see ext_scalar_uint_sized | |
11 | /// @see ext_vector_int4_sized | |
12 | ||
13 | #pragma once | |
14 | ||
15 | #include "../ext/vector_uint4.hpp" | |
16 | #include "../ext/scalar_uint_sized.hpp" | |
17 | ||
18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) | |
19 | # pragma message("GLM: GLM_EXT_vector_uint4_sized extension included") | |
20 | #endif | |
21 | ||
22 | namespace glm | |
23 | { | |
24 | /// @addtogroup ext_vector_uint4_sized | |
25 | /// @{ | |
26 | ||
27 | /// 8 bit unsigned integer vector of 4 components type. | |
28 | /// | |
29 | /// @see ext_vector_uint4_sized | |
30 | typedef vec<4, uint8, defaultp> u8vec4; | |
31 | ||
32 | /// 16 bit unsigned integer vector of 4 components type. | |
33 | /// | |
34 | /// @see ext_vector_uint4_sized | |
35 | typedef vec<4, uint16, defaultp> u16vec4; | |
36 | ||
37 | /// 32 bit unsigned integer vector of 4 components type. | |
38 | /// | |
39 | /// @see ext_vector_uint4_sized | |
40 | typedef vec<4, uint32, defaultp> u32vec4; | |
41 | ||
42 | /// 64 bit unsigned integer vector of 4 components type. | |
43 | /// | |
44 | /// @see ext_vector_uint4_sized | |
45 | typedef vec<4, uint64, defaultp> u64vec4; | |
46 | ||
47 | /// @} | |
48 | }//namespace glm |
11 | 11 | # define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED |
12 | 12 | # pragma message("GLM: All extensions included (not recommended)") |
13 | 13 | #endif//GLM_MESSAGES |
14 | ||
15 | #include "./ext/matrix_clip_space.hpp" | |
16 | #include "./ext/matrix_common.hpp" | |
14 | 17 | |
15 | 18 | #include "./ext/matrix_double2x2.hpp" |
16 | 19 | #include "./ext/matrix_double2x2_precision.hpp" |
50 | 53 | #include "./ext/matrix_float4x4.hpp" |
51 | 54 | #include "./ext/matrix_float4x4_precision.hpp" |
52 | 55 | |
56 | #include "./ext/matrix_int2x2.hpp" | |
57 | #include "./ext/matrix_int2x2_sized.hpp" | |
58 | #include "./ext/matrix_int2x3.hpp" | |
59 | #include "./ext/matrix_int2x3_sized.hpp" | |
60 | #include "./ext/matrix_int2x4.hpp" | |
61 | #include "./ext/matrix_int2x4_sized.hpp" | |
62 | #include "./ext/matrix_int3x2.hpp" | |
63 | #include "./ext/matrix_int3x2_sized.hpp" | |
64 | #include "./ext/matrix_int3x3.hpp" | |
65 | #include "./ext/matrix_int3x3_sized.hpp" | |
66 | #include "./ext/matrix_int3x4.hpp" | |
67 | #include "./ext/matrix_int3x4_sized.hpp" | |
68 | #include "./ext/matrix_int4x2.hpp" | |
69 | #include "./ext/matrix_int4x2_sized.hpp" | |
70 | #include "./ext/matrix_int4x3.hpp" | |
71 | #include "./ext/matrix_int4x3_sized.hpp" | |
72 | #include "./ext/matrix_int4x4.hpp" | |
73 | #include "./ext/matrix_int4x4_sized.hpp" | |
74 | ||
75 | #include "./ext/matrix_uint2x2.hpp" | |
76 | #include "./ext/matrix_uint2x2_sized.hpp" | |
77 | #include "./ext/matrix_uint2x3.hpp" | |
78 | #include "./ext/matrix_uint2x3_sized.hpp" | |
79 | #include "./ext/matrix_uint2x4.hpp" | |
80 | #include "./ext/matrix_uint2x4_sized.hpp" | |
81 | #include "./ext/matrix_uint3x2.hpp" | |
82 | #include "./ext/matrix_uint3x2_sized.hpp" | |
83 | #include "./ext/matrix_uint3x3.hpp" | |
84 | #include "./ext/matrix_uint3x3_sized.hpp" | |
85 | #include "./ext/matrix_uint3x4.hpp" | |
86 | #include "./ext/matrix_uint3x4_sized.hpp" | |
87 | #include "./ext/matrix_uint4x2.hpp" | |
88 | #include "./ext/matrix_uint4x2_sized.hpp" | |
89 | #include "./ext/matrix_uint4x3.hpp" | |
90 | #include "./ext/matrix_uint4x3_sized.hpp" | |
91 | #include "./ext/matrix_uint4x4.hpp" | |
92 | #include "./ext/matrix_uint4x4_sized.hpp" | |
93 | ||
94 | #include "./ext/matrix_projection.hpp" | |
53 | 95 | #include "./ext/matrix_relational.hpp" |
54 | ||
96 | #include "./ext/matrix_transform.hpp" | |
97 | ||
98 | #include "./ext/quaternion_common.hpp" | |
55 | 99 | #include "./ext/quaternion_double.hpp" |
56 | 100 | #include "./ext/quaternion_double_precision.hpp" |
57 | 101 | #include "./ext/quaternion_float.hpp" |
58 | 102 | #include "./ext/quaternion_float_precision.hpp" |
103 | #include "./ext/quaternion_exponential.hpp" | |
59 | 104 | #include "./ext/quaternion_geometric.hpp" |
60 | 105 | #include "./ext/quaternion_relational.hpp" |
61 | ||
106 | #include "./ext/quaternion_transform.hpp" | |
107 | #include "./ext/quaternion_trigonometric.hpp" | |
108 | ||
109 | #include "./ext/scalar_common.hpp" | |
62 | 110 | #include "./ext/scalar_constants.hpp" |
111 | #include "./ext/scalar_integer.hpp" | |
112 | #include "./ext/scalar_packing.hpp" | |
113 | #include "./ext/scalar_relational.hpp" | |
114 | #include "./ext/scalar_ulp.hpp" | |
115 | ||
63 | 116 | #include "./ext/scalar_int_sized.hpp" |
64 | #include "./ext/scalar_relational.hpp" | |
117 | #include "./ext/scalar_uint_sized.hpp" | |
118 | ||
119 | #include "./ext/vector_common.hpp" | |
120 | #include "./ext/vector_integer.hpp" | |
121 | #include "./ext/vector_packing.hpp" | |
122 | #include "./ext/vector_relational.hpp" | |
123 | #include "./ext/vector_ulp.hpp" | |
65 | 124 | |
66 | 125 | #include "./ext/vector_bool1.hpp" |
67 | 126 | #include "./ext/vector_bool1_precision.hpp" |
91 | 150 | #include "./ext/vector_float4_precision.hpp" |
92 | 151 | |
93 | 152 | #include "./ext/vector_int1.hpp" |
94 | #include "./ext/vector_int1_precision.hpp" | |
153 | #include "./ext/vector_int1_sized.hpp" | |
95 | 154 | #include "./ext/vector_int2.hpp" |
96 | #include "./ext/vector_int2_precision.hpp" | |
155 | #include "./ext/vector_int2_sized.hpp" | |
97 | 156 | #include "./ext/vector_int3.hpp" |
98 | #include "./ext/vector_int3_precision.hpp" | |
157 | #include "./ext/vector_int3_sized.hpp" | |
99 | 158 | #include "./ext/vector_int4.hpp" |
100 | #include "./ext/vector_int4_precision.hpp" | |
101 | ||
102 | #include "./ext/vector_relational.hpp" | |
159 | #include "./ext/vector_int4_sized.hpp" | |
103 | 160 | |
104 | 161 | #include "./ext/vector_uint1.hpp" |
105 | #include "./ext/vector_uint1_precision.hpp" | |
162 | #include "./ext/vector_uint1_sized.hpp" | |
106 | 163 | #include "./ext/vector_uint2.hpp" |
107 | #include "./ext/vector_uint2_precision.hpp" | |
164 | #include "./ext/vector_uint2_sized.hpp" | |
108 | 165 | #include "./ext/vector_uint3.hpp" |
109 | #include "./ext/vector_uint3_precision.hpp" | |
166 | #include "./ext/vector_uint3_sized.hpp" | |
110 | 167 | #include "./ext/vector_uint4.hpp" |
111 | #include "./ext/vector_uint4_precision.hpp" | |
168 | #include "./ext/vector_uint4_sized.hpp" | |
112 | 169 | |
113 | 170 | #include "./gtc/bitfield.hpp" |
114 | 171 | #include "./gtc/color_space.hpp" |
85 | 85 | |
86 | 86 | // Scalar uint |
87 | 87 | |
88 | typedef unsigned int uint; | |
89 | ||
88 | 90 | typedef uint8 lowp_u8; |
89 | 91 | typedef uint8 mediump_u8; |
90 | 92 | typedef uint8 highp_u8; |
198 | 200 | |
199 | 201 | // Vector int |
200 | 202 | |
201 | typedef vec<1, i32, lowp> lowp_ivec1; | |
202 | typedef vec<2, i32, lowp> lowp_ivec2; | |
203 | typedef vec<3, i32, lowp> lowp_ivec3; | |
204 | typedef vec<4, i32, lowp> lowp_ivec4; | |
205 | ||
206 | typedef vec<1, i32, mediump> mediump_ivec1; | |
207 | typedef vec<2, i32, mediump> mediump_ivec2; | |
208 | typedef vec<3, i32, mediump> mediump_ivec3; | |
209 | typedef vec<4, i32, mediump> mediump_ivec4; | |
210 | ||
211 | typedef vec<1, i32, highp> highp_ivec1; | |
212 | typedef vec<2, i32, highp> highp_ivec2; | |
213 | typedef vec<3, i32, highp> highp_ivec3; | |
214 | typedef vec<4, i32, highp> highp_ivec4; | |
215 | ||
216 | typedef vec<1, i32, defaultp> ivec1; | |
217 | typedef vec<2, i32, defaultp> ivec2; | |
218 | typedef vec<3, i32, defaultp> ivec3; | |
219 | typedef vec<4, i32, defaultp> ivec4; | |
203 | typedef vec<1, int, lowp> lowp_ivec1; | |
204 | typedef vec<2, int, lowp> lowp_ivec2; | |
205 | typedef vec<3, int, lowp> lowp_ivec3; | |
206 | typedef vec<4, int, lowp> lowp_ivec4; | |
207 | ||
208 | typedef vec<1, int, mediump> mediump_ivec1; | |
209 | typedef vec<2, int, mediump> mediump_ivec2; | |
210 | typedef vec<3, int, mediump> mediump_ivec3; | |
211 | typedef vec<4, int, mediump> mediump_ivec4; | |
212 | ||
213 | typedef vec<1, int, highp> highp_ivec1; | |
214 | typedef vec<2, int, highp> highp_ivec2; | |
215 | typedef vec<3, int, highp> highp_ivec3; | |
216 | typedef vec<4, int, highp> highp_ivec4; | |
217 | ||
218 | typedef vec<1, int, defaultp> ivec1; | |
219 | typedef vec<2, int, defaultp> ivec2; | |
220 | typedef vec<3, int, defaultp> ivec3; | |
221 | typedef vec<4, int, defaultp> ivec4; | |
220 | 222 | |
221 | 223 | typedef vec<1, i8, lowp> lowp_i8vec1; |
222 | 224 | typedef vec<2, i8, lowp> lowp_i8vec2; |
300 | 302 | |
301 | 303 | // Vector uint |
302 | 304 | |
303 | typedef vec<1, u32, lowp> lowp_uvec1; | |
304 | typedef vec<2, u32, lowp> lowp_uvec2; | |
305 | typedef vec<3, u32, lowp> lowp_uvec3; | |
306 | typedef vec<4, u32, lowp> lowp_uvec4; | |
307 | ||
308 | typedef vec<1, u32, mediump> mediump_uvec1; | |
309 | typedef vec<2, u32, mediump> mediump_uvec2; | |
310 | typedef vec<3, u32, mediump> mediump_uvec3; | |
311 | typedef vec<4, u32, mediump> mediump_uvec4; | |
312 | ||
313 | typedef vec<1, u32, highp> highp_uvec1; | |
314 | typedef vec<2, u32, highp> highp_uvec2; | |
315 | typedef vec<3, u32, highp> highp_uvec3; | |
316 | typedef vec<4, u32, highp> highp_uvec4; | |
317 | ||
318 | typedef vec<1, u32, defaultp> uvec1; | |
319 | typedef vec<2, u32, defaultp> uvec2; | |
320 | typedef vec<3, u32, defaultp> uvec3; | |
321 | typedef vec<4, u32, defaultp> uvec4; | |
305 | typedef vec<1, uint, lowp> lowp_uvec1; | |
306 | typedef vec<2, uint, lowp> lowp_uvec2; | |
307 | typedef vec<3, uint, lowp> lowp_uvec3; | |
308 | typedef vec<4, uint, lowp> lowp_uvec4; | |
309 | ||
310 | typedef vec<1, uint, mediump> mediump_uvec1; | |
311 | typedef vec<2, uint, mediump> mediump_uvec2; | |
312 | typedef vec<3, uint, mediump> mediump_uvec3; | |
313 | typedef vec<4, uint, mediump> mediump_uvec4; | |
314 | ||
315 | typedef vec<1, uint, highp> highp_uvec1; | |
316 | typedef vec<2, uint, highp> highp_uvec2; | |
317 | typedef vec<3, uint, highp> highp_uvec3; | |
318 | typedef vec<4, uint, highp> highp_uvec4; | |
319 | ||
320 | typedef vec<1, uint, defaultp> uvec1; | |
321 | typedef vec<2, uint, defaultp> uvec2; | |
322 | typedef vec<3, uint, defaultp> uvec3; | |
323 | typedef vec<4, uint, defaultp> uvec4; | |
322 | 324 | |
323 | 325 | typedef vec<1, u8, lowp> lowp_u8vec1; |
324 | 326 | typedef vec<2, u8, lowp> lowp_u8vec2; |
786 | 788 | typedef mat<3, 4, f64, defaultp> f64mat3x4; |
787 | 789 | typedef mat<4, 4, f64, defaultp> f64mat4x4; |
788 | 790 | |
791 | // Signed integer matrix MxN | |
792 | ||
793 | typedef mat<2, 2, int, lowp> lowp_imat2x2; | |
794 | typedef mat<2, 3, int, lowp> lowp_imat2x3; | |
795 | typedef mat<2, 4, int, lowp> lowp_imat2x4; | |
796 | typedef mat<3, 2, int, lowp> lowp_imat3x2; | |
797 | typedef mat<3, 3, int, lowp> lowp_imat3x3; | |
798 | typedef mat<3, 4, int, lowp> lowp_imat3x4; | |
799 | typedef mat<4, 2, int, lowp> lowp_imat4x2; | |
800 | typedef mat<4, 3, int, lowp> lowp_imat4x3; | |
801 | typedef mat<4, 4, int, lowp> lowp_imat4x4; | |
802 | ||
803 | typedef mat<2, 2, int, mediump> mediump_imat2x2; | |
804 | typedef mat<2, 3, int, mediump> mediump_imat2x3; | |
805 | typedef mat<2, 4, int, mediump> mediump_imat2x4; | |
806 | typedef mat<3, 2, int, mediump> mediump_imat3x2; | |
807 | typedef mat<3, 3, int, mediump> mediump_imat3x3; | |
808 | typedef mat<3, 4, int, mediump> mediump_imat3x4; | |
809 | typedef mat<4, 2, int, mediump> mediump_imat4x2; | |
810 | typedef mat<4, 3, int, mediump> mediump_imat4x3; | |
811 | typedef mat<4, 4, int, mediump> mediump_imat4x4; | |
812 | ||
813 | typedef mat<2, 2, int, highp> highp_imat2x2; | |
814 | typedef mat<2, 3, int, highp> highp_imat2x3; | |
815 | typedef mat<2, 4, int, highp> highp_imat2x4; | |
816 | typedef mat<3, 2, int, highp> highp_imat3x2; | |
817 | typedef mat<3, 3, int, highp> highp_imat3x3; | |
818 | typedef mat<3, 4, int, highp> highp_imat3x4; | |
819 | typedef mat<4, 2, int, highp> highp_imat4x2; | |
820 | typedef mat<4, 3, int, highp> highp_imat4x3; | |
821 | typedef mat<4, 4, int, highp> highp_imat4x4; | |
822 | ||
823 | typedef mat<2, 2, int, defaultp> imat2x2; | |
824 | typedef mat<3, 2, int, defaultp> imat3x2; | |
825 | typedef mat<4, 2, int, defaultp> imat4x2; | |
826 | typedef mat<2, 3, int, defaultp> imat2x3; | |
827 | typedef mat<3, 3, int, defaultp> imat3x3; | |
828 | typedef mat<4, 3, int, defaultp> imat4x3; | |
829 | typedef mat<2, 4, int, defaultp> imat2x4; | |
830 | typedef mat<3, 4, int, defaultp> imat3x4; | |
831 | typedef mat<4, 4, int, defaultp> imat4x4; | |
832 | ||
833 | ||
834 | typedef mat<2, 2, int8, lowp> lowp_i8mat2x2; | |
835 | typedef mat<2, 3, int8, lowp> lowp_i8mat2x3; | |
836 | typedef mat<2, 4, int8, lowp> lowp_i8mat2x4; | |
837 | typedef mat<3, 2, int8, lowp> lowp_i8mat3x2; | |
838 | typedef mat<3, 3, int8, lowp> lowp_i8mat3x3; | |
839 | typedef mat<3, 4, int8, lowp> lowp_i8mat3x4; | |
840 | typedef mat<4, 2, int8, lowp> lowp_i8mat4x2; | |
841 | typedef mat<4, 3, int8, lowp> lowp_i8mat4x3; | |
842 | typedef mat<4, 4, int8, lowp> lowp_i8mat4x4; | |
843 | ||
844 | typedef mat<2, 2, int8, mediump> mediump_i8mat2x2; | |
845 | typedef mat<2, 3, int8, mediump> mediump_i8mat2x3; | |
846 | typedef mat<2, 4, int8, mediump> mediump_i8mat2x4; | |
847 | typedef mat<3, 2, int8, mediump> mediump_i8mat3x2; | |
848 | typedef mat<3, 3, int8, mediump> mediump_i8mat3x3; | |
849 | typedef mat<3, 4, int8, mediump> mediump_i8mat3x4; | |
850 | typedef mat<4, 2, int8, mediump> mediump_i8mat4x2; | |
851 | typedef mat<4, 3, int8, mediump> mediump_i8mat4x3; | |
852 | typedef mat<4, 4, int8, mediump> mediump_i8mat4x4; | |
853 | ||
854 | typedef mat<2, 2, int8, highp> highp_i8mat2x2; | |
855 | typedef mat<2, 3, int8, highp> highp_i8mat2x3; | |
856 | typedef mat<2, 4, int8, highp> highp_i8mat2x4; | |
857 | typedef mat<3, 2, int8, highp> highp_i8mat3x2; | |
858 | typedef mat<3, 3, int8, highp> highp_i8mat3x3; | |
859 | typedef mat<3, 4, int8, highp> highp_i8mat3x4; | |
860 | typedef mat<4, 2, int8, highp> highp_i8mat4x2; | |
861 | typedef mat<4, 3, int8, highp> highp_i8mat4x3; | |
862 | typedef mat<4, 4, int8, highp> highp_i8mat4x4; | |
863 | ||
864 | typedef mat<2, 2, int8, defaultp> i8mat2x2; | |
865 | typedef mat<3, 2, int8, defaultp> i8mat3x2; | |
866 | typedef mat<4, 2, int8, defaultp> i8mat4x2; | |
867 | typedef mat<2, 3, int8, defaultp> i8mat2x3; | |
868 | typedef mat<3, 3, int8, defaultp> i8mat3x3; | |
869 | typedef mat<4, 3, int8, defaultp> i8mat4x3; | |
870 | typedef mat<2, 4, int8, defaultp> i8mat2x4; | |
871 | typedef mat<3, 4, int8, defaultp> i8mat3x4; | |
872 | typedef mat<4, 4, int8, defaultp> i8mat4x4; | |
873 | ||
874 | ||
875 | typedef mat<2, 2, int16, lowp> lowp_i16mat2x2; | |
876 | typedef mat<2, 3, int16, lowp> lowp_i16mat2x3; | |
877 | typedef mat<2, 4, int16, lowp> lowp_i16mat2x4; | |
878 | typedef mat<3, 2, int16, lowp> lowp_i16mat3x2; | |
879 | typedef mat<3, 3, int16, lowp> lowp_i16mat3x3; | |
880 | typedef mat<3, 4, int16, lowp> lowp_i16mat3x4; | |
881 | typedef mat<4, 2, int16, lowp> lowp_i16mat4x2; | |
882 | typedef mat<4, 3, int16, lowp> lowp_i16mat4x3; | |
883 | typedef mat<4, 4, int16, lowp> lowp_i16mat4x4; | |
884 | ||
885 | typedef mat<2, 2, int16, mediump> mediump_i16mat2x2; | |
886 | typedef mat<2, 3, int16, mediump> mediump_i16mat2x3; | |
887 | typedef mat<2, 4, int16, mediump> mediump_i16mat2x4; | |
888 | typedef mat<3, 2, int16, mediump> mediump_i16mat3x2; | |
889 | typedef mat<3, 3, int16, mediump> mediump_i16mat3x3; | |
890 | typedef mat<3, 4, int16, mediump> mediump_i16mat3x4; | |
891 | typedef mat<4, 2, int16, mediump> mediump_i16mat4x2; | |
892 | typedef mat<4, 3, int16, mediump> mediump_i16mat4x3; | |
893 | typedef mat<4, 4, int16, mediump> mediump_i16mat4x4; | |
894 | ||
895 | typedef mat<2, 2, int16, highp> highp_i16mat2x2; | |
896 | typedef mat<2, 3, int16, highp> highp_i16mat2x3; | |
897 | typedef mat<2, 4, int16, highp> highp_i16mat2x4; | |
898 | typedef mat<3, 2, int16, highp> highp_i16mat3x2; | |
899 | typedef mat<3, 3, int16, highp> highp_i16mat3x3; | |
900 | typedef mat<3, 4, int16, highp> highp_i16mat3x4; | |
901 | typedef mat<4, 2, int16, highp> highp_i16mat4x2; | |
902 | typedef mat<4, 3, int16, highp> highp_i16mat4x3; | |
903 | typedef mat<4, 4, int16, highp> highp_i16mat4x4; | |
904 | ||
905 | typedef mat<2, 2, int16, defaultp> i16mat2x2; | |
906 | typedef mat<3, 2, int16, defaultp> i16mat3x2; | |
907 | typedef mat<4, 2, int16, defaultp> i16mat4x2; | |
908 | typedef mat<2, 3, int16, defaultp> i16mat2x3; | |
909 | typedef mat<3, 3, int16, defaultp> i16mat3x3; | |
910 | typedef mat<4, 3, int16, defaultp> i16mat4x3; | |
911 | typedef mat<2, 4, int16, defaultp> i16mat2x4; | |
912 | typedef mat<3, 4, int16, defaultp> i16mat3x4; | |
913 | typedef mat<4, 4, int16, defaultp> i16mat4x4; | |
914 | ||
915 | ||
916 | typedef mat<2, 2, int32, lowp> lowp_i32mat2x2; | |
917 | typedef mat<2, 3, int32, lowp> lowp_i32mat2x3; | |
918 | typedef mat<2, 4, int32, lowp> lowp_i32mat2x4; | |
919 | typedef mat<3, 2, int32, lowp> lowp_i32mat3x2; | |
920 | typedef mat<3, 3, int32, lowp> lowp_i32mat3x3; | |
921 | typedef mat<3, 4, int32, lowp> lowp_i32mat3x4; | |
922 | typedef mat<4, 2, int32, lowp> lowp_i32mat4x2; | |
923 | typedef mat<4, 3, int32, lowp> lowp_i32mat4x3; | |
924 | typedef mat<4, 4, int32, lowp> lowp_i32mat4x4; | |
925 | ||
926 | typedef mat<2, 2, int32, mediump> mediump_i32mat2x2; | |
927 | typedef mat<2, 3, int32, mediump> mediump_i32mat2x3; | |
928 | typedef mat<2, 4, int32, mediump> mediump_i32mat2x4; | |
929 | typedef mat<3, 2, int32, mediump> mediump_i32mat3x2; | |
930 | typedef mat<3, 3, int32, mediump> mediump_i32mat3x3; | |
931 | typedef mat<3, 4, int32, mediump> mediump_i32mat3x4; | |
932 | typedef mat<4, 2, int32, mediump> mediump_i32mat4x2; | |
933 | typedef mat<4, 3, int32, mediump> mediump_i32mat4x3; | |
934 | typedef mat<4, 4, int32, mediump> mediump_i32mat4x4; | |
935 | ||
936 | typedef mat<2, 2, int32, highp> highp_i32mat2x2; | |
937 | typedef mat<2, 3, int32, highp> highp_i32mat2x3; | |
938 | typedef mat<2, 4, int32, highp> highp_i32mat2x4; | |
939 | typedef mat<3, 2, int32, highp> highp_i32mat3x2; | |
940 | typedef mat<3, 3, int32, highp> highp_i32mat3x3; | |
941 | typedef mat<3, 4, int32, highp> highp_i32mat3x4; | |
942 | typedef mat<4, 2, int32, highp> highp_i32mat4x2; | |
943 | typedef mat<4, 3, int32, highp> highp_i32mat4x3; | |
944 | typedef mat<4, 4, int32, highp> highp_i32mat4x4; | |
945 | ||
946 | typedef mat<2, 2, int32, defaultp> i32mat2x2; | |
947 | typedef mat<3, 2, int32, defaultp> i32mat3x2; | |
948 | typedef mat<4, 2, int32, defaultp> i32mat4x2; | |
949 | typedef mat<2, 3, int32, defaultp> i32mat2x3; | |
950 | typedef mat<3, 3, int32, defaultp> i32mat3x3; | |
951 | typedef mat<4, 3, int32, defaultp> i32mat4x3; | |
952 | typedef mat<2, 4, int32, defaultp> i32mat2x4; | |
953 | typedef mat<3, 4, int32, defaultp> i32mat3x4; | |
954 | typedef mat<4, 4, int32, defaultp> i32mat4x4; | |
955 | ||
956 | ||
957 | typedef mat<2, 2, int64, lowp> lowp_i64mat2x2; | |
958 | typedef mat<2, 3, int64, lowp> lowp_i64mat2x3; | |
959 | typedef mat<2, 4, int64, lowp> lowp_i64mat2x4; | |
960 | typedef mat<3, 2, int64, lowp> lowp_i64mat3x2; | |
961 | typedef mat<3, 3, int64, lowp> lowp_i64mat3x3; | |
962 | typedef mat<3, 4, int64, lowp> lowp_i64mat3x4; | |
963 | typedef mat<4, 2, int64, lowp> lowp_i64mat4x2; | |
964 | typedef mat<4, 3, int64, lowp> lowp_i64mat4x3; | |
965 | typedef mat<4, 4, int64, lowp> lowp_i64mat4x4; | |
966 | ||
967 | typedef mat<2, 2, int64, mediump> mediump_i64mat2x2; | |
968 | typedef mat<2, 3, int64, mediump> mediump_i64mat2x3; | |
969 | typedef mat<2, 4, int64, mediump> mediump_i64mat2x4; | |
970 | typedef mat<3, 2, int64, mediump> mediump_i64mat3x2; | |
971 | typedef mat<3, 3, int64, mediump> mediump_i64mat3x3; | |
972 | typedef mat<3, 4, int64, mediump> mediump_i64mat3x4; | |
973 | typedef mat<4, 2, int64, mediump> mediump_i64mat4x2; | |
974 | typedef mat<4, 3, int64, mediump> mediump_i64mat4x3; | |
975 | typedef mat<4, 4, int64, mediump> mediump_i64mat4x4; | |
976 | ||
977 | typedef mat<2, 2, int64, highp> highp_i64mat2x2; | |
978 | typedef mat<2, 3, int64, highp> highp_i64mat2x3; | |
979 | typedef mat<2, 4, int64, highp> highp_i64mat2x4; | |
980 | typedef mat<3, 2, int64, highp> highp_i64mat3x2; | |
981 | typedef mat<3, 3, int64, highp> highp_i64mat3x3; | |
982 | typedef mat<3, 4, int64, highp> highp_i64mat3x4; | |
983 | typedef mat<4, 2, int64, highp> highp_i64mat4x2; | |
984 | typedef mat<4, 3, int64, highp> highp_i64mat4x3; | |
985 | typedef mat<4, 4, int64, highp> highp_i64mat4x4; | |
986 | ||
987 | typedef mat<2, 2, int64, defaultp> i64mat2x2; | |
988 | typedef mat<3, 2, int64, defaultp> i64mat3x2; | |
989 | typedef mat<4, 2, int64, defaultp> i64mat4x2; | |
990 | typedef mat<2, 3, int64, defaultp> i64mat2x3; | |
991 | typedef mat<3, 3, int64, defaultp> i64mat3x3; | |
992 | typedef mat<4, 3, int64, defaultp> i64mat4x3; | |
993 | typedef mat<2, 4, int64, defaultp> i64mat2x4; | |
994 | typedef mat<3, 4, int64, defaultp> i64mat3x4; | |
995 | typedef mat<4, 4, int64, defaultp> i64mat4x4; | |
996 | ||
997 | ||
998 | // Unsigned integer matrix MxN | |
999 | ||
1000 | typedef mat<2, 2, uint, lowp> lowp_umat2x2; | |
1001 | typedef mat<2, 3, uint, lowp> lowp_umat2x3; | |
1002 | typedef mat<2, 4, uint, lowp> lowp_umat2x4; | |
1003 | typedef mat<3, 2, uint, lowp> lowp_umat3x2; | |
1004 | typedef mat<3, 3, uint, lowp> lowp_umat3x3; | |
1005 | typedef mat<3, 4, uint, lowp> lowp_umat3x4; | |
1006 | typedef mat<4, 2, uint, lowp> lowp_umat4x2; | |
1007 | typedef mat<4, 3, uint, lowp> lowp_umat4x3; | |
1008 | typedef mat<4, 4, uint, lowp> lowp_umat4x4; | |
1009 | ||
1010 | typedef mat<2, 2, uint, mediump> mediump_umat2x2; | |
1011 | typedef mat<2, 3, uint, mediump> mediump_umat2x3; | |
1012 | typedef mat<2, 4, uint, mediump> mediump_umat2x4; | |
1013 | typedef mat<3, 2, uint, mediump> mediump_umat3x2; | |
1014 | typedef mat<3, 3, uint, mediump> mediump_umat3x3; | |
1015 | typedef mat<3, 4, uint, mediump> mediump_umat3x4; | |
1016 | typedef mat<4, 2, uint, mediump> mediump_umat4x2; | |
1017 | typedef mat<4, 3, uint, mediump> mediump_umat4x3; | |
1018 | typedef mat<4, 4, uint, mediump> mediump_umat4x4; | |
1019 | ||
1020 | typedef mat<2, 2, uint, highp> highp_umat2x2; | |
1021 | typedef mat<2, 3, uint, highp> highp_umat2x3; | |
1022 | typedef mat<2, 4, uint, highp> highp_umat2x4; | |
1023 | typedef mat<3, 2, uint, highp> highp_umat3x2; | |
1024 | typedef mat<3, 3, uint, highp> highp_umat3x3; | |
1025 | typedef mat<3, 4, uint, highp> highp_umat3x4; | |
1026 | typedef mat<4, 2, uint, highp> highp_umat4x2; | |
1027 | typedef mat<4, 3, uint, highp> highp_umat4x3; | |
1028 | typedef mat<4, 4, uint, highp> highp_umat4x4; | |
1029 | ||
1030 | typedef mat<2, 2, uint, defaultp> umat2x2; | |
1031 | typedef mat<3, 2, uint, defaultp> umat3x2; | |
1032 | typedef mat<4, 2, uint, defaultp> umat4x2; | |
1033 | typedef mat<2, 3, uint, defaultp> umat2x3; | |
1034 | typedef mat<3, 3, uint, defaultp> umat3x3; | |
1035 | typedef mat<4, 3, uint, defaultp> umat4x3; | |
1036 | typedef mat<2, 4, uint, defaultp> umat2x4; | |
1037 | typedef mat<3, 4, uint, defaultp> umat3x4; | |
1038 | typedef mat<4, 4, uint, defaultp> umat4x4; | |
1039 | ||
1040 | ||
1041 | typedef mat<2, 2, uint8, lowp> lowp_u8mat2x2; | |
1042 | typedef mat<2, 3, uint8, lowp> lowp_u8mat2x3; | |
1043 | typedef mat<2, 4, uint8, lowp> lowp_u8mat2x4; | |
1044 | typedef mat<3, 2, uint8, lowp> lowp_u8mat3x2; | |
1045 | typedef mat<3, 3, uint8, lowp> lowp_u8mat3x3; | |
1046 | typedef mat<3, 4, uint8, lowp> lowp_u8mat3x4; | |
1047 | typedef mat<4, 2, uint8, lowp> lowp_u8mat4x2; | |
1048 | typedef mat<4, 3, uint8, lowp> lowp_u8mat4x3; | |
1049 | typedef mat<4, 4, uint8, lowp> lowp_u8mat4x4; | |
1050 | ||
1051 | typedef mat<2, 2, uint8, mediump> mediump_u8mat2x2; | |
1052 | typedef mat<2, 3, uint8, mediump> mediump_u8mat2x3; | |
1053 | typedef mat<2, 4, uint8, mediump> mediump_u8mat2x4; | |
1054 | typedef mat<3, 2, uint8, mediump> mediump_u8mat3x2; | |
1055 | typedef mat<3, 3, uint8, mediump> mediump_u8mat3x3; | |
1056 | typedef mat<3, 4, uint8, mediump> mediump_u8mat3x4; | |
1057 | typedef mat<4, 2, uint8, mediump> mediump_u8mat4x2; | |
1058 | typedef mat<4, 3, uint8, mediump> mediump_u8mat4x3; | |
1059 | typedef mat<4, 4, uint8, mediump> mediump_u8mat4x4; | |
1060 | ||
1061 | typedef mat<2, 2, uint8, highp> highp_u8mat2x2; | |
1062 | typedef mat<2, 3, uint8, highp> highp_u8mat2x3; | |
1063 | typedef mat<2, 4, uint8, highp> highp_u8mat2x4; | |
1064 | typedef mat<3, 2, uint8, highp> highp_u8mat3x2; | |
1065 | typedef mat<3, 3, uint8, highp> highp_u8mat3x3; | |
1066 | typedef mat<3, 4, uint8, highp> highp_u8mat3x4; | |
1067 | typedef mat<4, 2, uint8, highp> highp_u8mat4x2; | |
1068 | typedef mat<4, 3, uint8, highp> highp_u8mat4x3; | |
1069 | typedef mat<4, 4, uint8, highp> highp_u8mat4x4; | |
1070 | ||
1071 | typedef mat<2, 2, uint8, defaultp> u8mat2x2; | |
1072 | typedef mat<3, 2, uint8, defaultp> u8mat3x2; | |
1073 | typedef mat<4, 2, uint8, defaultp> u8mat4x2; | |
1074 | typedef mat<2, 3, uint8, defaultp> u8mat2x3; | |
1075 | typedef mat<3, 3, uint8, defaultp> u8mat3x3; | |
1076 | typedef mat<4, 3, uint8, defaultp> u8mat4x3; | |
1077 | typedef mat<2, 4, uint8, defaultp> u8mat2x4; | |
1078 | typedef mat<3, 4, uint8, defaultp> u8mat3x4; | |
1079 | typedef mat<4, 4, uint8, defaultp> u8mat4x4; | |
1080 | ||
1081 | ||
1082 | typedef mat<2, 2, uint16, lowp> lowp_u16mat2x2; | |
1083 | typedef mat<2, 3, uint16, lowp> lowp_u16mat2x3; | |
1084 | typedef mat<2, 4, uint16, lowp> lowp_u16mat2x4; | |
1085 | typedef mat<3, 2, uint16, lowp> lowp_u16mat3x2; | |
1086 | typedef mat<3, 3, uint16, lowp> lowp_u16mat3x3; | |
1087 | typedef mat<3, 4, uint16, lowp> lowp_u16mat3x4; | |
1088 | typedef mat<4, 2, uint16, lowp> lowp_u16mat4x2; | |
1089 | typedef mat<4, 3, uint16, lowp> lowp_u16mat4x3; | |
1090 | typedef mat<4, 4, uint16, lowp> lowp_u16mat4x4; | |
1091 | ||
1092 | typedef mat<2, 2, uint16, mediump> mediump_u16mat2x2; | |
1093 | typedef mat<2, 3, uint16, mediump> mediump_u16mat2x3; | |
1094 | typedef mat<2, 4, uint16, mediump> mediump_u16mat2x4; | |
1095 | typedef mat<3, 2, uint16, mediump> mediump_u16mat3x2; | |
1096 | typedef mat<3, 3, uint16, mediump> mediump_u16mat3x3; | |
1097 | typedef mat<3, 4, uint16, mediump> mediump_u16mat3x4; | |
1098 | typedef mat<4, 2, uint16, mediump> mediump_u16mat4x2; | |
1099 | typedef mat<4, 3, uint16, mediump> mediump_u16mat4x3; | |
1100 | typedef mat<4, 4, uint16, mediump> mediump_u16mat4x4; | |
1101 | ||
1102 | typedef mat<2, 2, uint16, highp> highp_u16mat2x2; | |
1103 | typedef mat<2, 3, uint16, highp> highp_u16mat2x3; | |
1104 | typedef mat<2, 4, uint16, highp> highp_u16mat2x4; | |
1105 | typedef mat<3, 2, uint16, highp> highp_u16mat3x2; | |
1106 | typedef mat<3, 3, uint16, highp> highp_u16mat3x3; | |
1107 | typedef mat<3, 4, uint16, highp> highp_u16mat3x4; | |
1108 | typedef mat<4, 2, uint16, highp> highp_u16mat4x2; | |
1109 | typedef mat<4, 3, uint16, highp> highp_u16mat4x3; | |
1110 | typedef mat<4, 4, uint16, highp> highp_u16mat4x4; | |
1111 | ||
1112 | typedef mat<2, 2, uint16, defaultp> u16mat2x2; | |
1113 | typedef mat<3, 2, uint16, defaultp> u16mat3x2; | |
1114 | typedef mat<4, 2, uint16, defaultp> u16mat4x2; | |
1115 | typedef mat<2, 3, uint16, defaultp> u16mat2x3; | |
1116 | typedef mat<3, 3, uint16, defaultp> u16mat3x3; | |
1117 | typedef mat<4, 3, uint16, defaultp> u16mat4x3; | |
1118 | typedef mat<2, 4, uint16, defaultp> u16mat2x4; | |
1119 | typedef mat<3, 4, uint16, defaultp> u16mat3x4; | |
1120 | typedef mat<4, 4, uint16, defaultp> u16mat4x4; | |
1121 | ||
1122 | ||
1123 | typedef mat<2, 2, uint32, lowp> lowp_u32mat2x2; | |
1124 | typedef mat<2, 3, uint32, lowp> lowp_u32mat2x3; | |
1125 | typedef mat<2, 4, uint32, lowp> lowp_u32mat2x4; | |
1126 | typedef mat<3, 2, uint32, lowp> lowp_u32mat3x2; | |
1127 | typedef mat<3, 3, uint32, lowp> lowp_u32mat3x3; | |
1128 | typedef mat<3, 4, uint32, lowp> lowp_u32mat3x4; | |
1129 | typedef mat<4, 2, uint32, lowp> lowp_u32mat4x2; | |
1130 | typedef mat<4, 3, uint32, lowp> lowp_u32mat4x3; | |
1131 | typedef mat<4, 4, uint32, lowp> lowp_u32mat4x4; | |
1132 | ||
1133 | typedef mat<2, 2, uint32, mediump> mediump_u32mat2x2; | |
1134 | typedef mat<2, 3, uint32, mediump> mediump_u32mat2x3; | |
1135 | typedef mat<2, 4, uint32, mediump> mediump_u32mat2x4; | |
1136 | typedef mat<3, 2, uint32, mediump> mediump_u32mat3x2; | |
1137 | typedef mat<3, 3, uint32, mediump> mediump_u32mat3x3; | |
1138 | typedef mat<3, 4, uint32, mediump> mediump_u32mat3x4; | |
1139 | typedef mat<4, 2, uint32, mediump> mediump_u32mat4x2; | |
1140 | typedef mat<4, 3, uint32, mediump> mediump_u32mat4x3; | |
1141 | typedef mat<4, 4, uint32, mediump> mediump_u32mat4x4; | |
1142 | ||
1143 | typedef mat<2, 2, uint32, highp> highp_u32mat2x2; | |
1144 | typedef mat<2, 3, uint32, highp> highp_u32mat2x3; | |
1145 | typedef mat<2, 4, uint32, highp> highp_u32mat2x4; | |
1146 | typedef mat<3, 2, uint32, highp> highp_u32mat3x2; | |
1147 | typedef mat<3, 3, uint32, highp> highp_u32mat3x3; | |
1148 | typedef mat<3, 4, uint32, highp> highp_u32mat3x4; | |
1149 | typedef mat<4, 2, uint32, highp> highp_u32mat4x2; | |
1150 | typedef mat<4, 3, uint32, highp> highp_u32mat4x3; | |
1151 | typedef mat<4, 4, uint32, highp> highp_u32mat4x4; | |
1152 | ||
1153 | typedef mat<2, 2, uint32, defaultp> u32mat2x2; | |
1154 | typedef mat<3, 2, uint32, defaultp> u32mat3x2; | |
1155 | typedef mat<4, 2, uint32, defaultp> u32mat4x2; | |
1156 | typedef mat<2, 3, uint32, defaultp> u32mat2x3; | |
1157 | typedef mat<3, 3, uint32, defaultp> u32mat3x3; | |
1158 | typedef mat<4, 3, uint32, defaultp> u32mat4x3; | |
1159 | typedef mat<2, 4, uint32, defaultp> u32mat2x4; | |
1160 | typedef mat<3, 4, uint32, defaultp> u32mat3x4; | |
1161 | typedef mat<4, 4, uint32, defaultp> u32mat4x4; | |
1162 | ||
1163 | ||
1164 | typedef mat<2, 2, uint64, lowp> lowp_u64mat2x2; | |
1165 | typedef mat<2, 3, uint64, lowp> lowp_u64mat2x3; | |
1166 | typedef mat<2, 4, uint64, lowp> lowp_u64mat2x4; | |
1167 | typedef mat<3, 2, uint64, lowp> lowp_u64mat3x2; | |
1168 | typedef mat<3, 3, uint64, lowp> lowp_u64mat3x3; | |
1169 | typedef mat<3, 4, uint64, lowp> lowp_u64mat3x4; | |
1170 | typedef mat<4, 2, uint64, lowp> lowp_u64mat4x2; | |
1171 | typedef mat<4, 3, uint64, lowp> lowp_u64mat4x3; | |
1172 | typedef mat<4, 4, uint64, lowp> lowp_u64mat4x4; | |
1173 | ||
1174 | typedef mat<2, 2, uint64, mediump> mediump_u64mat2x2; | |
1175 | typedef mat<2, 3, uint64, mediump> mediump_u64mat2x3; | |
1176 | typedef mat<2, 4, uint64, mediump> mediump_u64mat2x4; | |
1177 | typedef mat<3, 2, uint64, mediump> mediump_u64mat3x2; | |
1178 | typedef mat<3, 3, uint64, mediump> mediump_u64mat3x3; | |
1179 | typedef mat<3, 4, uint64, mediump> mediump_u64mat3x4; | |
1180 | typedef mat<4, 2, uint64, mediump> mediump_u64mat4x2; | |
1181 | typedef mat<4, 3, uint64, mediump> mediump_u64mat4x3; | |
1182 | typedef mat<4, 4, uint64, mediump> mediump_u64mat4x4; | |
1183 | ||
1184 | typedef mat<2, 2, uint64, highp> highp_u64mat2x2; | |
1185 | typedef mat<2, 3, uint64, highp> highp_u64mat2x3; | |
1186 | typedef mat<2, 4, uint64, highp> highp_u64mat2x4; | |
1187 | typedef mat<3, 2, uint64, highp> highp_u64mat3x2; | |
1188 | typedef mat<3, 3, uint64, highp> highp_u64mat3x3; | |
1189 | typedef mat<3, 4, uint64, highp> highp_u64mat3x4; | |
1190 | typedef mat<4, 2, uint64, highp> highp_u64mat4x2; | |
1191 | typedef mat<4, 3, uint64, highp> highp_u64mat4x3; | |
1192 | typedef mat<4, 4, uint64, highp> highp_u64mat4x4; | |
1193 | ||
1194 | typedef mat<2, 2, uint64, defaultp> u64mat2x2; | |
1195 | typedef mat<3, 2, uint64, defaultp> u64mat3x2; | |
1196 | typedef mat<4, 2, uint64, defaultp> u64mat4x2; | |
1197 | typedef mat<2, 3, uint64, defaultp> u64mat2x3; | |
1198 | typedef mat<3, 3, uint64, defaultp> u64mat3x3; | |
1199 | typedef mat<4, 3, uint64, defaultp> u64mat4x3; | |
1200 | typedef mat<2, 4, uint64, defaultp> u64mat2x4; | |
1201 | typedef mat<3, 4, uint64, defaultp> u64mat3x4; | |
1202 | typedef mat<4, 4, uint64, defaultp> u64mat4x4; | |
1203 | ||
789 | 1204 | // Quaternion |
790 | 1205 | |
791 | 1206 | typedef qua<float, lowp> lowp_quat; |
328 | 328 | /// @see gtc_matrix_integer |
329 | 329 | typedef mat<4, 4, uint, lowp> lowp_umat4x4; |
330 | 330 | |
331 | #if(defined(GLM_PRECISION_HIGHP_INT)) | |
332 | typedef highp_imat2 imat2; | |
333 | typedef highp_imat3 imat3; | |
334 | typedef highp_imat4 imat4; | |
335 | typedef highp_imat2x2 imat2x2; | |
336 | typedef highp_imat2x3 imat2x3; | |
337 | typedef highp_imat2x4 imat2x4; | |
338 | typedef highp_imat3x2 imat3x2; | |
339 | typedef highp_imat3x3 imat3x3; | |
340 | typedef highp_imat3x4 imat3x4; | |
341 | typedef highp_imat4x2 imat4x2; | |
342 | typedef highp_imat4x3 imat4x3; | |
343 | typedef highp_imat4x4 imat4x4; | |
344 | #elif(defined(GLM_PRECISION_LOWP_INT)) | |
345 | typedef lowp_imat2 imat2; | |
346 | typedef lowp_imat3 imat3; | |
347 | typedef lowp_imat4 imat4; | |
348 | typedef lowp_imat2x2 imat2x2; | |
349 | typedef lowp_imat2x3 imat2x3; | |
350 | typedef lowp_imat2x4 imat2x4; | |
351 | typedef lowp_imat3x2 imat3x2; | |
352 | typedef lowp_imat3x3 imat3x3; | |
353 | typedef lowp_imat3x4 imat3x4; | |
354 | typedef lowp_imat4x2 imat4x2; | |
355 | typedef lowp_imat4x3 imat4x3; | |
356 | typedef lowp_imat4x4 imat4x4; | |
357 | #else //if(defined(GLM_PRECISION_MEDIUMP_INT)) | |
331 | ||
358 | 332 | |
359 | 333 | /// Signed integer 2x2 matrix. |
360 | 334 | /// @see gtc_matrix_integer |
361 | typedef mediump_imat2 imat2; | |
335 | typedef mat<2, 2, int, defaultp> imat2; | |
362 | 336 | |
363 | 337 | /// Signed integer 3x3 matrix. |
364 | 338 | /// @see gtc_matrix_integer |
365 | typedef mediump_imat3 imat3; | |
339 | typedef mat<3, 3, int, defaultp> imat3; | |
366 | 340 | |
367 | 341 | /// Signed integer 4x4 matrix. |
368 | 342 | /// @see gtc_matrix_integer |
369 | typedef mediump_imat4 imat4; | |
343 | typedef mat<4, 4, int, defaultp> imat4; | |
370 | 344 | |
371 | 345 | /// Signed integer 2x2 matrix. |
372 | 346 | /// @see gtc_matrix_integer |
373 | typedef mediump_imat2x2 imat2x2; | |
347 | typedef mat<2, 2, int, defaultp> imat2x2; | |
374 | 348 | |
375 | 349 | /// Signed integer 2x3 matrix. |
376 | 350 | /// @see gtc_matrix_integer |
377 | typedef mediump_imat2x3 imat2x3; | |
351 | typedef mat<2, 3, int, defaultp> imat2x3; | |
378 | 352 | |
379 | 353 | /// Signed integer 2x4 matrix. |
380 | 354 | /// @see gtc_matrix_integer |
381 | typedef mediump_imat2x4 imat2x4; | |
355 | typedef mat<2, 4, int, defaultp> imat2x4; | |
382 | 356 | |
383 | 357 | /// Signed integer 3x2 matrix. |
384 | 358 | /// @see gtc_matrix_integer |
385 | typedef mediump_imat3x2 imat3x2; | |
359 | typedef mat<3, 2, int, defaultp> imat3x2; | |
386 | 360 | |
387 | 361 | /// Signed integer 3x3 matrix. |
388 | 362 | /// @see gtc_matrix_integer |
389 | typedef mediump_imat3x3 imat3x3; | |
363 | typedef mat<3, 3, int, defaultp> imat3x3; | |
390 | 364 | |
391 | 365 | /// Signed integer 3x4 matrix. |
392 | 366 | /// @see gtc_matrix_integer |
393 | typedef mediump_imat3x4 imat3x4; | |
367 | typedef mat<3, 4, int, defaultp> imat3x4; | |
394 | 368 | |
395 | 369 | /// Signed integer 4x2 matrix. |
396 | 370 | /// @see gtc_matrix_integer |
397 | typedef mediump_imat4x2 imat4x2; | |
371 | typedef mat<4, 2, int, defaultp> imat4x2; | |
398 | 372 | |
399 | 373 | /// Signed integer 4x3 matrix. |
400 | 374 | /// @see gtc_matrix_integer |
401 | typedef mediump_imat4x3 imat4x3; | |
375 | typedef mat<4, 3, int, defaultp> imat4x3; | |
402 | 376 | |
403 | 377 | /// Signed integer 4x4 matrix. |
404 | 378 | /// @see gtc_matrix_integer |
405 | typedef mediump_imat4x4 imat4x4; | |
406 | #endif//GLM_PRECISION | |
407 | ||
408 | #if(defined(GLM_PRECISION_HIGHP_UINT)) | |
409 | typedef highp_umat2 umat2; | |
410 | typedef highp_umat3 umat3; | |
411 | typedef highp_umat4 umat4; | |
412 | typedef highp_umat2x2 umat2x2; | |
413 | typedef highp_umat2x3 umat2x3; | |
414 | typedef highp_umat2x4 umat2x4; | |
415 | typedef highp_umat3x2 umat3x2; | |
416 | typedef highp_umat3x3 umat3x3; | |
417 | typedef highp_umat3x4 umat3x4; | |
418 | typedef highp_umat4x2 umat4x2; | |
419 | typedef highp_umat4x3 umat4x3; | |
420 | typedef highp_umat4x4 umat4x4; | |
421 | #elif(defined(GLM_PRECISION_LOWP_UINT)) | |
422 | typedef lowp_umat2 umat2; | |
423 | typedef lowp_umat3 umat3; | |
424 | typedef lowp_umat4 umat4; | |
425 | typedef lowp_umat2x2 umat2x2; | |
426 | typedef lowp_umat2x3 umat2x3; | |
427 | typedef lowp_umat2x4 umat2x4; | |
428 | typedef lowp_umat3x2 umat3x2; | |
429 | typedef lowp_umat3x3 umat3x3; | |
430 | typedef lowp_umat3x4 umat3x4; | |
431 | typedef lowp_umat4x2 umat4x2; | |
432 | typedef lowp_umat4x3 umat4x3; | |
433 | typedef lowp_umat4x4 umat4x4; | |
434 | #else //if(defined(GLM_PRECISION_MEDIUMP_UINT)) | |
379 | typedef mat<4, 4, int, defaultp> imat4x4; | |
380 | ||
381 | ||
435 | 382 | |
436 | 383 | /// Unsigned integer 2x2 matrix. |
437 | 384 | /// @see gtc_matrix_integer |
438 | typedef mediump_umat2 umat2; | |
385 | typedef mat<2, 2, uint, defaultp> umat2; | |
439 | 386 | |
440 | 387 | /// Unsigned integer 3x3 matrix. |
441 | 388 | /// @see gtc_matrix_integer |
442 | typedef mediump_umat3 umat3; | |
389 | typedef mat<3, 3, uint, defaultp> umat3; | |
443 | 390 | |
444 | 391 | /// Unsigned integer 4x4 matrix. |
445 | 392 | /// @see gtc_matrix_integer |
446 | typedef mediump_umat4 umat4; | |
393 | typedef mat<4, 4, uint, defaultp> umat4; | |
447 | 394 | |
448 | 395 | /// Unsigned integer 2x2 matrix. |
449 | 396 | /// @see gtc_matrix_integer |
450 | typedef mediump_umat2x2 umat2x2; | |
397 | typedef mat<2, 2, uint, defaultp> umat2x2; | |
451 | 398 | |
452 | 399 | /// Unsigned integer 2x3 matrix. |
453 | 400 | /// @see gtc_matrix_integer |
454 | typedef mediump_umat2x3 umat2x3; | |
401 | typedef mat<2, 3, uint, defaultp> umat2x3; | |
455 | 402 | |
456 | 403 | /// Unsigned integer 2x4 matrix. |
457 | 404 | /// @see gtc_matrix_integer |
458 | typedef mediump_umat2x4 umat2x4; | |
405 | typedef mat<2, 4, uint, defaultp> umat2x4; | |
459 | 406 | |
460 | 407 | /// Unsigned integer 3x2 matrix. |
461 | 408 | /// @see gtc_matrix_integer |
462 | typedef mediump_umat3x2 umat3x2; | |
409 | typedef mat<3, 2, uint, defaultp> umat3x2; | |
463 | 410 | |
464 | 411 | /// Unsigned integer 3x3 matrix. |
465 | 412 | /// @see gtc_matrix_integer |
466 | typedef mediump_umat3x3 umat3x3; | |
413 | typedef mat<3, 3, uint, defaultp> umat3x3; | |
467 | 414 | |
468 | 415 | /// Unsigned integer 3x4 matrix. |
469 | 416 | /// @see gtc_matrix_integer |
470 | typedef mediump_umat3x4 umat3x4; | |
417 | typedef mat<3, 4, uint, defaultp> umat3x4; | |
471 | 418 | |
472 | 419 | /// Unsigned integer 4x2 matrix. |
473 | 420 | /// @see gtc_matrix_integer |
474 | typedef mediump_umat4x2 umat4x2; | |
421 | typedef mat<4, 2, uint, defaultp> umat4x2; | |
475 | 422 | |
476 | 423 | /// Unsigned integer 4x3 matrix. |
477 | 424 | /// @see gtc_matrix_integer |
478 | typedef mediump_umat4x3 umat4x3; | |
425 | typedef mat<4, 3, uint, defaultp> umat4x3; | |
479 | 426 | |
480 | 427 | /// Unsigned integer 4x4 matrix. |
481 | 428 | /// @see gtc_matrix_integer |
482 | typedef mediump_umat4x4 umat4x4; | |
483 | #endif//GLM_PRECISION | |
429 | typedef mat<4, 4, uint, defaultp> umat4x4; | |
484 | 430 | |
485 | 431 | /// @} |
486 | 432 | }//namespace glm |
14 | 14 | |
15 | 15 | // Dependency: |
16 | 16 | #include "type_precision.hpp" |
17 | #include "../ext/vector_packing.hpp" | |
17 | 18 | |
18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
19 | 20 | # pragma message("GLM: GLM_GTC_packing extension included") |
720 | 721 | /// @see int packUint2x16(u32vec2 const& v) |
721 | 722 | GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p); |
722 | 723 | |
723 | ||
724 | 724 | /// @} |
725 | 725 | }// namespace glm |
726 | 726 |
174 | 174 | mat<3, 3, T, Q> Result; |
175 | 175 | |
176 | 176 | Result[2] = -direction; |
177 | Result[0] = normalize(cross(up, Result[2])); | |
177 | vec<3, T, Q> const& Right = cross(up, Result[2]); | |
178 | Result[0] = Right * inversesqrt(max(static_cast<T>(0.00001), dot(Right, Right))); | |
178 | 179 | Result[1] = cross(Result[2], Result[0]); |
179 | 180 | |
180 | 181 | return quat_cast(Result); |
186 | 187 | mat<3, 3, T, Q> Result; |
187 | 188 | |
188 | 189 | Result[2] = direction; |
189 | Result[0] = normalize(cross(up, Result[2])); | |
190 | vec<3, T, Q> const& Right = cross(up, Result[2]); | |
191 | Result[0] = Right * inversesqrt(max(static_cast<T>(0.00001), dot(Right, Right))); | |
190 | 192 | Result[1] = cross(Result[2], Result[0]); |
191 | 193 | |
192 | 194 | return quat_cast(Result); |
15 | 15 | // Dependency: |
16 | 16 | #include "../gtc/quaternion.hpp" |
17 | 17 | #include "../gtc/vec1.hpp" |
18 | #include "../ext/vector_int1_sized.hpp" | |
19 | #include "../ext/vector_int2_sized.hpp" | |
20 | #include "../ext/vector_int3_sized.hpp" | |
21 | #include "../ext/vector_int4_sized.hpp" | |
18 | 22 | #include "../ext/scalar_int_sized.hpp" |
23 | #include "../ext/vector_uint1_sized.hpp" | |
24 | #include "../ext/vector_uint2_sized.hpp" | |
25 | #include "../ext/vector_uint3_sized.hpp" | |
26 | #include "../ext/vector_uint4_sized.hpp" | |
19 | 27 | #include "../ext/scalar_uint_sized.hpp" |
20 | 28 | #include "../detail/type_vec2.hpp" |
21 | 29 | #include "../detail/type_vec3.hpp" |
226 | 234 | /// @see gtc_type_precision |
227 | 235 | typedef detail::int64 i64; |
228 | 236 | |
229 | ||
230 | ||
231 | /// Low qualifier 8 bit signed integer scalar type. | |
232 | /// @see gtc_type_precision | |
233 | typedef vec<1, i8, lowp> lowp_i8vec1; | |
234 | ||
235 | /// Low qualifier 8 bit signed integer vector of 2 components type. | |
236 | /// @see gtc_type_precision | |
237 | typedef vec<2, i8, lowp> lowp_i8vec2; | |
238 | ||
239 | /// Low qualifier 8 bit signed integer vector of 3 components type. | |
240 | /// @see gtc_type_precision | |
241 | typedef vec<3, i8, lowp> lowp_i8vec3; | |
242 | ||
243 | /// Low qualifier 8 bit signed integer vector of 4 components type. | |
244 | /// @see gtc_type_precision | |
245 | typedef vec<4, i8, lowp> lowp_i8vec4; | |
246 | ||
247 | ||
248 | /// Medium qualifier 8 bit signed integer scalar type. | |
249 | /// @see gtc_type_precision | |
250 | typedef vec<1, i8, mediump> mediump_i8vec1; | |
251 | ||
252 | /// Medium qualifier 8 bit signed integer vector of 2 components type. | |
253 | /// @see gtc_type_precision | |
254 | typedef vec<2, i8, mediump> mediump_i8vec2; | |
255 | ||
256 | /// Medium qualifier 8 bit signed integer vector of 3 components type. | |
257 | /// @see gtc_type_precision | |
258 | typedef vec<3, i8, mediump> mediump_i8vec3; | |
259 | ||
260 | /// Medium qualifier 8 bit signed integer vector of 4 components type. | |
261 | /// @see gtc_type_precision | |
262 | typedef vec<4, i8, mediump> mediump_i8vec4; | |
263 | ||
264 | ||
265 | /// High qualifier 8 bit signed integer scalar type. | |
266 | /// @see gtc_type_precision | |
267 | typedef vec<1, i8, highp> highp_i8vec1; | |
268 | ||
269 | /// High qualifier 8 bit signed integer vector of 2 components type. | |
270 | /// @see gtc_type_precision | |
271 | typedef vec<2, i8, highp> highp_i8vec2; | |
272 | ||
273 | /// High qualifier 8 bit signed integer vector of 3 components type. | |
274 | /// @see gtc_type_precision | |
275 | typedef vec<3, i8, highp> highp_i8vec3; | |
276 | ||
277 | /// High qualifier 8 bit signed integer vector of 4 components type. | |
278 | /// @see gtc_type_precision | |
279 | typedef vec<4, i8, highp> highp_i8vec4; | |
280 | ||
281 | ||
282 | ||
283 | /// 8 bit signed integer scalar type. | |
284 | /// @see gtc_type_precision | |
285 | typedef vec<1, i8, defaultp> i8vec1; | |
286 | ||
287 | /// 8 bit signed integer vector of 2 components type. | |
288 | /// @see gtc_type_precision | |
289 | typedef vec<2, i8, defaultp> i8vec2; | |
290 | ||
291 | /// 8 bit signed integer vector of 3 components type. | |
292 | /// @see gtc_type_precision | |
293 | typedef vec<3, i8, defaultp> i8vec3; | |
294 | ||
295 | /// 8 bit signed integer vector of 4 components type. | |
296 | /// @see gtc_type_precision | |
297 | typedef vec<4, i8, defaultp> i8vec4; | |
298 | ||
299 | ||
300 | ||
301 | ||
302 | ||
303 | /// Low qualifier 16 bit signed integer scalar type. | |
304 | /// @see gtc_type_precision | |
305 | typedef vec<1, i16, lowp> lowp_i16vec1; | |
306 | ||
307 | /// Low qualifier 16 bit signed integer vector of 2 components type. | |
308 | /// @see gtc_type_precision | |
309 | typedef vec<2, i16, lowp> lowp_i16vec2; | |
310 | ||
311 | /// Low qualifier 16 bit signed integer vector of 3 components type. | |
312 | /// @see gtc_type_precision | |
313 | typedef vec<3, i16, lowp> lowp_i16vec3; | |
314 | ||
315 | /// Low qualifier 16 bit signed integer vector of 4 components type. | |
316 | /// @see gtc_type_precision | |
317 | typedef vec<4, i16, lowp> lowp_i16vec4; | |
318 | ||
319 | ||
320 | /// Medium qualifier 16 bit signed integer scalar type. | |
321 | /// @see gtc_type_precision | |
322 | typedef vec<1, i16, mediump> mediump_i16vec1; | |
323 | ||
324 | /// Medium qualifier 16 bit signed integer vector of 2 components type. | |
325 | /// @see gtc_type_precision | |
326 | typedef vec<2, i16, mediump> mediump_i16vec2; | |
327 | ||
328 | /// Medium qualifier 16 bit signed integer vector of 3 components type. | |
329 | /// @see gtc_type_precision | |
330 | typedef vec<3, i16, mediump> mediump_i16vec3; | |
331 | ||
332 | /// Medium qualifier 16 bit signed integer vector of 4 components type. | |
333 | /// @see gtc_type_precision | |
334 | typedef vec<4, i16, mediump> mediump_i16vec4; | |
335 | ||
336 | ||
337 | /// High qualifier 16 bit signed integer scalar type. | |
338 | /// @see gtc_type_precision | |
339 | typedef vec<1, i16, highp> highp_i16vec1; | |
340 | ||
341 | /// High qualifier 16 bit signed integer vector of 2 components type. | |
342 | /// @see gtc_type_precision | |
343 | typedef vec<2, i16, highp> highp_i16vec2; | |
344 | ||
345 | /// High qualifier 16 bit signed integer vector of 3 components type. | |
346 | /// @see gtc_type_precision | |
347 | typedef vec<3, i16, highp> highp_i16vec3; | |
348 | ||
349 | /// High qualifier 16 bit signed integer vector of 4 components type. | |
350 | /// @see gtc_type_precision | |
351 | typedef vec<4, i16, highp> highp_i16vec4; | |
352 | ||
353 | ||
354 | ||
355 | ||
356 | /// 16 bit signed integer scalar type. | |
357 | /// @see gtc_type_precision | |
358 | typedef vec<1, i16, defaultp> i16vec1; | |
359 | ||
360 | /// 16 bit signed integer vector of 2 components type. | |
361 | /// @see gtc_type_precision | |
362 | typedef vec<2, i16, defaultp> i16vec2; | |
363 | ||
364 | /// 16 bit signed integer vector of 3 components type. | |
365 | /// @see gtc_type_precision | |
366 | typedef vec<3, i16, defaultp> i16vec3; | |
367 | ||
368 | /// 16 bit signed integer vector of 4 components type. | |
369 | /// @see gtc_type_precision | |
370 | typedef vec<4, i16, defaultp> i16vec4; | |
371 | ||
372 | ||
373 | ||
374 | /// Low qualifier 32 bit signed integer scalar type. | |
375 | /// @see gtc_type_precision | |
376 | typedef vec<1, i32, lowp> lowp_i32vec1; | |
377 | ||
378 | /// Low qualifier 32 bit signed integer vector of 2 components type. | |
379 | /// @see gtc_type_precision | |
380 | typedef vec<2, i32, lowp> lowp_i32vec2; | |
381 | ||
382 | /// Low qualifier 32 bit signed integer vector of 3 components type. | |
383 | /// @see gtc_type_precision | |
384 | typedef vec<3, i32, lowp> lowp_i32vec3; | |
385 | ||
386 | /// Low qualifier 32 bit signed integer vector of 4 components type. | |
387 | /// @see gtc_type_precision | |
388 | typedef vec<4, i32, lowp> lowp_i32vec4; | |
389 | ||
390 | ||
391 | /// Medium qualifier 32 bit signed integer scalar type. | |
392 | /// @see gtc_type_precision | |
393 | typedef vec<1, i32, mediump> mediump_i32vec1; | |
394 | ||
395 | /// Medium qualifier 32 bit signed integer vector of 2 components type. | |
396 | /// @see gtc_type_precision | |
397 | typedef vec<2, i32, mediump> mediump_i32vec2; | |
398 | ||
399 | /// Medium qualifier 32 bit signed integer vector of 3 components type. | |
400 | /// @see gtc_type_precision | |
401 | typedef vec<3, i32, mediump> mediump_i32vec3; | |
402 | ||
403 | /// Medium qualifier 32 bit signed integer vector of 4 components type. | |
404 | /// @see gtc_type_precision | |
405 | typedef vec<4, i32, mediump> mediump_i32vec4; | |
406 | ||
407 | ||
408 | /// High qualifier 32 bit signed integer scalar type. | |
409 | /// @see gtc_type_precision | |
410 | typedef vec<1, i32, highp> highp_i32vec1; | |
411 | ||
412 | /// High qualifier 32 bit signed integer vector of 2 components type. | |
413 | /// @see gtc_type_precision | |
414 | typedef vec<2, i32, highp> highp_i32vec2; | |
415 | ||
416 | /// High qualifier 32 bit signed integer vector of 3 components type. | |
417 | /// @see gtc_type_precision | |
418 | typedef vec<3, i32, highp> highp_i32vec3; | |
419 | ||
420 | /// High qualifier 32 bit signed integer vector of 4 components type. | |
421 | /// @see gtc_type_precision | |
422 | typedef vec<4, i32, highp> highp_i32vec4; | |
423 | ||
424 | ||
425 | /// 32 bit signed integer scalar type. | |
426 | /// @see gtc_type_precision | |
427 | typedef vec<1, i32, defaultp> i32vec1; | |
428 | ||
429 | /// 32 bit signed integer vector of 2 components type. | |
430 | /// @see gtc_type_precision | |
431 | typedef vec<2, i32, defaultp> i32vec2; | |
432 | ||
433 | /// 32 bit signed integer vector of 3 components type. | |
434 | /// @see gtc_type_precision | |
435 | typedef vec<3, i32, defaultp> i32vec3; | |
436 | ||
437 | /// 32 bit signed integer vector of 4 components type. | |
438 | /// @see gtc_type_precision | |
439 | typedef vec<4, i32, defaultp> i32vec4; | |
440 | ||
441 | ||
442 | ||
443 | ||
444 | /// Low qualifier 64 bit signed integer scalar type. | |
445 | /// @see gtc_type_precision | |
446 | typedef vec<1, i64, lowp> lowp_i64vec1; | |
447 | ||
448 | /// Low qualifier 64 bit signed integer vector of 2 components type. | |
449 | /// @see gtc_type_precision | |
450 | typedef vec<2, i64, lowp> lowp_i64vec2; | |
451 | ||
452 | /// Low qualifier 64 bit signed integer vector of 3 components type. | |
453 | /// @see gtc_type_precision | |
454 | typedef vec<3, i64, lowp> lowp_i64vec3; | |
455 | ||
456 | /// Low qualifier 64 bit signed integer vector of 4 components type. | |
457 | /// @see gtc_type_precision | |
458 | typedef vec<4, i64, lowp> lowp_i64vec4; | |
459 | ||
460 | ||
461 | /// Medium qualifier 64 bit signed integer scalar type. | |
462 | /// @see gtc_type_precision | |
463 | typedef vec<1, i64, mediump> mediump_i64vec1; | |
464 | ||
465 | /// Medium qualifier 64 bit signed integer vector of 2 components type. | |
466 | /// @see gtc_type_precision | |
467 | typedef vec<2, i64, mediump> mediump_i64vec2; | |
468 | ||
469 | /// Medium qualifier 64 bit signed integer vector of 3 components type. | |
470 | /// @see gtc_type_precision | |
471 | typedef vec<3, i64, mediump> mediump_i64vec3; | |
472 | ||
473 | /// Medium qualifier 64 bit signed integer vector of 4 components type. | |
474 | /// @see gtc_type_precision | |
475 | typedef vec<4, i64, mediump> mediump_i64vec4; | |
476 | ||
477 | ||
478 | /// High qualifier 64 bit signed integer scalar type. | |
479 | /// @see gtc_type_precision | |
480 | typedef vec<1, i64, highp> highp_i64vec1; | |
481 | ||
482 | /// High qualifier 64 bit signed integer vector of 2 components type. | |
483 | /// @see gtc_type_precision | |
484 | typedef vec<2, i64, highp> highp_i64vec2; | |
485 | ||
486 | /// High qualifier 64 bit signed integer vector of 3 components type. | |
487 | /// @see gtc_type_precision | |
488 | typedef vec<3, i64, highp> highp_i64vec3; | |
489 | ||
490 | /// High qualifier 64 bit signed integer vector of 4 components type. | |
491 | /// @see gtc_type_precision | |
492 | typedef vec<4, i64, highp> highp_i64vec4; | |
493 | ||
494 | ||
495 | /// 64 bit signed integer scalar type. | |
496 | /// @see gtc_type_precision | |
497 | typedef vec<1, i64, defaultp> i64vec1; | |
498 | ||
499 | /// 64 bit signed integer vector of 2 components type. | |
500 | /// @see gtc_type_precision | |
501 | typedef vec<2, i64, defaultp> i64vec2; | |
502 | ||
503 | /// 64 bit signed integer vector of 3 components type. | |
504 | /// @see gtc_type_precision | |
505 | typedef vec<3, i64, defaultp> i64vec3; | |
506 | ||
507 | /// 64 bit signed integer vector of 4 components type. | |
508 | /// @see gtc_type_precision | |
509 | typedef vec<4, i64, defaultp> i64vec4; | |
510 | ||
511 | ||
512 | 237 | ///////////////////////////// |
513 | 238 | // Unsigned int vector types |
514 | 239 | |
1553 | 1278 | typedef highp_f64mat4x4 highp_f64mat4; |
1554 | 1279 | |
1555 | 1280 | |
1281 | ///////////////////////////// | |
1282 | // Signed int vector types | |
1283 | ||
1284 | /// Low qualifier signed integer vector of 1 component type. | |
1285 | /// @see gtc_type_precision | |
1286 | typedef vec<1, int, lowp> lowp_ivec1; | |
1287 | ||
1288 | /// Low qualifier signed integer vector of 2 components type. | |
1289 | /// @see gtc_type_precision | |
1290 | typedef vec<2, int, lowp> lowp_ivec2; | |
1291 | ||
1292 | /// Low qualifier signed integer vector of 3 components type. | |
1293 | /// @see gtc_type_precision | |
1294 | typedef vec<3, int, lowp> lowp_ivec3; | |
1295 | ||
1296 | /// Low qualifier signed integer vector of 4 components type. | |
1297 | /// @see gtc_type_precision | |
1298 | typedef vec<4, int, lowp> lowp_ivec4; | |
1299 | ||
1300 | ||
1301 | /// Medium qualifier signed integer vector of 1 component type. | |
1302 | /// @see gtc_type_precision | |
1303 | typedef vec<1, int, mediump> mediump_ivec1; | |
1304 | ||
1305 | /// Medium qualifier signed integer vector of 2 components type. | |
1306 | /// @see gtc_type_precision | |
1307 | typedef vec<2, int, mediump> mediump_ivec2; | |
1308 | ||
1309 | /// Medium qualifier signed integer vector of 3 components type. | |
1310 | /// @see gtc_type_precision | |
1311 | typedef vec<3, int, mediump> mediump_ivec3; | |
1312 | ||
1313 | /// Medium qualifier signed integer vector of 4 components type. | |
1314 | /// @see gtc_type_precision | |
1315 | typedef vec<4, int, mediump> mediump_ivec4; | |
1316 | ||
1317 | ||
1318 | /// High qualifier signed integer vector of 1 component type. | |
1319 | /// @see gtc_type_precision | |
1320 | typedef vec<1, int, highp> highp_ivec1; | |
1321 | ||
1322 | /// High qualifier signed integer vector of 2 components type. | |
1323 | /// @see gtc_type_precision | |
1324 | typedef vec<2, int, highp> highp_ivec2; | |
1325 | ||
1326 | /// High qualifier signed integer vector of 3 components type. | |
1327 | /// @see gtc_type_precision | |
1328 | typedef vec<3, int, highp> highp_ivec3; | |
1329 | ||
1330 | /// High qualifier signed integer vector of 4 components type. | |
1331 | /// @see gtc_type_precision | |
1332 | typedef vec<4, int, highp> highp_ivec4; | |
1333 | ||
1334 | ||
1335 | /// Low qualifier 8 bit signed integer vector of 1 component type. | |
1336 | /// @see gtc_type_precision | |
1337 | typedef vec<1, i8, lowp> lowp_i8vec1; | |
1338 | ||
1339 | /// Low qualifier 8 bit signed integer vector of 2 components type. | |
1340 | /// @see gtc_type_precision | |
1341 | typedef vec<2, i8, lowp> lowp_i8vec2; | |
1342 | ||
1343 | /// Low qualifier 8 bit signed integer vector of 3 components type. | |
1344 | /// @see gtc_type_precision | |
1345 | typedef vec<3, i8, lowp> lowp_i8vec3; | |
1346 | ||
1347 | /// Low qualifier 8 bit signed integer vector of 4 components type. | |
1348 | /// @see gtc_type_precision | |
1349 | typedef vec<4, i8, lowp> lowp_i8vec4; | |
1350 | ||
1351 | ||
1352 | /// Medium qualifier 8 bit signed integer scalar type. | |
1353 | /// @see gtc_type_precision | |
1354 | typedef vec<1, i8, mediump> mediump_i8vec1; | |
1355 | ||
1356 | /// Medium qualifier 8 bit signed integer vector of 2 components type. | |
1357 | /// @see gtc_type_precision | |
1358 | typedef vec<2, i8, mediump> mediump_i8vec2; | |
1359 | ||
1360 | /// Medium qualifier 8 bit signed integer vector of 3 components type. | |
1361 | /// @see gtc_type_precision | |
1362 | typedef vec<3, i8, mediump> mediump_i8vec3; | |
1363 | ||
1364 | /// Medium qualifier 8 bit signed integer vector of 4 components type. | |
1365 | /// @see gtc_type_precision | |
1366 | typedef vec<4, i8, mediump> mediump_i8vec4; | |
1367 | ||
1368 | ||
1369 | /// High qualifier 8 bit signed integer scalar type. | |
1370 | /// @see gtc_type_precision | |
1371 | typedef vec<1, i8, highp> highp_i8vec1; | |
1372 | ||
1373 | /// High qualifier 8 bit signed integer vector of 2 components type. | |
1374 | /// @see gtc_type_precision | |
1375 | typedef vec<2, i8, highp> highp_i8vec2; | |
1376 | ||
1377 | /// High qualifier 8 bit signed integer vector of 3 components type. | |
1378 | /// @see gtc_type_precision | |
1379 | typedef vec<3, i8, highp> highp_i8vec3; | |
1380 | ||
1381 | /// High qualifier 8 bit signed integer vector of 4 components type. | |
1382 | /// @see gtc_type_precision | |
1383 | typedef vec<4, i8, highp> highp_i8vec4; | |
1384 | ||
1385 | ||
1386 | /// Low qualifier 16 bit signed integer scalar type. | |
1387 | /// @see gtc_type_precision | |
1388 | typedef vec<1, i16, lowp> lowp_i16vec1; | |
1389 | ||
1390 | /// Low qualifier 16 bit signed integer vector of 2 components type. | |
1391 | /// @see gtc_type_precision | |
1392 | typedef vec<2, i16, lowp> lowp_i16vec2; | |
1393 | ||
1394 | /// Low qualifier 16 bit signed integer vector of 3 components type. | |
1395 | /// @see gtc_type_precision | |
1396 | typedef vec<3, i16, lowp> lowp_i16vec3; | |
1397 | ||
1398 | /// Low qualifier 16 bit signed integer vector of 4 components type. | |
1399 | /// @see gtc_type_precision | |
1400 | typedef vec<4, i16, lowp> lowp_i16vec4; | |
1401 | ||
1402 | ||
1403 | /// Medium qualifier 16 bit signed integer scalar type. | |
1404 | /// @see gtc_type_precision | |
1405 | typedef vec<1, i16, mediump> mediump_i16vec1; | |
1406 | ||
1407 | /// Medium qualifier 16 bit signed integer vector of 2 components type. | |
1408 | /// @see gtc_type_precision | |
1409 | typedef vec<2, i16, mediump> mediump_i16vec2; | |
1410 | ||
1411 | /// Medium qualifier 16 bit signed integer vector of 3 components type. | |
1412 | /// @see gtc_type_precision | |
1413 | typedef vec<3, i16, mediump> mediump_i16vec3; | |
1414 | ||
1415 | /// Medium qualifier 16 bit signed integer vector of 4 components type. | |
1416 | /// @see gtc_type_precision | |
1417 | typedef vec<4, i16, mediump> mediump_i16vec4; | |
1418 | ||
1419 | ||
1420 | /// High qualifier 16 bit signed integer scalar type. | |
1421 | /// @see gtc_type_precision | |
1422 | typedef vec<1, i16, highp> highp_i16vec1; | |
1423 | ||
1424 | /// High qualifier 16 bit signed integer vector of 2 components type. | |
1425 | /// @see gtc_type_precision | |
1426 | typedef vec<2, i16, highp> highp_i16vec2; | |
1427 | ||
1428 | /// High qualifier 16 bit signed integer vector of 3 components type. | |
1429 | /// @see gtc_type_precision | |
1430 | typedef vec<3, i16, highp> highp_i16vec3; | |
1431 | ||
1432 | /// High qualifier 16 bit signed integer vector of 4 components type. | |
1433 | /// @see gtc_type_precision | |
1434 | typedef vec<4, i16, highp> highp_i16vec4; | |
1435 | ||
1436 | ||
1437 | /// Low qualifier 32 bit signed integer scalar type. | |
1438 | /// @see gtc_type_precision | |
1439 | typedef vec<1, i32, lowp> lowp_i32vec1; | |
1440 | ||
1441 | /// Low qualifier 32 bit signed integer vector of 2 components type. | |
1442 | /// @see gtc_type_precision | |
1443 | typedef vec<2, i32, lowp> lowp_i32vec2; | |
1444 | ||
1445 | /// Low qualifier 32 bit signed integer vector of 3 components type. | |
1446 | /// @see gtc_type_precision | |
1447 | typedef vec<3, i32, lowp> lowp_i32vec3; | |
1448 | ||
1449 | /// Low qualifier 32 bit signed integer vector of 4 components type. | |
1450 | /// @see gtc_type_precision | |
1451 | typedef vec<4, i32, lowp> lowp_i32vec4; | |
1452 | ||
1453 | ||
1454 | /// Medium qualifier 32 bit signed integer scalar type. | |
1455 | /// @see gtc_type_precision | |
1456 | typedef vec<1, i32, mediump> mediump_i32vec1; | |
1457 | ||
1458 | /// Medium qualifier 32 bit signed integer vector of 2 components type. | |
1459 | /// @see gtc_type_precision | |
1460 | typedef vec<2, i32, mediump> mediump_i32vec2; | |
1461 | ||
1462 | /// Medium qualifier 32 bit signed integer vector of 3 components type. | |
1463 | /// @see gtc_type_precision | |
1464 | typedef vec<3, i32, mediump> mediump_i32vec3; | |
1465 | ||
1466 | /// Medium qualifier 32 bit signed integer vector of 4 components type. | |
1467 | /// @see gtc_type_precision | |
1468 | typedef vec<4, i32, mediump> mediump_i32vec4; | |
1469 | ||
1470 | ||
1471 | /// High qualifier 32 bit signed integer scalar type. | |
1472 | /// @see gtc_type_precision | |
1473 | typedef vec<1, i32, highp> highp_i32vec1; | |
1474 | ||
1475 | /// High qualifier 32 bit signed integer vector of 2 components type. | |
1476 | /// @see gtc_type_precision | |
1477 | typedef vec<2, i32, highp> highp_i32vec2; | |
1478 | ||
1479 | /// High qualifier 32 bit signed integer vector of 3 components type. | |
1480 | /// @see gtc_type_precision | |
1481 | typedef vec<3, i32, highp> highp_i32vec3; | |
1482 | ||
1483 | /// High qualifier 32 bit signed integer vector of 4 components type. | |
1484 | /// @see gtc_type_precision | |
1485 | typedef vec<4, i32, highp> highp_i32vec4; | |
1486 | ||
1487 | ||
1488 | /// Low qualifier 64 bit signed integer scalar type. | |
1489 | /// @see gtc_type_precision | |
1490 | typedef vec<1, i64, lowp> lowp_i64vec1; | |
1491 | ||
1492 | /// Low qualifier 64 bit signed integer vector of 2 components type. | |
1493 | /// @see gtc_type_precision | |
1494 | typedef vec<2, i64, lowp> lowp_i64vec2; | |
1495 | ||
1496 | /// Low qualifier 64 bit signed integer vector of 3 components type. | |
1497 | /// @see gtc_type_precision | |
1498 | typedef vec<3, i64, lowp> lowp_i64vec3; | |
1499 | ||
1500 | /// Low qualifier 64 bit signed integer vector of 4 components type. | |
1501 | /// @see gtc_type_precision | |
1502 | typedef vec<4, i64, lowp> lowp_i64vec4; | |
1503 | ||
1504 | ||
1505 | /// Medium qualifier 64 bit signed integer scalar type. | |
1506 | /// @see gtc_type_precision | |
1507 | typedef vec<1, i64, mediump> mediump_i64vec1; | |
1508 | ||
1509 | /// Medium qualifier 64 bit signed integer vector of 2 components type. | |
1510 | /// @see gtc_type_precision | |
1511 | typedef vec<2, i64, mediump> mediump_i64vec2; | |
1512 | ||
1513 | /// Medium qualifier 64 bit signed integer vector of 3 components type. | |
1514 | /// @see gtc_type_precision | |
1515 | typedef vec<3, i64, mediump> mediump_i64vec3; | |
1516 | ||
1517 | /// Medium qualifier 64 bit signed integer vector of 4 components type. | |
1518 | /// @see gtc_type_precision | |
1519 | typedef vec<4, i64, mediump> mediump_i64vec4; | |
1520 | ||
1521 | ||
1522 | /// High qualifier 64 bit signed integer scalar type. | |
1523 | /// @see gtc_type_precision | |
1524 | typedef vec<1, i64, highp> highp_i64vec1; | |
1525 | ||
1526 | /// High qualifier 64 bit signed integer vector of 2 components type. | |
1527 | /// @see gtc_type_precision | |
1528 | typedef vec<2, i64, highp> highp_i64vec2; | |
1529 | ||
1530 | /// High qualifier 64 bit signed integer vector of 3 components type. | |
1531 | /// @see gtc_type_precision | |
1532 | typedef vec<3, i64, highp> highp_i64vec3; | |
1533 | ||
1534 | /// High qualifier 64 bit signed integer vector of 4 components type. | |
1535 | /// @see gtc_type_precision | |
1536 | typedef vec<4, i64, highp> highp_i64vec4; | |
1537 | ||
1538 | ||
1539 | ///////////////////////////// | |
1540 | // Unsigned int vector types | |
1541 | ||
1542 | /// Low qualifier unsigned integer vector of 1 component type. | |
1543 | /// @see gtc_type_precision | |
1544 | typedef vec<1, uint, lowp> lowp_uvec1; | |
1545 | ||
1546 | /// Low qualifier unsigned integer vector of 2 components type. | |
1547 | /// @see gtc_type_precision | |
1548 | typedef vec<2, uint, lowp> lowp_uvec2; | |
1549 | ||
1550 | /// Low qualifier unsigned integer vector of 3 components type. | |
1551 | /// @see gtc_type_precision | |
1552 | typedef vec<3, uint, lowp> lowp_uvec3; | |
1553 | ||
1554 | /// Low qualifier unsigned integer vector of 4 components type. | |
1555 | /// @see gtc_type_precision | |
1556 | typedef vec<4, uint, lowp> lowp_uvec4; | |
1557 | ||
1558 | ||
1559 | /// Medium qualifier unsigned integer vector of 1 component type. | |
1560 | /// @see gtc_type_precision | |
1561 | typedef vec<1, uint, mediump> mediump_uvec1; | |
1562 | ||
1563 | /// Medium qualifier unsigned integer vector of 2 components type. | |
1564 | /// @see gtc_type_precision | |
1565 | typedef vec<2, uint, mediump> mediump_uvec2; | |
1566 | ||
1567 | /// Medium qualifier unsigned integer vector of 3 components type. | |
1568 | /// @see gtc_type_precision | |
1569 | typedef vec<3, uint, mediump> mediump_uvec3; | |
1570 | ||
1571 | /// Medium qualifier unsigned integer vector of 4 components type. | |
1572 | /// @see gtc_type_precision | |
1573 | typedef vec<4, uint, mediump> mediump_uvec4; | |
1574 | ||
1575 | ||
1576 | /// High qualifier unsigned integer vector of 1 component type. | |
1577 | /// @see gtc_type_precision | |
1578 | typedef vec<1, uint, highp> highp_uvec1; | |
1579 | ||
1580 | /// High qualifier unsigned integer vector of 2 components type. | |
1581 | /// @see gtc_type_precision | |
1582 | typedef vec<2, uint, highp> highp_uvec2; | |
1583 | ||
1584 | /// High qualifier unsigned integer vector of 3 components type. | |
1585 | /// @see gtc_type_precision | |
1586 | typedef vec<3, uint, highp> highp_uvec3; | |
1587 | ||
1588 | /// High qualifier unsigned integer vector of 4 components type. | |
1589 | /// @see gtc_type_precision | |
1590 | typedef vec<4, uint, highp> highp_uvec4; | |
1556 | 1591 | |
1557 | 1592 | |
1558 | 1593 | /// Low qualifier 8 bit unsigned integer scalar type. |
1559 | 1594 | /// @see gtc_type_precision |
1560 | typedef vec<1, u8, lowp> lowp_u8vec1; | |
1595 | typedef vec<1, u8, lowp> lowp_u8vec1; | |
1561 | 1596 | |
1562 | 1597 | /// Low qualifier 8 bit unsigned integer vector of 2 components type. |
1563 | 1598 | /// @see gtc_type_precision |
1564 | typedef vec<2, u8, lowp> lowp_u8vec2; | |
1599 | typedef vec<2, u8, lowp> lowp_u8vec2; | |
1565 | 1600 | |
1566 | 1601 | /// Low qualifier 8 bit unsigned integer vector of 3 components type. |
1567 | 1602 | /// @see gtc_type_precision |
1568 | typedef vec<3, u8, lowp> lowp_u8vec3; | |
1603 | typedef vec<3, u8, lowp> lowp_u8vec3; | |
1569 | 1604 | |
1570 | 1605 | /// Low qualifier 8 bit unsigned integer vector of 4 components type. |
1571 | 1606 | /// @see gtc_type_precision |
1572 | typedef vec<4, u8, lowp> lowp_u8vec4; | |
1607 | typedef vec<4, u8, lowp> lowp_u8vec4; | |
1573 | 1608 | |
1574 | 1609 | |
1575 | 1610 | /// Medium qualifier 8 bit unsigned integer scalar type. |
1576 | 1611 | /// @see gtc_type_precision |
1577 | typedef vec<1, u8, mediump> mediump_u8vec1; | |
1612 | typedef vec<1, u8, mediump> mediump_u8vec1; | |
1578 | 1613 | |
1579 | 1614 | /// Medium qualifier 8 bit unsigned integer vector of 2 components type. |
1580 | 1615 | /// @see gtc_type_precision |
1581 | typedef vec<2, u8, mediump> mediump_u8vec2; | |
1616 | typedef vec<2, u8, mediump> mediump_u8vec2; | |
1582 | 1617 | |
1583 | 1618 | /// Medium qualifier 8 bit unsigned integer vector of 3 components type. |
1584 | 1619 | /// @see gtc_type_precision |
1585 | typedef vec<3, u8, mediump> mediump_u8vec3; | |
1620 | typedef vec<3, u8, mediump> mediump_u8vec3; | |
1586 | 1621 | |
1587 | 1622 | /// Medium qualifier 8 bit unsigned integer vector of 4 components type. |
1588 | 1623 | /// @see gtc_type_precision |
1589 | typedef vec<4, u8, mediump> mediump_u8vec4; | |
1624 | typedef vec<4, u8, mediump> mediump_u8vec4; | |
1590 | 1625 | |
1591 | 1626 | |
1592 | 1627 | /// High qualifier 8 bit unsigned integer scalar type. |
1593 | 1628 | /// @see gtc_type_precision |
1594 | typedef vec<1, u8, highp> highp_u8vec1; | |
1629 | typedef vec<1, u8, highp> highp_u8vec1; | |
1595 | 1630 | |
1596 | 1631 | /// High qualifier 8 bit unsigned integer vector of 2 components type. |
1597 | 1632 | /// @see gtc_type_precision |
1598 | typedef vec<2, u8, highp> highp_u8vec2; | |
1633 | typedef vec<2, u8, highp> highp_u8vec2; | |
1599 | 1634 | |
1600 | 1635 | /// High qualifier 8 bit unsigned integer vector of 3 components type. |
1601 | 1636 | /// @see gtc_type_precision |
1602 | typedef vec<3, u8, highp> highp_u8vec3; | |
1637 | typedef vec<3, u8, highp> highp_u8vec3; | |
1603 | 1638 | |
1604 | 1639 | /// High qualifier 8 bit unsigned integer vector of 4 components type. |
1605 | 1640 | /// @see gtc_type_precision |
1606 | typedef vec<4, u8, highp> highp_u8vec4; | |
1607 | ||
1608 | ||
1609 | ||
1610 | /// Default qualifier 8 bit unsigned integer scalar type. | |
1611 | /// @see gtc_type_precision | |
1612 | typedef vec<1, u8, defaultp> u8vec1; | |
1613 | ||
1614 | /// Default qualifier 8 bit unsigned integer vector of 2 components type. | |
1615 | /// @see gtc_type_precision | |
1616 | typedef vec<2, u8, defaultp> u8vec2; | |
1617 | ||
1618 | /// Default qualifier 8 bit unsigned integer vector of 3 components type. | |
1619 | /// @see gtc_type_precision | |
1620 | typedef vec<3, u8, defaultp> u8vec3; | |
1621 | ||
1622 | /// Default qualifier 8 bit unsigned integer vector of 4 components type. | |
1623 | /// @see gtc_type_precision | |
1624 | typedef vec<4, u8, defaultp> u8vec4; | |
1625 | ||
1626 | ||
1641 | typedef vec<4, u8, highp> highp_u8vec4; | |
1627 | 1642 | |
1628 | 1643 | |
1629 | 1644 | /// Low qualifier 16 bit unsigned integer scalar type. |
1645 | 1660 | |
1646 | 1661 | /// Medium qualifier 16 bit unsigned integer scalar type. |
1647 | 1662 | /// @see gtc_type_precision |
1648 | typedef vec<1, u16, mediump> mediump_u16vec1; | |
1663 | typedef vec<1, u16, mediump> mediump_u16vec1; | |
1649 | 1664 | |
1650 | 1665 | /// Medium qualifier 16 bit unsigned integer vector of 2 components type. |
1651 | 1666 | /// @see gtc_type_precision |
1652 | typedef vec<2, u16, mediump> mediump_u16vec2; | |
1667 | typedef vec<2, u16, mediump> mediump_u16vec2; | |
1653 | 1668 | |
1654 | 1669 | /// Medium qualifier 16 bit unsigned integer vector of 3 components type. |
1655 | 1670 | /// @see gtc_type_precision |
1656 | typedef vec<3, u16, mediump> mediump_u16vec3; | |
1671 | typedef vec<3, u16, mediump> mediump_u16vec3; | |
1657 | 1672 | |
1658 | 1673 | /// Medium qualifier 16 bit unsigned integer vector of 4 components type. |
1659 | 1674 | /// @see gtc_type_precision |
1660 | typedef vec<4, u16, mediump> mediump_u16vec4; | |
1675 | typedef vec<4, u16, mediump> mediump_u16vec4; | |
1661 | 1676 | |
1662 | 1677 | |
1663 | 1678 | /// High qualifier 16 bit unsigned integer scalar type. |
1677 | 1692 | typedef vec<4, u16, highp> highp_u16vec4; |
1678 | 1693 | |
1679 | 1694 | |
1680 | ||
1681 | ||
1682 | /// Default qualifier 16 bit unsigned integer scalar type. | |
1683 | /// @see gtc_type_precision | |
1684 | typedef vec<1, u16, defaultp> u16vec1; | |
1685 | ||
1686 | /// Default qualifier 16 bit unsigned integer vector of 2 components type. | |
1687 | /// @see gtc_type_precision | |
1688 | typedef vec<2, u16, defaultp> u16vec2; | |
1689 | ||
1690 | /// Default qualifier 16 bit unsigned integer vector of 3 components type. | |
1691 | /// @see gtc_type_precision | |
1692 | typedef vec<3, u16, defaultp> u16vec3; | |
1693 | ||
1694 | /// Default qualifier 16 bit unsigned integer vector of 4 components type. | |
1695 | /// @see gtc_type_precision | |
1696 | typedef vec<4, u16, defaultp> u16vec4; | |
1697 | ||
1698 | ||
1699 | ||
1700 | 1695 | /// Low qualifier 32 bit unsigned integer scalar type. |
1701 | 1696 | /// @see gtc_type_precision |
1702 | 1697 | typedef vec<1, u32, lowp> lowp_u32vec1; |
1716 | 1711 | |
1717 | 1712 | /// Medium qualifier 32 bit unsigned integer scalar type. |
1718 | 1713 | /// @see gtc_type_precision |
1719 | typedef vec<1, u32, mediump> mediump_u32vec1; | |
1714 | typedef vec<1, u32, mediump> mediump_u32vec1; | |
1720 | 1715 | |
1721 | 1716 | /// Medium qualifier 32 bit unsigned integer vector of 2 components type. |
1722 | 1717 | /// @see gtc_type_precision |
1723 | typedef vec<2, u32, mediump> mediump_u32vec2; | |
1718 | typedef vec<2, u32, mediump> mediump_u32vec2; | |
1724 | 1719 | |
1725 | 1720 | /// Medium qualifier 32 bit unsigned integer vector of 3 components type. |
1726 | 1721 | /// @see gtc_type_precision |
1727 | typedef vec<3, u32, mediump> mediump_u32vec3; | |
1722 | typedef vec<3, u32, mediump> mediump_u32vec3; | |
1728 | 1723 | |
1729 | 1724 | /// Medium qualifier 32 bit unsigned integer vector of 4 components type. |
1730 | 1725 | /// @see gtc_type_precision |
1731 | typedef vec<4, u32, mediump> mediump_u32vec4; | |
1726 | typedef vec<4, u32, mediump> mediump_u32vec4; | |
1732 | 1727 | |
1733 | 1728 | |
1734 | 1729 | /// High qualifier 32 bit unsigned integer scalar type. |
1748 | 1743 | typedef vec<4, u32, highp> highp_u32vec4; |
1749 | 1744 | |
1750 | 1745 | |
1751 | ||
1752 | /// Default qualifier 32 bit unsigned integer scalar type. | |
1753 | /// @see gtc_type_precision | |
1754 | typedef vec<1, u32, defaultp> u32vec1; | |
1755 | ||
1756 | /// Default qualifier 32 bit unsigned integer vector of 2 components type. | |
1757 | /// @see gtc_type_precision | |
1758 | typedef vec<2, u32, defaultp> u32vec2; | |
1759 | ||
1760 | /// Default qualifier 32 bit unsigned integer vector of 3 components type. | |
1761 | /// @see gtc_type_precision | |
1762 | typedef vec<3, u32, defaultp> u32vec3; | |
1763 | ||
1764 | /// Default qualifier 32 bit unsigned integer vector of 4 components type. | |
1765 | /// @see gtc_type_precision | |
1766 | typedef vec<4, u32, defaultp> u32vec4; | |
1767 | ||
1768 | ||
1769 | ||
1770 | ||
1771 | 1746 | /// Low qualifier 64 bit unsigned integer scalar type. |
1772 | 1747 | /// @see gtc_type_precision |
1773 | 1748 | typedef vec<1, u64, lowp> lowp_u64vec1; |
1787 | 1762 | |
1788 | 1763 | /// Medium qualifier 64 bit unsigned integer scalar type. |
1789 | 1764 | /// @see gtc_type_precision |
1790 | typedef vec<1, u64, mediump> mediump_u64vec1; | |
1765 | typedef vec<1, u64, mediump> mediump_u64vec1; | |
1791 | 1766 | |
1792 | 1767 | /// Medium qualifier 64 bit unsigned integer vector of 2 components type. |
1793 | 1768 | /// @see gtc_type_precision |
1794 | typedef vec<2, u64, mediump> mediump_u64vec2; | |
1769 | typedef vec<2, u64, mediump> mediump_u64vec2; | |
1795 | 1770 | |
1796 | 1771 | /// Medium qualifier 64 bit unsigned integer vector of 3 components type. |
1797 | 1772 | /// @see gtc_type_precision |
1798 | typedef vec<3, u64, mediump> mediump_u64vec3; | |
1773 | typedef vec<3, u64, mediump> mediump_u64vec3; | |
1799 | 1774 | |
1800 | 1775 | /// Medium qualifier 64 bit unsigned integer vector of 4 components type. |
1801 | 1776 | /// @see gtc_type_precision |
1802 | typedef vec<4, u64, mediump> mediump_u64vec4; | |
1777 | typedef vec<4, u64, mediump> mediump_u64vec4; | |
1803 | 1778 | |
1804 | 1779 | |
1805 | 1780 | /// High qualifier 64 bit unsigned integer scalar type. |
1817 | 1792 | /// High qualifier 64 bit unsigned integer vector of 4 components type. |
1818 | 1793 | /// @see gtc_type_precision |
1819 | 1794 | typedef vec<4, u64, highp> highp_u64vec4; |
1820 | ||
1821 | ||
1822 | ||
1823 | ||
1824 | /// Default qualifier 64 bit unsigned integer scalar type. | |
1825 | /// @see gtc_type_precision | |
1826 | typedef vec<1, u64, defaultp> u64vec1; | |
1827 | ||
1828 | /// Default qualifier 64 bit unsigned integer vector of 2 components type. | |
1829 | /// @see gtc_type_precision | |
1830 | typedef vec<2, u64, defaultp> u64vec2; | |
1831 | ||
1832 | /// Default qualifier 64 bit unsigned integer vector of 3 components type. | |
1833 | /// @see gtc_type_precision | |
1834 | typedef vec<3, u64, defaultp> u64vec3; | |
1835 | ||
1836 | /// Default qualifier 64 bit unsigned integer vector of 4 components type. | |
1837 | /// @see gtc_type_precision | |
1838 | typedef vec<4, u64, defaultp> u64vec4; | |
1839 | 1795 | |
1840 | 1796 | |
1841 | 1797 | ////////////////////// |
19 | 19 | #include "../ext/vector_double1.hpp" |
20 | 20 | #include "../ext/vector_double1_precision.hpp" |
21 | 21 | #include "../ext/vector_int1.hpp" |
22 | #include "../ext/vector_int1_precision.hpp" | |
22 | #include "../ext/vector_int1_sized.hpp" | |
23 | 23 | #include "../ext/vector_uint1.hpp" |
24 | #include "../ext/vector_uint1_precision.hpp" | |
24 | #include "../ext/vector_uint1_sized.hpp" | |
25 | 25 | |
26 | 26 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
27 | 27 | # pragma message("GLM: GLM_GTC_vec1 extension included") |
13 | 13 | |
14 | 14 | // Dependency: |
15 | 15 | #include "../glm.hpp" |
16 | #include "../ext/vector_common.hpp" | |
16 | 17 | |
17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
18 | 19 | # ifndef GLM_ENABLE_EXPERIMENTAL |
129 | 130 | C<T> const& z, |
130 | 131 | C<T> const& w); |
131 | 132 | |
132 | /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. | |
133 | /// | |
134 | /// @tparam genType Floating-point or integer; scalar or vector types. | |
135 | /// | |
136 | /// @see gtx_extented_min_max | |
137 | template<typename genType> | |
138 | GLM_FUNC_DECL genType fmin(genType x, genType y); | |
139 | ||
140 | /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. | |
141 | /// | |
142 | /// @tparam genType Floating-point; scalar or vector types. | |
143 | /// | |
144 | /// @see gtx_extented_min_max | |
145 | /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> | |
146 | template<typename genType> | |
147 | GLM_FUNC_DECL genType fmax(genType x, genType y); | |
148 | ||
149 | /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned. | |
150 | /// | |
151 | /// @tparam genType Floating-point scalar or vector types. | |
152 | /// | |
153 | /// @see gtx_extented_min_max | |
154 | template<typename genType> | |
155 | GLM_FUNC_DECL genType fclamp(genType x, genType minVal, genType maxVal); | |
156 | ||
157 | /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned. | |
158 | /// | |
159 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector | |
160 | /// @tparam T Floating-point scalar types | |
161 | /// @tparam Q Value from qualifier enum | |
162 | /// | |
163 | /// @see gtx_extented_min_max | |
164 | template<length_t L, typename T, qualifier Q> | |
165 | GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal); | |
166 | ||
167 | /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned. | |
168 | /// | |
169 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector | |
170 | /// @tparam T Floating-point scalar types | |
171 | /// @tparam Q Value from qualifier enum | |
172 | /// | |
173 | /// @see gtx_extented_min_max | |
174 | template<length_t L, typename T, qualifier Q> | |
175 | GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal); | |
176 | ||
177 | ||
178 | 133 | /// @} |
179 | 134 | }//namespace glm |
180 | 135 |
134 | 134 | { |
135 | 135 | return glm::max(glm::max(x, y), glm::max(z, w)); |
136 | 136 | } |
137 | ||
138 | // fmin | |
139 | # if GLM_HAS_CXX11_STL | |
140 | using std::fmin; | |
141 | # else | |
142 | template<typename genType> | |
143 | GLM_FUNC_QUALIFIER genType fmin(genType x, genType y) | |
144 | { | |
145 | GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fmin' only accept floating-point input"); | |
146 | ||
147 | if (isnan(x)) | |
148 | return y; | |
149 | if (isnan(y)) | |
150 | return x; | |
151 | ||
152 | return min(x, y); | |
153 | } | |
154 | # endif | |
155 | ||
156 | template<length_t L, typename T, qualifier Q> | |
157 | GLM_FUNC_QUALIFIER vec<L, T, Q> fmin(vec<L, T, Q> const& a, T b) | |
158 | { | |
159 | return detail::functor2<vec, L, T, Q>::call(fmin, a, vec<L, T, Q>(b)); | |
160 | } | |
161 | ||
162 | template<length_t L, typename T, qualifier Q> | |
163 | GLM_FUNC_QUALIFIER vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b) | |
164 | { | |
165 | return detail::functor2<vec, L, T, Q>::call(fmin, a, b); | |
166 | } | |
167 | ||
168 | // fmax | |
169 | # if GLM_HAS_CXX11_STL | |
170 | using std::fmax; | |
171 | # else | |
172 | template<typename genType> | |
173 | GLM_FUNC_QUALIFIER genType fmax(genType x, genType y) | |
174 | { | |
175 | GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fmax' only accept floating-point input"); | |
176 | ||
177 | if (isnan(x)) | |
178 | return y; | |
179 | if (isnan(y)) | |
180 | return x; | |
181 | ||
182 | return max(x, y); | |
183 | } | |
184 | # endif | |
185 | ||
186 | template<length_t L, typename T, qualifier Q> | |
187 | GLM_FUNC_QUALIFIER vec<L, T, Q> fmax(vec<L, T, Q> const& a, T b) | |
188 | { | |
189 | return detail::functor2<vec, L, T, Q>::call(fmax, a, vec<L, T, Q>(b)); | |
190 | } | |
191 | ||
192 | template<length_t L, typename T, qualifier Q> | |
193 | GLM_FUNC_QUALIFIER vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b) | |
194 | { | |
195 | return detail::functor2<vec, L, T, Q>::call(fmax, a, b); | |
196 | } | |
197 | ||
198 | // fclamp | |
199 | template<typename genType> | |
200 | GLM_FUNC_QUALIFIER genType fclamp(genType x, genType minVal, genType maxVal) | |
201 | { | |
202 | GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fclamp' only accept floating-point or integer inputs"); | |
203 | return fmin(fmax(x, minVal), maxVal); | |
204 | } | |
205 | ||
206 | template<length_t L, typename T, qualifier Q> | |
207 | GLM_FUNC_QUALIFIER vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal) | |
208 | { | |
209 | return fmin(fmax(x, vec<L, T, Q>(minVal)), vec<L, T, Q>(maxVal)); | |
210 | } | |
211 | ||
212 | template<length_t L, typename T, qualifier Q> | |
213 | GLM_FUNC_QUALIFIER vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal) | |
214 | { | |
215 | return fmin(fmax(x, minVal), maxVal); | |
216 | } | |
217 | 137 | }//namespace glm |
27 | 27 | /// @addtogroup gtx_polar_coordinates |
28 | 28 | /// @{ |
29 | 29 | |
30 | /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. | |
30 | /// Convert Euclidean to Polar coordinates, x is the latitude, y the longitude and z the xz distance. | |
31 | 31 | /// |
32 | 32 | /// @see gtx_polar_coordinates |
33 | 33 | template<typename T, qualifier Q> |
13 | 13 | |
14 | 14 | // Dependency: |
15 | 15 | #include "../glm.hpp" |
16 | #include "../ext/scalar_common.hpp" | |
17 | #include "../ext/vector_common.hpp" | |
16 | 18 | #include "../gtc/vec1.hpp" |
17 | 19 | |
18 | 20 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
28 | 30 | /// @addtogroup gtx_wrap |
29 | 31 | /// @{ |
30 | 32 | |
31 | /// Simulate GL_CLAMP OpenGL wrap mode | |
32 | /// @see gtx_wrap extension. | |
33 | template<typename genType> | |
34 | GLM_FUNC_DECL genType clamp(genType const& Texcoord); | |
35 | ||
36 | /// Simulate GL_REPEAT OpenGL wrap mode | |
37 | /// @see gtx_wrap extension. | |
38 | template<typename genType> | |
39 | GLM_FUNC_DECL genType repeat(genType const& Texcoord); | |
40 | ||
41 | /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode | |
42 | /// @see gtx_wrap extension. | |
43 | template<typename genType> | |
44 | GLM_FUNC_DECL genType mirrorClamp(genType const& Texcoord); | |
45 | ||
46 | /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode | |
47 | /// @see gtx_wrap extension. | |
48 | template<typename genType> | |
49 | GLM_FUNC_DECL genType mirrorRepeat(genType const& Texcoord); | |
50 | ||
51 | 33 | /// @} |
52 | 34 | }// namespace glm |
53 | 35 |
1 | 1 | |
2 | 2 | namespace glm |
3 | 3 | { |
4 | template<length_t L, typename T, qualifier Q> | |
5 | GLM_FUNC_QUALIFIER vec<L, T, Q> clamp(vec<L, T, Q> const& Texcoord) | |
6 | { | |
7 | return glm::clamp(Texcoord, vec<L, T, Q>(0), vec<L, T, Q>(1)); | |
8 | } | |
9 | 4 | |
10 | template<typename genType> | |
11 | GLM_FUNC_QUALIFIER genType clamp(genType const& Texcoord) | |
12 | { | |
13 | return clamp(vec<1, genType, defaultp>(Texcoord)).x; | |
14 | } | |
15 | ||
16 | template<length_t L, typename T, qualifier Q> | |
17 | GLM_FUNC_QUALIFIER vec<L, T, Q> repeat(vec<L, T, Q> const& Texcoord) | |
18 | { | |
19 | return glm::fract(Texcoord); | |
20 | } | |
21 | ||
22 | template<typename genType> | |
23 | GLM_FUNC_QUALIFIER genType repeat(genType const& Texcoord) | |
24 | { | |
25 | return repeat(vec<1, genType, defaultp>(Texcoord)).x; | |
26 | } | |
27 | ||
28 | template<length_t L, typename T, qualifier Q> | |
29 | GLM_FUNC_QUALIFIER vec<L, T, Q> mirrorClamp(vec<L, T, Q> const& Texcoord) | |
30 | { | |
31 | return glm::fract(glm::abs(Texcoord)); | |
32 | } | |
33 | ||
34 | template<typename genType> | |
35 | GLM_FUNC_QUALIFIER genType mirrorClamp(genType const& Texcoord) | |
36 | { | |
37 | return mirrorClamp(vec<1, genType, defaultp>(Texcoord)).x; | |
38 | } | |
39 | ||
40 | template<length_t L, typename T, qualifier Q> | |
41 | GLM_FUNC_QUALIFIER vec<L, T, Q> mirrorRepeat(vec<L, T, Q> const& Texcoord) | |
42 | { | |
43 | vec<L, T, Q> const Abs = glm::abs(Texcoord); | |
44 | vec<L, T, Q> const Clamp = glm::mod(glm::floor(Abs), vec<L, T, Q>(2)); | |
45 | vec<L, T, Q> const Floor = glm::floor(Abs); | |
46 | vec<L, T, Q> const Rest = Abs - Floor; | |
47 | vec<L, T, Q> const Mirror = Clamp + Rest; | |
48 | return mix(Rest, vec<L, T, Q>(1) - Rest, glm::greaterThanEqual(Mirror, vec<L, T, Q>(1))); | |
49 | } | |
50 | ||
51 | template<typename genType> | |
52 | GLM_FUNC_QUALIFIER genType mirrorRepeat(genType const& Texcoord) | |
53 | { | |
54 | return mirrorRepeat(vec<1, genType, defaultp>(Texcoord)).x; | |
55 | } | |
56 | 5 | }//namespace glm |
8 | 8 | #include "./ext/vector_double2.hpp" |
9 | 9 | #include "./ext/vector_double2_precision.hpp" |
10 | 10 | #include "./ext/vector_int2.hpp" |
11 | #include "./ext/vector_int2_precision.hpp" | |
11 | #include "./ext/vector_int2_sized.hpp" | |
12 | 12 | #include "./ext/vector_uint2.hpp" |
13 | #include "./ext/vector_uint2_precision.hpp" | |
13 | #include "./ext/vector_uint2_sized.hpp" |
8 | 8 | #include "./ext/vector_double3.hpp" |
9 | 9 | #include "./ext/vector_double3_precision.hpp" |
10 | 10 | #include "./ext/vector_int3.hpp" |
11 | #include "./ext/vector_int3_precision.hpp" | |
11 | #include "./ext/vector_int3_sized.hpp" | |
12 | 12 | #include "./ext/vector_uint3.hpp" |
13 | #include "./ext/vector_uint3_precision.hpp" | |
13 | #include "./ext/vector_uint3_sized.hpp" |
8 | 8 | #include "./ext/vector_double4.hpp" |
9 | 9 | #include "./ext/vector_double4_precision.hpp" |
10 | 10 | #include "./ext/vector_int4.hpp" |
11 | #include "./ext/vector_int4_precision.hpp" | |
11 | #include "./ext/vector_int4_sized.hpp" | |
12 | 12 | #include "./ext/vector_uint4.hpp" |
13 | #include "./ext/vector_uint4_precision.hpp" | |
13 | #include "./ext/vector_uint4_sized.hpp" | |
14 | 14 |
13 | 13 | + [1.2. Using separated headers](#section1_2) |
14 | 14 | + [1.3. Using extension headers](#section1_3) |
15 | 15 | + [1.4. Dependencies](#section1_4) |
16 | + [1.5. Finding GLM with CMake](#section1_5) | |
16 | 17 | + [2. Preprocessor configurations](#section2) |
17 | 18 | + [2.1. GLM\_FORCE\_MESSAGES: Platform auto detection and default configuration](#section2_1) |
18 | 19 | + [2.2. GLM\_FORCE\_PLATFORM\_UNKNOWN: Force GLM to no detect the build platform](#section2_2) |
273 | 274 | |
274 | 275 | GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/glcorearb.h>`](http://www.opengl.org/registry/api/GL/glcorearb.h), `<GLES3/gl3.h>`, `<GL/glu.h>`, or `<windows.h>`. |
275 | 276 | |
277 | ### <a name="section1_5"></a> 1.5. Finding GLM with CMake | |
278 | ||
279 | GLM packages a `glmConfig.cmake` and `glmConfig-version.cmake` in the root of the repository and the release archives. To find GLM with CMake you can pass `-Dglm_DIR=<path to glm root>/cmake/glm/` when running CMake. You can then either add `${GLM_INCLUDE_DIRS}` to your target's include directories, or link against the imported `glm::glm` target. | |
280 | ||
276 | 281 | --- |
277 | 282 | <div style="page-break-after: always;"> </div> |
278 | 283 |
18 | 18 | - Any C++11 compiler |
19 | 19 | |
20 | 20 | For more information about *GLM*, please have a look at the [manual](manual.md) and the [API reference documentation](http://glm.g-truc.net/0.9.8/api/index.html). |
21 | The source code and the documentation are licensed under both the [Happy Bunny License (Modified MIT) or the MIT License](manual.md#section0). | |
21 | The source code and the documentation are licensed under either the [Happy Bunny License (Modified MIT) or the MIT License](manual.md#section0). | |
22 | 22 | |
23 | 23 | Thanks for contributing to the project by [submitting issues](https://github.com/g-truc/glm/issues) for bug reports and feature requests. Any feedback is welcome at [glm@g-truc.net](mailto://glm@g-truc.net). |
24 | 24 | |
51 | 51 | | [AppVeyor](https://ci.appveyor.com/project/Groovounet/glm)| Windows 32 and 64 | Visual Studio 2013, Visual Studio 2015, Visual Studio 2017 | [![AppVeyor](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true)](https://ci.appveyor.com/project/Groovounet/glm) |
52 | 52 | |
53 | 53 | ## Release notes |
54 | ||
55 | ### [GLM 0.9.9.8](https://github.com/g-truc/glm/releases/tag/0.9.9.8) - 2020-04-13 | |
56 | #### Features: | |
57 | - Added GLM_EXT_vector_intX* and GLM_EXT_vector_uintX* extensions | |
58 | - Added GLM_EXT_matrix_intX* and GLM_EXT_matrix_uintX* extensions | |
59 | ||
60 | #### Improvements: | |
61 | - Added clamp, repeat, mirrorClamp and mirrorRepeat function to GLM_EXT_scalar_commond and GLM_EXT_vector_commond extensions with tests | |
62 | ||
63 | #### Fixes: | |
64 | - Fixed unnecessary warnings from matrix_projection.inl #995 | |
65 | - Fixed quaternion slerp overload which interpolates with extra spins #996 | |
66 | - Fixed for glm::length using arch64 #992 | |
67 | - Fixed singularity check for quatLookAt #770 | |
54 | 68 | |
55 | 69 | ### [GLM 0.9.9.7](https://github.com/g-truc/glm/releases/tag/0.9.9.7) - 2020-01-05 |
56 | 70 | #### Improvements: |
0 | cmake_minimum_required(VERSION 3.2 FATAL_ERROR) | |
1 | project(test_find_glm) | |
2 | ||
3 | find_package(glm REQUIRED) | |
4 | ||
5 | add_executable(test_find_glm test_find_glm.cpp) | |
6 | target_link_libraries(test_find_glm glm::glm) | |
7 |
0 | #include <iostream> | |
1 | #include <glm/glm.hpp> | |
2 | #include <glm/ext.hpp> | |
3 | ||
4 | glm::mat4 camera(float Translate, glm::vec2 const& Rotate) | |
5 | { | |
6 | glm::mat4 Projection = glm::perspective(glm::pi<float>() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f); | |
7 | glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); | |
8 | View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f)); | |
9 | View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f)); | |
10 | glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f)); | |
11 | return Projection * View * Model; | |
12 | } | |
13 | ||
14 | int main() | |
15 | { | |
16 | const glm::mat4 m = camera(1.f, glm::vec2(1.f, 0.5f)); | |
17 | std::cout << "matrix diagonal: " << m[0][0] << ", " | |
18 | << m[1][1] << ", " << m[2][2] << ", " << m[3][3] << "\n"; | |
19 | return 0; | |
20 | } | |
21 |
0 | 0 | glmCreateTestGTC(ext_matrix_relational) |
1 | 1 | glmCreateTestGTC(ext_matrix_transform) |
2 | 2 | glmCreateTestGTC(ext_matrix_common) |
3 | glmCreateTestGTC(ext_matrix_int2x2_sized) | |
4 | glmCreateTestGTC(ext_matrix_int2x3_sized) | |
5 | glmCreateTestGTC(ext_matrix_int2x4_sized) | |
6 | glmCreateTestGTC(ext_matrix_int3x2_sized) | |
7 | glmCreateTestGTC(ext_matrix_int3x3_sized) | |
8 | glmCreateTestGTC(ext_matrix_int3x4_sized) | |
9 | glmCreateTestGTC(ext_matrix_int4x2_sized) | |
10 | glmCreateTestGTC(ext_matrix_int4x3_sized) | |
11 | glmCreateTestGTC(ext_matrix_int4x4_sized) | |
12 | glmCreateTestGTC(ext_matrix_uint2x2_sized) | |
13 | glmCreateTestGTC(ext_matrix_uint2x3_sized) | |
14 | glmCreateTestGTC(ext_matrix_uint2x4_sized) | |
15 | glmCreateTestGTC(ext_matrix_uint3x2_sized) | |
16 | glmCreateTestGTC(ext_matrix_uint3x3_sized) | |
17 | glmCreateTestGTC(ext_matrix_uint3x4_sized) | |
18 | glmCreateTestGTC(ext_matrix_uint4x2_sized) | |
19 | glmCreateTestGTC(ext_matrix_uint4x3_sized) | |
20 | glmCreateTestGTC(ext_matrix_uint4x4_sized) | |
3 | 21 | glmCreateTestGTC(ext_quaternion_common) |
4 | 22 | glmCreateTestGTC(ext_quaternion_exponential) |
5 | 23 | glmCreateTestGTC(ext_quaternion_geometric) |
18 | 36 | glmCreateTestGTC(ext_vector_bool1) |
19 | 37 | glmCreateTestGTC(ext_vector_common) |
20 | 38 | glmCreateTestGTC(ext_vector_iec559) |
39 | glmCreateTestGTC(ext_vector_int1_sized) | |
40 | glmCreateTestGTC(ext_vector_int2_sized) | |
41 | glmCreateTestGTC(ext_vector_int3_sized) | |
42 | glmCreateTestGTC(ext_vector_int4_sized) | |
21 | 43 | glmCreateTestGTC(ext_vector_integer) |
22 | 44 | glmCreateTestGTC(ext_vector_integer_sized) |
45 | glmCreateTestGTC(ext_vector_uint1_sized) | |
46 | glmCreateTestGTC(ext_vector_uint2_sized) | |
47 | glmCreateTestGTC(ext_vector_uint3_sized) | |
48 | glmCreateTestGTC(ext_vector_uint4_sized) | |
23 | 49 | glmCreateTestGTC(ext_vector_relational) |
24 | 50 | glmCreateTestGTC(ext_vector_ulp) |
25 | 51 |
0 | #include <glm/ext/matrix_int2x2_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat2x2) == 4, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat2x2) == 8, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat2x2) == 16, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat2x2) == 32, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat2x2) < sizeof(glm::i16mat2x2) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat2x2) < sizeof(glm::i32mat2x2) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat2x2) < sizeof(glm::i64mat2x2) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_int2x3_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat2x3) == 6, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat2x3) == 12, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat2x3) == 24, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat2x3) == 48, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat2x3) < sizeof(glm::i16mat2x3) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat2x3) < sizeof(glm::i32mat2x3) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat2x3) < sizeof(glm::i64mat2x3) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_int2x4_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat2x4) == 8, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat2x4) == 16, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat2x4) == 32, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat2x4) == 64, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat2x4) < sizeof(glm::i16mat2x4) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat2x4) < sizeof(glm::i32mat2x4) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat2x4) < sizeof(glm::i64mat2x4) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_int3x2_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat3x2) == 6, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat3x2) == 12, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat3x2) == 24, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat3x2) == 48, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat3x2) < sizeof(glm::i16mat3x2) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat3x2) < sizeof(glm::i32mat3x2) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat3x2) < sizeof(glm::i64mat3x2) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_int3x3_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat3x3) == 9, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat3x3) == 18, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat3x3) == 36, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat3x3) == 72, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat3x3) < sizeof(glm::i16mat3x3) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat3x3) < sizeof(glm::i32mat3x3) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat3x3) < sizeof(glm::i64mat3x3) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_int3x4_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat3x4) == 12, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat3x4) == 24, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat3x4) == 48, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat3x4) == 96, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat3x4) < sizeof(glm::i16mat3x4) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat3x4) < sizeof(glm::i32mat3x4) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat3x4) < sizeof(glm::i64mat3x4) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_int4x2_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat4x2) == 8, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat4x2) == 16, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat4x2) == 32, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat4x2) == 64, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat4x2) < sizeof(glm::i16mat4x2) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat4x2) < sizeof(glm::i32mat4x2) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat4x2) < sizeof(glm::i64mat4x2) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_int4x3_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat4x3) == 12, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat4x3) == 24, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat4x3) == 48, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat4x3) == 96, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat4x3) < sizeof(glm::i16mat4x3) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat4x3) < sizeof(glm::i32mat4x3) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat4x3) < sizeof(glm::i64mat4x3) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_int4x4_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8mat4x4) == 16, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16mat4x4) == 32, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32mat4x4) == 64, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64mat4x4) == 128, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8mat4x4) < sizeof(glm::i16mat4x4) ? 0 : 1; | |
14 | Error += sizeof(glm::i16mat4x4) < sizeof(glm::i32mat4x4) ? 0 : 1; | |
15 | Error += sizeof(glm::i32mat4x4) < sizeof(glm::i64mat4x4) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint2x2_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat2x2) == 4, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat2x2) == 8, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat2x2) == 16, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat2x2) == 32, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat2x2) < sizeof(glm::u16mat2x2) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat2x2) < sizeof(glm::u32mat2x2) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat2x2) < sizeof(glm::u64mat2x2) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint2x3_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat2x3) == 6, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat2x3) == 12, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat2x3) == 24, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat2x3) == 48, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat2x3) < sizeof(glm::u16mat2x3) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat2x3) < sizeof(glm::u32mat2x3) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat2x3) < sizeof(glm::u64mat2x3) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint2x4_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat2x4) == 8, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat2x4) == 16, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat2x4) == 32, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat2x4) == 64, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat2x4) < sizeof(glm::u16mat2x4) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat2x4) < sizeof(glm::u32mat2x4) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat2x4) < sizeof(glm::u64mat2x4) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint3x2_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat3x2) == 6, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat3x2) == 12, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat3x2) == 24, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat3x2) == 48, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat3x2) < sizeof(glm::u16mat3x2) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat3x2) < sizeof(glm::u32mat3x2) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat3x2) < sizeof(glm::u64mat3x2) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint3x3_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat3x3) == 9, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat3x3) == 18, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat3x3) == 36, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat3x3) == 72, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat3x3) < sizeof(glm::u16mat3x3) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat3x3) < sizeof(glm::u32mat3x3) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat3x3) < sizeof(glm::u64mat3x3) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint3x4_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat3x4) == 12, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat3x4) == 24, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat3x4) == 48, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat3x4) == 96, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat3x4) < sizeof(glm::u16mat3x4) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat3x4) < sizeof(glm::u32mat3x4) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat3x4) < sizeof(glm::u64mat3x4) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint4x2_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat4x2) == 8, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat4x2) == 16, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat4x2) == 32, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat4x2) == 64, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat4x2) < sizeof(glm::u16mat4x2) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat4x2) < sizeof(glm::u32mat4x2) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat4x2) < sizeof(glm::u64mat4x2) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint4x3_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat4x3) == 12, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat4x3) == 24, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat4x3) == 48, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat4x3) == 96, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat4x3) < sizeof(glm::u16mat4x3) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat4x3) < sizeof(glm::u32mat4x3) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat4x3) < sizeof(glm::u64mat4x3) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | #include <glm/ext/matrix_uint4x4_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8mat4x4) == 16, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16mat4x4) == 32, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32mat4x4) == 64, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64mat4x4) == 128, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_comp() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8mat4x4) < sizeof(glm::u16mat4x4) ? 0 : 1; | |
14 | Error += sizeof(glm::u16mat4x4) < sizeof(glm::u32mat4x4) ? 0 : 1; | |
15 | Error += sizeof(glm::u32mat4x4) < sizeof(glm::u64mat4x4) ? 0 : 1; | |
16 | ||
17 | return Error; | |
18 | } | |
19 | ||
20 | int main() | |
21 | { | |
22 | int Error = 0; | |
23 | ||
24 | Error += test_comp(); | |
25 | ||
26 | return Error; | |
27 | } |
182 | 182 | return Error; |
183 | 183 | } |
184 | 184 | |
185 | static int test_clamp() | |
186 | { | |
187 | int Error = 0; | |
188 | ||
189 | float A = glm::clamp(0.5f); | |
190 | Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; | |
191 | ||
192 | float B = glm::clamp(0.0f); | |
193 | Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; | |
194 | ||
195 | float C = glm::clamp(1.0f); | |
196 | Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1; | |
197 | ||
198 | float D = glm::clamp(-0.5f); | |
199 | Error += glm::equal(D, 0.0f, 0.00001f) ? 0 : 1; | |
200 | ||
201 | float E = glm::clamp(1.5f); | |
202 | Error += glm::equal(E, 1.0f, 0.00001f) ? 0 : 1; | |
203 | ||
204 | return Error; | |
205 | } | |
206 | ||
207 | static int test_repeat() | |
208 | { | |
209 | int Error = 0; | |
210 | ||
211 | float A = glm::repeat(0.5f); | |
212 | Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; | |
213 | ||
214 | float B = glm::repeat(0.0f); | |
215 | Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; | |
216 | ||
217 | float C = glm::repeat(1.0f); | |
218 | Error += glm::equal(C, 0.0f, 0.00001f) ? 0 : 1; | |
219 | ||
220 | float D = glm::repeat(-0.5f); | |
221 | Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; | |
222 | ||
223 | float E = glm::repeat(1.5f); | |
224 | Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; | |
225 | ||
226 | float F = glm::repeat(0.9f); | |
227 | Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; | |
228 | ||
229 | return Error; | |
230 | } | |
231 | ||
232 | static int test_mirrorClamp() | |
233 | { | |
234 | int Error = 0; | |
235 | ||
236 | float A = glm::mirrorClamp(0.5f); | |
237 | Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; | |
238 | ||
239 | float B = glm::mirrorClamp(0.0f); | |
240 | Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; | |
241 | ||
242 | float C = glm::mirrorClamp(1.1f); | |
243 | Error += glm::equal(C, 0.1f, 0.00001f) ? 0 : 1; | |
244 | ||
245 | float D = glm::mirrorClamp(-0.5f); | |
246 | Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; | |
247 | ||
248 | float E = glm::mirrorClamp(1.5f); | |
249 | Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; | |
250 | ||
251 | float F = glm::mirrorClamp(0.9f); | |
252 | Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; | |
253 | ||
254 | float G = glm::mirrorClamp(3.1f); | |
255 | Error += glm::equal(G, 0.1f, 0.00001f) ? 0 : 1; | |
256 | ||
257 | float H = glm::mirrorClamp(-3.1f); | |
258 | Error += glm::equal(H, 0.1f, 0.00001f) ? 0 : 1; | |
259 | ||
260 | float I = glm::mirrorClamp(-0.9f); | |
261 | Error += glm::equal(I, 0.9f, 0.00001f) ? 0 : 1; | |
262 | ||
263 | return Error; | |
264 | } | |
265 | ||
266 | static int test_mirrorRepeat() | |
267 | { | |
268 | int Error = 0; | |
269 | ||
270 | float A = glm::mirrorRepeat(0.5f); | |
271 | Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; | |
272 | ||
273 | float B = glm::mirrorRepeat(0.0f); | |
274 | Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; | |
275 | ||
276 | float C = glm::mirrorRepeat(1.0f); | |
277 | Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1; | |
278 | ||
279 | float D = glm::mirrorRepeat(-0.5f); | |
280 | Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; | |
281 | ||
282 | float E = glm::mirrorRepeat(1.5f); | |
283 | Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; | |
284 | ||
285 | float F = glm::mirrorRepeat(0.9f); | |
286 | Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; | |
287 | ||
288 | float G = glm::mirrorRepeat(3.0f); | |
289 | Error += glm::equal(G, 1.0f, 0.00001f) ? 0 : 1; | |
290 | ||
291 | float H = glm::mirrorRepeat(-3.0f); | |
292 | Error += glm::equal(H, 1.0f, 0.00001f) ? 0 : 1; | |
293 | ||
294 | float I = glm::mirrorRepeat(-1.0f); | |
295 | Error += glm::equal(I, 1.0f, 0.00001f) ? 0 : 1; | |
296 | ||
297 | return Error; | |
298 | } | |
299 | ||
185 | 300 | int main() |
186 | 301 | { |
187 | 302 | int Error = 0; |
202 | 317 | Error += test_fmax<float>(); |
203 | 318 | Error += test_fmax<double>(); |
204 | 319 | |
205 | return Error; | |
206 | } | |
320 | Error += test_clamp(); | |
321 | Error += test_repeat(); | |
322 | Error += test_mirrorClamp(); | |
323 | Error += test_mirrorRepeat(); | |
324 | ||
325 | return Error; | |
326 | } |
0 | #include <glm/ext/scalar_packing.hpp> | |
1 | #include <glm/ext/scalar_relational.hpp> | |
2 | ||
3 | int test_packUnorm() | |
4 | { | |
5 | int Error = 0; | |
6 | ||
7 | ||
8 | return Error; | |
9 | } | |
10 | ||
11 | int test_packSnorm() | |
12 | { | |
13 | int Error = 0; | |
14 | ||
15 | ||
16 | return Error; | |
17 | } | |
18 | ||
19 | int main() | |
20 | { | |
21 | int Error = 0; | |
22 | ||
23 | Error += test_packUnorm(); | |
24 | Error += test_packSnorm(); | |
25 | ||
26 | return Error; | |
27 | } |
0 | 0 | #include <glm/ext/vector_common.hpp> |
1 | ||
1 | 2 | #include <glm/ext/vector_bool1.hpp> |
2 | 3 | #include <glm/ext/vector_bool1_precision.hpp> |
3 | 4 | #include <glm/ext/vector_bool2.hpp> |
225 | 226 | return Error; |
226 | 227 | } |
227 | 228 | |
229 | static int test_clamp() | |
230 | { | |
231 | int Error = 0; | |
232 | ||
233 | glm::vec2 K = glm::clamp(glm::vec2(0.5f)); | |
234 | Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
235 | ||
236 | glm::vec3 L = glm::clamp(glm::vec3(0.5f)); | |
237 | Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
238 | ||
239 | glm::vec4 M = glm::clamp(glm::vec4(0.5f)); | |
240 | Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
241 | ||
242 | glm::vec1 N = glm::clamp(glm::vec1(0.5f)); | |
243 | Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
244 | ||
245 | return Error; | |
246 | } | |
247 | ||
248 | static int test_repeat() | |
249 | { | |
250 | int Error = 0; | |
251 | ||
252 | glm::vec2 K = glm::repeat(glm::vec2(0.5f)); | |
253 | Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
254 | ||
255 | glm::vec3 L = glm::repeat(glm::vec3(0.5f)); | |
256 | Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
257 | ||
258 | glm::vec4 M = glm::repeat(glm::vec4(0.5f)); | |
259 | Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
260 | ||
261 | glm::vec1 N = glm::repeat(glm::vec1(0.5f)); | |
262 | Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
263 | ||
264 | return Error; | |
265 | } | |
266 | ||
267 | static int test_mirrorClamp() | |
268 | { | |
269 | int Error = 0; | |
270 | ||
271 | glm::vec2 K = glm::mirrorClamp(glm::vec2(0.5f)); | |
272 | Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
273 | ||
274 | glm::vec3 L = glm::mirrorClamp(glm::vec3(0.5f)); | |
275 | Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
276 | ||
277 | glm::vec4 M = glm::mirrorClamp(glm::vec4(0.5f)); | |
278 | Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
279 | ||
280 | glm::vec1 N = glm::mirrorClamp(glm::vec1(0.5f)); | |
281 | Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
282 | ||
283 | return Error; | |
284 | } | |
285 | ||
286 | static int test_mirrorRepeat() | |
287 | { | |
288 | int Error = 0; | |
289 | ||
290 | glm::vec2 K = glm::mirrorRepeat(glm::vec2(0.5f)); | |
291 | Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
292 | ||
293 | glm::vec3 L = glm::mirrorRepeat(glm::vec3(0.5f)); | |
294 | Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
295 | ||
296 | glm::vec4 M = glm::mirrorRepeat(glm::vec4(0.5f)); | |
297 | Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
298 | ||
299 | glm::vec1 N = glm::mirrorRepeat(glm::vec1(0.5f)); | |
300 | Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
301 | ||
302 | return Error; | |
303 | } | |
304 | ||
228 | 305 | int main() |
229 | 306 | { |
230 | 307 | int Error = 0; |
245 | 322 | Error += test_fmax<glm::vec3>(); |
246 | 323 | Error += test_fmax<glm::vec2>(); |
247 | 324 | |
248 | return Error; | |
249 | } | |
325 | Error += test_clamp(); | |
326 | Error += test_repeat(); | |
327 | Error += test_mirrorClamp(); | |
328 | Error += test_mirrorRepeat(); | |
329 | ||
330 | return Error; | |
331 | } |
0 | #include <glm/ext/vector_int1_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8vec1) == 1, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16vec1) == 2, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32vec1) == 4, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64vec1) == 8, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_size() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8vec1) == 1 ? 0 : 1; | |
14 | Error += sizeof(glm::i16vec1) == 2 ? 0 : 1; | |
15 | Error += sizeof(glm::i32vec1) == 4 ? 0 : 1; | |
16 | Error += sizeof(glm::i64vec1) == 8 ? 0 : 1; | |
17 | ||
18 | return Error; | |
19 | } | |
20 | ||
21 | static int test_comp() | |
22 | { | |
23 | int Error = 0; | |
24 | ||
25 | Error += sizeof(glm::i8vec1) < sizeof(glm::i16vec1) ? 0 : 1; | |
26 | Error += sizeof(glm::i16vec1) < sizeof(glm::i32vec1) ? 0 : 1; | |
27 | Error += sizeof(glm::i32vec1) < sizeof(glm::i64vec1) ? 0 : 1; | |
28 | ||
29 | return Error; | |
30 | } | |
31 | ||
32 | int main() | |
33 | { | |
34 | int Error = 0; | |
35 | ||
36 | Error += test_size(); | |
37 | Error += test_comp(); | |
38 | ||
39 | return Error; | |
40 | } |
0 | #include <glm/ext/vector_int2_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8vec2) == 2, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16vec2) == 4, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32vec2) == 8, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64vec2) == 16, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_size() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8vec2) == 2 ? 0 : 1; | |
14 | Error += sizeof(glm::i16vec2) == 4 ? 0 : 1; | |
15 | Error += sizeof(glm::i32vec2) == 8 ? 0 : 1; | |
16 | Error += sizeof(glm::i64vec2) == 16 ? 0 : 1; | |
17 | ||
18 | return Error; | |
19 | } | |
20 | ||
21 | static int test_comp() | |
22 | { | |
23 | int Error = 0; | |
24 | ||
25 | Error += sizeof(glm::i8vec2) < sizeof(glm::i16vec2) ? 0 : 1; | |
26 | Error += sizeof(glm::i16vec2) < sizeof(glm::i32vec2) ? 0 : 1; | |
27 | Error += sizeof(glm::i32vec2) < sizeof(glm::i64vec2) ? 0 : 1; | |
28 | ||
29 | return Error; | |
30 | } | |
31 | ||
32 | int main() | |
33 | { | |
34 | int Error = 0; | |
35 | ||
36 | Error += test_size(); | |
37 | Error += test_comp(); | |
38 | ||
39 | return Error; | |
40 | } |
0 | #include <glm/ext/vector_int3_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8vec3) == 3, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16vec3) == 6, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32vec3) == 12, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64vec3) == 24, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_size() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8vec3) == 3 ? 0 : 1; | |
14 | Error += sizeof(glm::i16vec3) == 6 ? 0 : 1; | |
15 | Error += sizeof(glm::i32vec3) == 12 ? 0 : 1; | |
16 | Error += sizeof(glm::i64vec3) == 24 ? 0 : 1; | |
17 | ||
18 | return Error; | |
19 | } | |
20 | ||
21 | static int test_comp() | |
22 | { | |
23 | int Error = 0; | |
24 | ||
25 | Error += sizeof(glm::i8vec3) < sizeof(glm::i16vec3) ? 0 : 1; | |
26 | Error += sizeof(glm::i16vec3) < sizeof(glm::i32vec3) ? 0 : 1; | |
27 | Error += sizeof(glm::i32vec3) < sizeof(glm::i64vec3) ? 0 : 1; | |
28 | ||
29 | return Error; | |
30 | } | |
31 | ||
32 | int main() | |
33 | { | |
34 | int Error = 0; | |
35 | ||
36 | Error += test_size(); | |
37 | Error += test_comp(); | |
38 | ||
39 | return Error; | |
40 | } |
0 | #include <glm/ext/vector_int4_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::i8vec4) == 4, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::i16vec4) == 8, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::i32vec4) == 16, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::i64vec4) == 32, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_size() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::i8vec4) == 4 ? 0 : 1; | |
14 | Error += sizeof(glm::i16vec4) == 8 ? 0 : 1; | |
15 | Error += sizeof(glm::i32vec4) == 16 ? 0 : 1; | |
16 | Error += sizeof(glm::i64vec4) == 32 ? 0 : 1; | |
17 | ||
18 | return Error; | |
19 | } | |
20 | ||
21 | static int test_comp() | |
22 | { | |
23 | int Error = 0; | |
24 | ||
25 | Error += sizeof(glm::i8vec4) < sizeof(glm::i16vec4) ? 0 : 1; | |
26 | Error += sizeof(glm::i16vec4) < sizeof(glm::i32vec4) ? 0 : 1; | |
27 | Error += sizeof(glm::i32vec4) < sizeof(glm::i64vec4) ? 0 : 1; | |
28 | ||
29 | return Error; | |
30 | } | |
31 | ||
32 | int main() | |
33 | { | |
34 | int Error = 0; | |
35 | ||
36 | Error += test_size(); | |
37 | Error += test_comp(); | |
38 | ||
39 | return Error; | |
40 | } |
0 | 0 | #include <glm/ext/vector_integer.hpp> |
1 | 1 | #include <glm/ext/vector_int1.hpp> |
2 | #include <glm/ext/vector_int1_precision.hpp> | |
2 | #include <glm/ext/vector_int1_sized.hpp> | |
3 | 3 | #include <glm/ext/vector_uint1.hpp> |
4 | #include <glm/ext/vector_uint1_precision.hpp> | |
4 | #include <glm/ext/vector_uint1_sized.hpp> | |
5 | 5 | |
6 | 6 | template <typename genType> |
7 | 7 | static int test_operators() |
152 | 152 | int Error = 0; |
153 | 153 | |
154 | 154 | Error += test_operators<glm::ivec1>(); |
155 | Error += test_operators<glm::lowp_ivec1>(); | |
156 | Error += test_operators<glm::mediump_ivec1>(); | |
157 | Error += test_operators<glm::highp_ivec1>(); | |
155 | Error += test_operators<glm::i8vec1>(); | |
156 | Error += test_operators<glm::i16vec1>(); | |
157 | Error += test_operators<glm::i32vec1>(); | |
158 | Error += test_operators<glm::i64vec1>(); | |
158 | 159 | |
159 | 160 | Error += test_ctor<glm::ivec1>(); |
160 | Error += test_ctor<glm::lowp_ivec1>(); | |
161 | Error += test_ctor<glm::mediump_ivec1>(); | |
162 | Error += test_ctor<glm::highp_ivec1>(); | |
161 | Error += test_ctor<glm::i8vec1>(); | |
162 | Error += test_ctor<glm::i16vec1>(); | |
163 | Error += test_ctor<glm::i32vec1>(); | |
164 | Error += test_ctor<glm::i64vec1>(); | |
163 | 165 | |
164 | 166 | Error += test_size<glm::ivec1>(); |
165 | Error += test_size<glm::lowp_ivec1>(); | |
166 | Error += test_size<glm::mediump_ivec1>(); | |
167 | Error += test_size<glm::highp_ivec1>(); | |
167 | Error += test_size<glm::i8vec1>(); | |
168 | Error += test_size<glm::i16vec1>(); | |
169 | Error += test_size<glm::i32vec1>(); | |
170 | Error += test_size<glm::i64vec1>(); | |
168 | 171 | |
169 | 172 | Error += test_relational<glm::ivec1>(); |
170 | Error += test_relational<glm::lowp_ivec1>(); | |
171 | Error += test_relational<glm::mediump_ivec1>(); | |
172 | Error += test_relational<glm::highp_ivec1>(); | |
173 | Error += test_relational<glm::i8vec1>(); | |
174 | Error += test_relational<glm::i16vec1>(); | |
175 | Error += test_relational<glm::i32vec1>(); | |
176 | Error += test_relational<glm::i64vec1>(); | |
173 | 177 | |
174 | 178 | Error += test_constexpr<glm::ivec1>(); |
175 | Error += test_constexpr<glm::lowp_ivec1>(); | |
176 | Error += test_constexpr<glm::mediump_ivec1>(); | |
177 | Error += test_constexpr<glm::highp_ivec1>(); | |
179 | Error += test_constexpr<glm::i8vec1>(); | |
180 | Error += test_constexpr<glm::i16vec1>(); | |
181 | Error += test_constexpr<glm::i32vec1>(); | |
182 | Error += test_constexpr<glm::i64vec1>(); | |
178 | 183 | |
179 | 184 | Error += test_operators<glm::uvec1>(); |
180 | Error += test_operators<glm::lowp_uvec1>(); | |
181 | Error += test_operators<glm::mediump_uvec1>(); | |
182 | Error += test_operators<glm::highp_uvec1>(); | |
185 | Error += test_operators<glm::u8vec1>(); | |
186 | Error += test_operators<glm::u16vec1>(); | |
187 | Error += test_operators<glm::u32vec1>(); | |
188 | Error += test_operators<glm::u64vec1>(); | |
183 | 189 | |
184 | 190 | Error += test_ctor<glm::uvec1>(); |
185 | Error += test_ctor<glm::lowp_uvec1>(); | |
186 | Error += test_ctor<glm::mediump_uvec1>(); | |
187 | Error += test_ctor<glm::highp_uvec1>(); | |
191 | Error += test_ctor<glm::u8vec1>(); | |
192 | Error += test_ctor<glm::u16vec1>(); | |
193 | Error += test_ctor<glm::u32vec1>(); | |
194 | Error += test_ctor<glm::u64vec1>(); | |
188 | 195 | |
189 | 196 | Error += test_size<glm::uvec1>(); |
190 | Error += test_size<glm::lowp_uvec1>(); | |
191 | Error += test_size<glm::mediump_uvec1>(); | |
192 | Error += test_size<glm::highp_uvec1>(); | |
197 | Error += test_size<glm::u8vec1>(); | |
198 | Error += test_size<glm::u16vec1>(); | |
199 | Error += test_size<glm::u32vec1>(); | |
200 | Error += test_size<glm::u64vec1>(); | |
193 | 201 | |
194 | 202 | Error += test_relational<glm::uvec1>(); |
195 | Error += test_relational<glm::lowp_uvec1>(); | |
196 | Error += test_relational<glm::mediump_uvec1>(); | |
197 | Error += test_relational<glm::highp_uvec1>(); | |
203 | Error += test_relational<glm::u8vec1>(); | |
204 | Error += test_relational<glm::u16vec1>(); | |
205 | Error += test_relational<glm::u32vec1>(); | |
206 | Error += test_relational<glm::u64vec1>(); | |
198 | 207 | |
199 | 208 | Error += test_constexpr<glm::uvec1>(); |
200 | Error += test_constexpr<glm::lowp_uvec1>(); | |
201 | Error += test_constexpr<glm::mediump_uvec1>(); | |
202 | Error += test_constexpr<glm::highp_uvec1>(); | |
203 | ||
204 | return Error; | |
205 | } | |
209 | Error += test_constexpr<glm::u8vec1>(); | |
210 | Error += test_constexpr<glm::u16vec1>(); | |
211 | Error += test_constexpr<glm::u32vec1>(); | |
212 | Error += test_constexpr<glm::u64vec1>(); | |
213 | ||
214 | return Error; | |
215 | } |
0 | #include <glm/ext/vector_packing.hpp> | |
1 | #include <glm/ext/vector_relational.hpp> | |
2 | #include <glm/ext/vector_uint2_sized.hpp> | |
3 | #include <glm/ext/vector_int2_sized.hpp> | |
4 | #include <glm/gtc/packing.hpp> | |
5 | #include <glm/vec2.hpp> | |
6 | #include <vector> | |
7 | ||
8 | int test_packUnorm() | |
9 | { | |
10 | int Error = 0; | |
11 | ||
12 | std::vector<glm::vec2> A; | |
13 | A.push_back(glm::vec2(1.0f, 0.7f)); | |
14 | A.push_back(glm::vec2(0.5f, 0.1f)); | |
15 | ||
16 | for (std::size_t i = 0; i < A.size(); ++i) | |
17 | { | |
18 | glm::vec2 B(A[i]); | |
19 | glm::u16vec2 C = glm::packUnorm<glm::uint16>(B); | |
20 | glm::vec2 D = glm::unpackUnorm<float>(C); | |
21 | Error += glm::all(glm::equal(B, D, 1.0f / 255.f)) ? 0 : 1; | |
22 | assert(!Error); | |
23 | } | |
24 | ||
25 | return Error; | |
26 | } | |
27 | ||
28 | int test_packSnorm() | |
29 | { | |
30 | int Error = 0; | |
31 | ||
32 | std::vector<glm::vec2> A; | |
33 | A.push_back(glm::vec2(1.0f, 0.0f)); | |
34 | A.push_back(glm::vec2(-0.5f, -0.7f)); | |
35 | A.push_back(glm::vec2(-0.1f, 0.1f)); | |
36 | ||
37 | for (std::size_t i = 0; i < A.size(); ++i) | |
38 | { | |
39 | glm::vec2 B(A[i]); | |
40 | glm::i16vec2 C = glm::packSnorm<glm::int16>(B); | |
41 | glm::vec2 D = glm::unpackSnorm<float>(C); | |
42 | Error += glm::all(glm::equal(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1; | |
43 | assert(!Error); | |
44 | } | |
45 | ||
46 | return Error; | |
47 | } | |
48 | ||
49 | int main() | |
50 | { | |
51 | int Error = 0; | |
52 | ||
53 | Error += test_packUnorm(); | |
54 | Error += test_packSnorm(); | |
55 | ||
56 | return Error; | |
57 | } |
0 | #include <glm/ext/vector_uint1_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_size() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8vec1) == 1 ? 0 : 1; | |
14 | Error += sizeof(glm::u16vec1) == 2 ? 0 : 1; | |
15 | Error += sizeof(glm::u32vec1) == 4 ? 0 : 1; | |
16 | Error += sizeof(glm::u64vec1) == 8 ? 0 : 1; | |
17 | ||
18 | return Error; | |
19 | } | |
20 | ||
21 | static int test_comp() | |
22 | { | |
23 | int Error = 0; | |
24 | ||
25 | Error += sizeof(glm::u8vec1) < sizeof(glm::u16vec1) ? 0 : 1; | |
26 | Error += sizeof(glm::u16vec1) < sizeof(glm::u32vec1) ? 0 : 1; | |
27 | Error += sizeof(glm::u32vec1) < sizeof(glm::u64vec1) ? 0 : 1; | |
28 | ||
29 | return Error; | |
30 | } | |
31 | ||
32 | int main() | |
33 | { | |
34 | int Error = 0; | |
35 | ||
36 | Error += test_size(); | |
37 | Error += test_comp(); | |
38 | ||
39 | return Error; | |
40 | } |
0 | #include <glm/ext/vector_uint2_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8vec2) == 2, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16vec2) == 4, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32vec2) == 8, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64vec2) == 16, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_size() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8vec2) == 2 ? 0 : 1; | |
14 | Error += sizeof(glm::u16vec2) == 4 ? 0 : 1; | |
15 | Error += sizeof(glm::u32vec2) == 8 ? 0 : 1; | |
16 | Error += sizeof(glm::u64vec2) == 16 ? 0 : 1; | |
17 | ||
18 | return Error; | |
19 | } | |
20 | ||
21 | static int test_comp() | |
22 | { | |
23 | int Error = 0; | |
24 | ||
25 | Error += sizeof(glm::u8vec2) < sizeof(glm::u16vec2) ? 0 : 1; | |
26 | Error += sizeof(glm::u16vec2) < sizeof(glm::u32vec2) ? 0 : 1; | |
27 | Error += sizeof(glm::u32vec2) < sizeof(glm::u64vec2) ? 0 : 1; | |
28 | ||
29 | return Error; | |
30 | } | |
31 | ||
32 | int main() | |
33 | { | |
34 | int Error = 0; | |
35 | ||
36 | Error += test_size(); | |
37 | Error += test_comp(); | |
38 | ||
39 | return Error; | |
40 | } |
0 | #include <glm/ext/vector_uint3_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8vec3) == 3, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16vec3) == 6, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32vec3) == 12, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64vec3) == 24, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_size() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8vec3) == 3 ? 0 : 1; | |
14 | Error += sizeof(glm::u16vec3) == 6 ? 0 : 1; | |
15 | Error += sizeof(glm::u32vec3) == 12 ? 0 : 1; | |
16 | Error += sizeof(glm::u64vec3) == 24 ? 0 : 1; | |
17 | ||
18 | return Error; | |
19 | } | |
20 | ||
21 | static int test_comp() | |
22 | { | |
23 | int Error = 0; | |
24 | ||
25 | Error += sizeof(glm::u8vec3) < sizeof(glm::u16vec3) ? 0 : 1; | |
26 | Error += sizeof(glm::u16vec3) < sizeof(glm::u32vec3) ? 0 : 1; | |
27 | Error += sizeof(glm::u32vec3) < sizeof(glm::u64vec3) ? 0 : 1; | |
28 | ||
29 | return Error; | |
30 | } | |
31 | ||
32 | int main() | |
33 | { | |
34 | int Error = 0; | |
35 | ||
36 | Error += test_size(); | |
37 | Error += test_comp(); | |
38 | ||
39 | return Error; | |
40 | } |
0 | #include <glm/ext/vector_uint4_sized.hpp> | |
1 | ||
2 | #if GLM_HAS_STATIC_ASSERT | |
3 | static_assert(sizeof(glm::u8vec4) == 4, "int8 size isn't 1 byte on this platform"); | |
4 | static_assert(sizeof(glm::u16vec4) == 8, "int16 size isn't 2 bytes on this platform"); | |
5 | static_assert(sizeof(glm::u32vec4) == 16, "int32 size isn't 4 bytes on this platform"); | |
6 | static_assert(sizeof(glm::u64vec4) == 32, "int64 size isn't 8 bytes on this platform"); | |
7 | #endif | |
8 | ||
9 | static int test_size() | |
10 | { | |
11 | int Error = 0; | |
12 | ||
13 | Error += sizeof(glm::u8vec4) == 4 ? 0 : 1; | |
14 | Error += sizeof(glm::u16vec4) == 8 ? 0 : 1; | |
15 | Error += sizeof(glm::u32vec4) == 16 ? 0 : 1; | |
16 | Error += sizeof(glm::u64vec4) == 32 ? 0 : 1; | |
17 | ||
18 | return Error; | |
19 | } | |
20 | ||
21 | static int test_comp() | |
22 | { | |
23 | int Error = 0; | |
24 | ||
25 | Error += sizeof(glm::u8vec4) < sizeof(glm::u16vec4) ? 0 : 1; | |
26 | Error += sizeof(glm::u16vec4) < sizeof(glm::u32vec4) ? 0 : 1; | |
27 | Error += sizeof(glm::u32vec4) < sizeof(glm::u64vec4) ? 0 : 1; | |
28 | ||
29 | return Error; | |
30 | } | |
31 | ||
32 | int main() | |
33 | { | |
34 | int Error = 0; | |
35 | ||
36 | Error += test_size(); | |
37 | Error += test_comp(); | |
38 | ||
39 | return Error; | |
40 | } |
193 | 193 | return Error; |
194 | 194 | } |
195 | 195 | |
196 | int test_quat_slerp_spins() | |
197 | { | |
198 | int Error = 0; | |
199 | ||
200 | float const Epsilon = 0.0001f;//glm::epsilon<float>(); | |
201 | ||
202 | float sqrt2 = std::sqrt(2.0f) / 2.0f; | |
203 | glm::quat id(static_cast<float>(1), static_cast<float>(0), static_cast<float>(0), static_cast<float>(0)); | |
204 | glm::quat Y90rot(sqrt2, 0.0f, sqrt2, 0.0f); | |
205 | glm::quat Y180rot(0.0f, 0.0f, 1.0f, 0.0f); | |
206 | ||
207 | // Testing a == 0, k == 1 | |
208 | // Must be id | |
209 | glm::quat id2 = glm::slerp(id, id, 1.0f, 1); | |
210 | Error += glm::all(glm::equal(id, id2, Epsilon)) ? 0 : 1; | |
211 | ||
212 | // Testing a == 1, k == 2 | |
213 | // Must be id | |
214 | glm::quat id3 = glm::slerp(id, id, 1.0f, 2); | |
215 | Error += glm::all(glm::equal(id, id3, Epsilon)) ? 0 : 1; | |
216 | ||
217 | // Testing a == 1, k == 1 | |
218 | // Must be 90° rotation on Y : 0 0.7 0 0.7 | |
219 | // Negative quaternion is representing same orientation | |
220 | glm::quat Y90rot2 = glm::slerp(id, Y90rot, 1.0f, 1); | |
221 | Error += glm::all(glm::equal(Y90rot, -Y90rot2, Epsilon)) ? 0 : 1; | |
222 | ||
223 | // Testing a == 1, k == 2 | |
224 | // Must be id | |
225 | glm::quat Y90rot3 = glm::slerp(id, Y90rot, 8.0f / 9.0f, 2); | |
226 | Error += glm::all(glm::equal(id, Y90rot3, Epsilon)) ? 0 : 1; | |
227 | ||
228 | // Testing a == 1, k == 1 | |
229 | // Must be 90° rotation on Y : 0 0.7 0 0.7 | |
230 | glm::quat Y90rot4 = glm::slerp(id, Y90rot, 0.2f, 1); | |
231 | Error += glm::all(glm::equal(Y90rot, Y90rot4, Epsilon)) ? 0 : 1; | |
232 | ||
233 | // Testing reverse case | |
234 | // Must be 45° rotation on Y : 0 0.38 0 0.92 | |
235 | // Negative quaternion is representing same orientation | |
236 | glm::quat Ym45rot2 = glm::slerp(Y90rot, id, 0.9f, 1); | |
237 | glm::quat Ym45rot3 = glm::slerp(Y90rot, id, 0.5f); | |
238 | Error += glm::all(glm::equal(-Ym45rot2, Ym45rot3, Epsilon)) ? 0 : 1; | |
239 | ||
240 | // Testing against full circle around the sphere instead of shortest path | |
241 | // Must be 45° rotation on Y | |
242 | // certainly not a 135° rotation | |
243 | glm::quat Y45rot3 = glm::slerp(id, -Y90rot, 0.5f, 0); | |
244 | float Y45angle3 = glm::angle(Y45rot3); | |
245 | Error += glm::equal(Y45angle3, glm::pi<float>() * 0.25f, Epsilon) ? 0 : 1; | |
246 | Error += glm::all(glm::equal(Ym45rot3, Y45rot3, Epsilon)) ? 0 : 1; | |
247 | ||
248 | // Same, but inverted | |
249 | // Must also be 45° rotation on Y : 0 0.38 0 0.92 | |
250 | // -0 -0.38 -0 -0.92 is ok too | |
251 | glm::quat Y45rot4 = glm::slerp(-Y90rot, id, 0.5f, 0); | |
252 | Error += glm::all(glm::equal(Ym45rot2, Y45rot4, Epsilon)) ? 0 : 1; | |
253 | ||
254 | // Testing q1 = q2 k == 2 | |
255 | // Must be 90° rotation on Y : 0 0.7 0 0.7 | |
256 | glm::quat Y90rot5 = glm::slerp(Y90rot, Y90rot, 0.5f, 2); | |
257 | Error += glm::all(glm::equal(Y90rot, Y90rot5, Epsilon)) ? 0 : 1; | |
258 | ||
259 | // Testing 180° rotation | |
260 | // Must be 90° rotation on almost any axis that is on the XZ plane | |
261 | glm::quat XZ90rot = glm::slerp(id, -Y90rot, 0.5f, 1); | |
262 | float XZ90angle = glm::angle(XZ90rot); // Must be PI/4 = 0.78; | |
263 | Error += glm::equal(XZ90angle, glm::pi<float>() * 1.25f, Epsilon) ? 0 : 1; | |
264 | ||
265 | // Testing rotation over long arc | |
266 | // Distance from id to 90° is 270°, so 2/3 of it should be 180° | |
267 | // Negative quaternion is representing same orientation | |
268 | glm::quat Neg90rot = glm::slerp(id, Y90rot, 2.0f / 3.0f, -1); | |
269 | Error += glm::all(glm::equal(Y180rot, -Neg90rot, Epsilon)) ? 0 : 1; | |
270 | ||
271 | return Error; | |
272 | } | |
273 | ||
196 | 274 | static int test_quat_mul_vec() |
197 | 275 | { |
198 | 276 | int Error(0); |
259 | 337 | Error += test_quat_normalize(); |
260 | 338 | Error += test_quat_euler(); |
261 | 339 | Error += test_quat_slerp(); |
340 | Error += test_quat_slerp_spins(); | |
262 | 341 | Error += test_identity(); |
263 | 342 | |
264 | 343 | return Error; |
4 | 4 | #include <vector> |
5 | 5 | #if GLM_HAS_OPENMP |
6 | 6 | # include <omp.h> |
7 | #endif | |
8 | ||
9 | #if GLM_HAS_STATIC_ASSERT | |
10 | static_assert(sizeof(glm::lowp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); | |
11 | static_assert(sizeof(glm::mediump_u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); | |
12 | static_assert(sizeof(glm::highp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); | |
13 | ||
14 | static_assert(sizeof(glm::lowp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); | |
15 | static_assert(sizeof(glm::mediump_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); | |
16 | static_assert(sizeof(glm::highp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); | |
17 | ||
18 | static_assert(sizeof(glm::lowp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); | |
19 | static_assert(sizeof(glm::mediump_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); | |
20 | static_assert(sizeof(glm::highp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); | |
21 | ||
22 | static_assert(sizeof(glm::lowp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); | |
23 | static_assert(sizeof(glm::mediump_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); | |
24 | static_assert(sizeof(glm::highp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); | |
25 | ||
26 | ||
27 | static_assert(sizeof(glm::lowp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); | |
28 | static_assert(sizeof(glm::mediump_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); | |
29 | static_assert(sizeof(glm::highp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); | |
30 | ||
31 | static_assert(sizeof(glm::lowp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); | |
32 | static_assert(sizeof(glm::mediump_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); | |
33 | static_assert(sizeof(glm::highp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); | |
34 | ||
35 | static_assert(sizeof(glm::lowp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); | |
36 | static_assert(sizeof(glm::mediump_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); | |
37 | static_assert(sizeof(glm::highp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); | |
38 | ||
39 | static_assert(sizeof(glm::lowp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); | |
40 | static_assert(sizeof(glm::mediump_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); | |
41 | static_assert(sizeof(glm::highp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); | |
42 | ||
43 | ||
44 | static_assert(sizeof(glm::lowp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); | |
45 | static_assert(sizeof(glm::mediump_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); | |
46 | static_assert(sizeof(glm::highp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); | |
47 | ||
48 | static_assert(sizeof(glm::lowp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); | |
49 | static_assert(sizeof(glm::mediump_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); | |
50 | static_assert(sizeof(glm::highp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); | |
51 | ||
52 | static_assert(sizeof(glm::lowp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); | |
53 | static_assert(sizeof(glm::mediump_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); | |
54 | static_assert(sizeof(glm::highp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); | |
55 | ||
56 | static_assert(sizeof(glm::lowp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); | |
57 | static_assert(sizeof(glm::mediump_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); | |
58 | static_assert(sizeof(glm::highp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); | |
59 | ||
60 | ||
61 | static_assert(sizeof(glm::lowp_u8vec4) == 4, "int8 size isn't 1 byte on this platform"); | |
62 | static_assert(sizeof(glm::mediump_u8vec4) == 4, "int8 size isn't 1 byte on this platform"); | |
63 | static_assert(sizeof(glm::highp_u8vec4) == 4, "int8 size isn't 1 byte on this platform"); | |
64 | ||
65 | static_assert(sizeof(glm::lowp_u16vec4) == 8, "int16 size isn't 2 bytes on this platform"); | |
66 | static_assert(sizeof(glm::mediump_u16vec4) == 8, "int16 size isn't 2 bytes on this platform"); | |
67 | static_assert(sizeof(glm::highp_u16vec4) == 8, "int16 size isn't 2 bytes on this platform"); | |
68 | ||
69 | static_assert(sizeof(glm::lowp_u32vec4) == 16, "int32 size isn't 4 bytes on this platform"); | |
70 | static_assert(sizeof(glm::mediump_u32vec4) == 16, "int32 size isn't 4 bytes on this platform"); | |
71 | static_assert(sizeof(glm::highp_u32vec4) == 16, "int32 size isn't 4 bytes on this platform"); | |
72 | ||
73 | static_assert(sizeof(glm::lowp_u64vec4) == 32, "int64 size isn't 8 bytes on this platform"); | |
74 | static_assert(sizeof(glm::mediump_u64vec4) == 32, "int64 size isn't 8 bytes on this platform"); | |
75 | static_assert(sizeof(glm::highp_u64vec4) == 32, "int64 size isn't 8 bytes on this platform"); | |
76 | ||
77 | ||
78 | static_assert(sizeof(glm::lowp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); | |
79 | static_assert(sizeof(glm::mediump_u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); | |
80 | static_assert(sizeof(glm::highp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); | |
81 | ||
82 | static_assert(sizeof(glm::lowp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); | |
83 | static_assert(sizeof(glm::mediump_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); | |
84 | static_assert(sizeof(glm::highp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); | |
85 | ||
86 | static_assert(sizeof(glm::lowp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); | |
87 | static_assert(sizeof(glm::mediump_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); | |
88 | static_assert(sizeof(glm::highp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); | |
89 | ||
90 | static_assert(sizeof(glm::lowp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); | |
91 | static_assert(sizeof(glm::mediump_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); | |
92 | static_assert(sizeof(glm::highp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); | |
93 | ||
94 | ||
95 | static_assert(sizeof(glm::lowp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); | |
96 | static_assert(sizeof(glm::mediump_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); | |
97 | static_assert(sizeof(glm::highp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform"); | |
98 | ||
99 | static_assert(sizeof(glm::lowp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); | |
100 | static_assert(sizeof(glm::mediump_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); | |
101 | static_assert(sizeof(glm::highp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform"); | |
102 | ||
103 | static_assert(sizeof(glm::lowp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); | |
104 | static_assert(sizeof(glm::mediump_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); | |
105 | static_assert(sizeof(glm::highp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform"); | |
106 | ||
107 | static_assert(sizeof(glm::lowp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); | |
108 | static_assert(sizeof(glm::mediump_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); | |
109 | static_assert(sizeof(glm::highp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform"); | |
110 | ||
111 | ||
112 | static_assert(sizeof(glm::lowp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); | |
113 | static_assert(sizeof(glm::mediump_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); | |
114 | static_assert(sizeof(glm::highp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform"); | |
115 | ||
116 | static_assert(sizeof(glm::lowp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); | |
117 | static_assert(sizeof(glm::mediump_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); | |
118 | static_assert(sizeof(glm::highp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform"); | |
119 | ||
120 | static_assert(sizeof(glm::lowp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); | |
121 | static_assert(sizeof(glm::mediump_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); | |
122 | static_assert(sizeof(glm::highp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform"); | |
123 | ||
124 | static_assert(sizeof(glm::lowp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); | |
125 | static_assert(sizeof(glm::mediump_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); | |
126 | static_assert(sizeof(glm::highp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform"); | |
127 | ||
128 | ||
129 | static_assert(sizeof(glm::lowp_u8vec4) == 4, "uint8 size isn't 1 byte on this platform"); | |
130 | static_assert(sizeof(glm::mediump_u8vec4) == 4, "uint8 size isn't 1 byte on this platform"); | |
131 | static_assert(sizeof(glm::highp_u8vec4) == 4, "uint8 size isn't 1 byte on this platform"); | |
132 | ||
133 | static_assert(sizeof(glm::lowp_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform"); | |
134 | static_assert(sizeof(glm::mediump_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform"); | |
135 | static_assert(sizeof(glm::highp_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform"); | |
136 | ||
137 | static_assert(sizeof(glm::lowp_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform"); | |
138 | static_assert(sizeof(glm::mediump_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform"); | |
139 | static_assert(sizeof(glm::highp_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform"); | |
140 | ||
141 | static_assert(sizeof(glm::lowp_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform"); | |
142 | static_assert(sizeof(glm::mediump_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform"); | |
143 | static_assert(sizeof(glm::highp_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform"); | |
144 | ||
7 | 145 | #endif |
8 | 146 | |
9 | 147 | static int test_scalar_size() |
0 | 0 | #define GLM_ENABLE_EXPERIMENTAL |
1 | 1 | #include <glm/gtx/wrap.hpp> |
2 | #include <glm/gtc/epsilon.hpp> | |
2 | #include <glm/ext/scalar_relational.hpp> | |
3 | #include <glm/ext/vector_relational.hpp> | |
3 | 4 | |
4 | 5 | namespace clamp |
5 | 6 | { |
8 | 9 | int Error(0); |
9 | 10 | |
10 | 11 | float A = glm::clamp(0.5f); |
11 | Error += glm::epsilonEqual(A, 0.5f, 0.00001f) ? 0 : 1; | |
12 | Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; | |
12 | 13 | |
13 | 14 | float B = glm::clamp(0.0f); |
14 | Error += glm::epsilonEqual(B, 0.0f, 0.00001f) ? 0 : 1; | |
15 | Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; | |
15 | 16 | |
16 | 17 | float C = glm::clamp(1.0f); |
17 | Error += glm::epsilonEqual(C, 1.0f, 0.00001f) ? 0 : 1; | |
18 | Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1; | |
18 | 19 | |
19 | 20 | float D = glm::clamp(-0.5f); |
20 | Error += glm::epsilonEqual(D, 0.0f, 0.00001f) ? 0 : 1; | |
21 | Error += glm::equal(D, 0.0f, 0.00001f) ? 0 : 1; | |
21 | 22 | |
22 | 23 | float E = glm::clamp(1.5f); |
23 | Error += glm::epsilonEqual(E, 1.0f, 0.00001f) ? 0 : 1; | |
24 | Error += glm::equal(E, 1.0f, 0.00001f) ? 0 : 1; | |
24 | 25 | |
25 | 26 | glm::vec2 K = glm::clamp(glm::vec2(0.5f)); |
26 | Error += glm::all(glm::epsilonEqual(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
27 | Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
27 | 28 | |
28 | 29 | glm::vec3 L = glm::clamp(glm::vec3(0.5f)); |
29 | Error += glm::all(glm::epsilonEqual(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
30 | Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
30 | 31 | |
31 | 32 | glm::vec4 M = glm::clamp(glm::vec4(0.5f)); |
32 | Error += glm::all(glm::epsilonEqual(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
33 | Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
33 | 34 | |
34 | 35 | glm::vec1 N = glm::clamp(glm::vec1(0.5f)); |
35 | Error += glm::all(glm::epsilonEqual(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
36 | Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
36 | 37 | |
37 | 38 | return Error; |
38 | 39 | } |
45 | 46 | int Error(0); |
46 | 47 | |
47 | 48 | float A = glm::repeat(0.5f); |
48 | Error += glm::epsilonEqual(A, 0.5f, 0.00001f) ? 0 : 1; | |
49 | Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; | |
49 | 50 | |
50 | 51 | float B = glm::repeat(0.0f); |
51 | Error += glm::epsilonEqual(B, 0.0f, 0.00001f) ? 0 : 1; | |
52 | Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; | |
52 | 53 | |
53 | 54 | float C = glm::repeat(1.0f); |
54 | Error += glm::epsilonEqual(C, 0.0f, 0.00001f) ? 0 : 1; | |
55 | Error += glm::equal(C, 0.0f, 0.00001f) ? 0 : 1; | |
55 | 56 | |
56 | 57 | float D = glm::repeat(-0.5f); |
57 | Error += glm::epsilonEqual(D, 0.5f, 0.00001f) ? 0 : 1; | |
58 | Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; | |
58 | 59 | |
59 | 60 | float E = glm::repeat(1.5f); |
60 | Error += glm::epsilonEqual(E, 0.5f, 0.00001f) ? 0 : 1; | |
61 | Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; | |
61 | 62 | |
62 | 63 | float F = glm::repeat(0.9f); |
63 | Error += glm::epsilonEqual(F, 0.9f, 0.00001f) ? 0 : 1; | |
64 | Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; | |
64 | 65 | |
65 | 66 | glm::vec2 K = glm::repeat(glm::vec2(0.5f)); |
66 | Error += glm::all(glm::epsilonEqual(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
67 | Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
67 | 68 | |
68 | 69 | glm::vec3 L = glm::repeat(glm::vec3(0.5f)); |
69 | Error += glm::all(glm::epsilonEqual(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
70 | Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
70 | 71 | |
71 | 72 | glm::vec4 M = glm::repeat(glm::vec4(0.5f)); |
72 | Error += glm::all(glm::epsilonEqual(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
73 | Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
73 | 74 | |
74 | 75 | glm::vec1 N = glm::repeat(glm::vec1(0.5f)); |
75 | Error += glm::all(glm::epsilonEqual(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
76 | Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
76 | 77 | |
77 | 78 | return Error; |
78 | 79 | } |
85 | 86 | int Error(0); |
86 | 87 | |
87 | 88 | float A = glm::mirrorClamp(0.5f); |
88 | Error += glm::epsilonEqual(A, 0.5f, 0.00001f) ? 0 : 1; | |
89 | Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; | |
89 | 90 | |
90 | 91 | float B = glm::mirrorClamp(0.0f); |
91 | Error += glm::epsilonEqual(B, 0.0f, 0.00001f) ? 0 : 1; | |
92 | Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; | |
92 | 93 | |
93 | 94 | float C = glm::mirrorClamp(1.1f); |
94 | Error += glm::epsilonEqual(C, 0.1f, 0.00001f) ? 0 : 1; | |
95 | Error += glm::equal(C, 0.1f, 0.00001f) ? 0 : 1; | |
95 | 96 | |
96 | 97 | float D = glm::mirrorClamp(-0.5f); |
97 | Error += glm::epsilonEqual(D, 0.5f, 0.00001f) ? 0 : 1; | |
98 | Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; | |
98 | 99 | |
99 | 100 | float E = glm::mirrorClamp(1.5f); |
100 | Error += glm::epsilonEqual(E, 0.5f, 0.00001f) ? 0 : 1; | |
101 | Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; | |
101 | 102 | |
102 | 103 | float F = glm::mirrorClamp(0.9f); |
103 | Error += glm::epsilonEqual(F, 0.9f, 0.00001f) ? 0 : 1; | |
104 | Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; | |
104 | 105 | |
105 | 106 | float G = glm::mirrorClamp(3.1f); |
106 | Error += glm::epsilonEqual(G, 0.1f, 0.00001f) ? 0 : 1; | |
107 | Error += glm::equal(G, 0.1f, 0.00001f) ? 0 : 1; | |
107 | 108 | |
108 | 109 | float H = glm::mirrorClamp(-3.1f); |
109 | Error += glm::epsilonEqual(H, 0.1f, 0.00001f) ? 0 : 1; | |
110 | Error += glm::equal(H, 0.1f, 0.00001f) ? 0 : 1; | |
110 | 111 | |
111 | 112 | float I = glm::mirrorClamp(-0.9f); |
112 | Error += glm::epsilonEqual(I, 0.9f, 0.00001f) ? 0 : 1; | |
113 | Error += glm::equal(I, 0.9f, 0.00001f) ? 0 : 1; | |
113 | 114 | |
114 | 115 | glm::vec2 K = glm::mirrorClamp(glm::vec2(0.5f)); |
115 | Error += glm::all(glm::epsilonEqual(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
116 | Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
116 | 117 | |
117 | 118 | glm::vec3 L = glm::mirrorClamp(glm::vec3(0.5f)); |
118 | Error += glm::all(glm::epsilonEqual(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
119 | Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
119 | 120 | |
120 | 121 | glm::vec4 M = glm::mirrorClamp(glm::vec4(0.5f)); |
121 | Error += glm::all(glm::epsilonEqual(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
122 | Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
122 | 123 | |
123 | 124 | glm::vec1 N = glm::mirrorClamp(glm::vec1(0.5f)); |
124 | Error += glm::all(glm::epsilonEqual(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
125 | Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
125 | 126 | |
126 | 127 | return Error; |
127 | 128 | } |
134 | 135 | int Error(0); |
135 | 136 | |
136 | 137 | float A = glm::mirrorRepeat(0.5f); |
137 | Error += glm::epsilonEqual(A, 0.5f, 0.00001f) ? 0 : 1; | |
138 | Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1; | |
138 | 139 | |
139 | 140 | float B = glm::mirrorRepeat(0.0f); |
140 | Error += glm::epsilonEqual(B, 0.0f, 0.00001f) ? 0 : 1; | |
141 | Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1; | |
141 | 142 | |
142 | 143 | float C = glm::mirrorRepeat(1.0f); |
143 | Error += glm::epsilonEqual(C, 1.0f, 0.00001f) ? 0 : 1; | |
144 | Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1; | |
144 | 145 | |
145 | 146 | float D = glm::mirrorRepeat(-0.5f); |
146 | Error += glm::epsilonEqual(D, 0.5f, 0.00001f) ? 0 : 1; | |
147 | Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1; | |
147 | 148 | |
148 | 149 | float E = glm::mirrorRepeat(1.5f); |
149 | Error += glm::epsilonEqual(E, 0.5f, 0.00001f) ? 0 : 1; | |
150 | Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1; | |
150 | 151 | |
151 | 152 | float F = glm::mirrorRepeat(0.9f); |
152 | Error += glm::epsilonEqual(F, 0.9f, 0.00001f) ? 0 : 1; | |
153 | Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1; | |
153 | 154 | |
154 | 155 | float G = glm::mirrorRepeat(3.0f); |
155 | Error += glm::epsilonEqual(G, 1.0f, 0.00001f) ? 0 : 1; | |
156 | Error += glm::equal(G, 1.0f, 0.00001f) ? 0 : 1; | |
156 | 157 | |
157 | 158 | float H = glm::mirrorRepeat(-3.0f); |
158 | Error += glm::epsilonEqual(H, 1.0f, 0.00001f) ? 0 : 1; | |
159 | Error += glm::equal(H, 1.0f, 0.00001f) ? 0 : 1; | |
159 | 160 | |
160 | 161 | float I = glm::mirrorRepeat(-1.0f); |
161 | Error += glm::epsilonEqual(I, 1.0f, 0.00001f) ? 0 : 1; | |
162 | Error += glm::equal(I, 1.0f, 0.00001f) ? 0 : 1; | |
162 | 163 | |
163 | 164 | glm::vec2 K = glm::mirrorRepeat(glm::vec2(0.5f)); |
164 | Error += glm::all(glm::epsilonEqual(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
165 | Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; | |
165 | 166 | |
166 | 167 | glm::vec3 L = glm::mirrorRepeat(glm::vec3(0.5f)); |
167 | Error += glm::all(glm::epsilonEqual(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
168 | Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; | |
168 | 169 | |
169 | 170 | glm::vec4 M = glm::mirrorRepeat(glm::vec4(0.5f)); |
170 | Error += glm::all(glm::epsilonEqual(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
171 | Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; | |
171 | 172 | |
172 | 173 | glm::vec1 N = glm::mirrorRepeat(glm::vec1(0.5f)); |
173 | Error += glm::all(glm::epsilonEqual(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
174 | Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; | |
174 | 175 | |
175 | 176 | return Error; |
176 | 177 | } |