1 /////////////////////////////////////////////////////////////////////////////////// 2 /// OpenGL Mathematics (glm.g-truc.net) 3 /// 4 /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 /// of this software and associated documentation files (the "Software"), to deal 7 /// in the Software without restriction, including without limitation the rights 8 /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 /// copies of the Software, and to permit persons to whom the Software is 10 /// furnished to do so, subject to the following conditions: 11 /// 12 /// The above copyright notice and this permission notice shall be included in 13 /// all copies or substantial portions of the Software. 14 /// 15 /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 /// THE SOFTWARE. 22 /// 23 /// @ref gtc_matrix_integer 24 /// @file glm/gtc/matrix_integer.hpp 25 /// @date 2011-01-20 / 2011-06-05 26 /// @author Christophe Riccio 27 /// 28 /// @see core (dependence) 29 /// 30 /// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer 31 /// @ingroup gtc 32 /// 33 /// Defines a number of matrices with integer types. 34 /// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities. 35 /////////////////////////////////////////////////////////////////////////////////// 36 37 #ifndef GLM_GTC_matrix_integer 38 #define GLM_GTC_matrix_integer 39 40 // Dependency: 41 #include "../mat2x2.hpp" 42 #include "../mat2x3.hpp" 43 #include "../mat2x4.hpp" 44 #include "../mat3x2.hpp" 45 #include "../mat3x3.hpp" 46 #include "../mat3x4.hpp" 47 #include "../mat4x2.hpp" 48 #include "../mat4x3.hpp" 49 #include "../mat4x4.hpp" 50 51 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 52 # pragma message("GLM: GLM_GTC_matrix_integer extension included") 53 #endif 54 55 namespace glm 56 { 57 /// @addtogroup gtc_matrix_integer 58 /// @{ 59 60 /// High-precision signed integer 2x2 matrix. 61 /// @see gtc_matrix_integer 62 typedef detail::tmat2x2<int, highp> highp_imat2; 63 64 /// High-precision signed integer 3x3 matrix. 65 /// @see gtc_matrix_integer 66 typedef detail::tmat3x3<int, highp> highp_imat3; 67 68 /// High-precision signed integer 4x4 matrix. 69 /// @see gtc_matrix_integer 70 typedef detail::tmat4x4<int, highp> highp_imat4; 71 72 /// High-precision signed integer 2x2 matrix. 73 /// @see gtc_matrix_integer 74 typedef detail::tmat2x2<int, highp> highp_imat2x2; 75 76 /// High-precision signed integer 2x3 matrix. 77 /// @see gtc_matrix_integer 78 typedef detail::tmat2x3<int, highp> highp_imat2x3; 79 80 /// High-precision signed integer 2x4 matrix. 81 /// @see gtc_matrix_integer 82 typedef detail::tmat2x4<int, highp> highp_imat2x4; 83 84 /// High-precision signed integer 3x2 matrix. 85 /// @see gtc_matrix_integer 86 typedef detail::tmat3x2<int, highp> highp_imat3x2; 87 88 /// High-precision signed integer 3x3 matrix. 89 /// @see gtc_matrix_integer 90 typedef detail::tmat3x3<int, highp> highp_imat3x3; 91 92 /// High-precision signed integer 3x4 matrix. 93 /// @see gtc_matrix_integer 94 typedef detail::tmat3x4<int, highp> highp_imat3x4; 95 96 /// High-precision signed integer 4x2 matrix. 97 /// @see gtc_matrix_integer 98 typedef detail::tmat4x2<int, highp> highp_imat4x2; 99 100 /// High-precision signed integer 4x3 matrix. 101 /// @see gtc_matrix_integer 102 typedef detail::tmat4x3<int, highp> highp_imat4x3; 103 104 /// High-precision signed integer 4x4 matrix. 105 /// @see gtc_matrix_integer 106 typedef detail::tmat4x4<int, highp> highp_imat4x4; 107 108 109 /// Medium-precision signed integer 2x2 matrix. 110 /// @see gtc_matrix_integer 111 typedef detail::tmat2x2<int, mediump> mediump_imat2; 112 113 /// Medium-precision signed integer 3x3 matrix. 114 /// @see gtc_matrix_integer 115 typedef detail::tmat3x3<int, mediump> mediump_imat3; 116 117 /// Medium-precision signed integer 4x4 matrix. 118 /// @see gtc_matrix_integer 119 typedef detail::tmat4x4<int, mediump> mediump_imat4; 120 121 122 /// Medium-precision signed integer 2x2 matrix. 123 /// @see gtc_matrix_integer 124 typedef detail::tmat2x2<int, mediump> mediump_imat2x2; 125 126 /// Medium-precision signed integer 2x3 matrix. 127 /// @see gtc_matrix_integer 128 typedef detail::tmat2x3<int, mediump> mediump_imat2x3; 129 130 /// Medium-precision signed integer 2x4 matrix. 131 /// @see gtc_matrix_integer 132 typedef detail::tmat2x4<int, mediump> mediump_imat2x4; 133 134 /// Medium-precision signed integer 3x2 matrix. 135 /// @see gtc_matrix_integer 136 typedef detail::tmat3x2<int, mediump> mediump_imat3x2; 137 138 /// Medium-precision signed integer 3x3 matrix. 139 /// @see gtc_matrix_integer 140 typedef detail::tmat3x3<int, mediump> mediump_imat3x3; 141 142 /// Medium-precision signed integer 3x4 matrix. 143 /// @see gtc_matrix_integer 144 typedef detail::tmat3x4<int, mediump> mediump_imat3x4; 145 146 /// Medium-precision signed integer 4x2 matrix. 147 /// @see gtc_matrix_integer 148 typedef detail::tmat4x2<int, mediump> mediump_imat4x2; 149 150 /// Medium-precision signed integer 4x3 matrix. 151 /// @see gtc_matrix_integer 152 typedef detail::tmat4x3<int, mediump> mediump_imat4x3; 153 154 /// Medium-precision signed integer 4x4 matrix. 155 /// @see gtc_matrix_integer 156 typedef detail::tmat4x4<int, mediump> mediump_imat4x4; 157 158 159 /// Low-precision signed integer 2x2 matrix. 160 /// @see gtc_matrix_integer 161 typedef detail::tmat2x2<int, lowp> lowp_imat2; 162 163 /// Low-precision signed integer 3x3 matrix. 164 /// @see gtc_matrix_integer 165 typedef detail::tmat3x3<int, lowp> lowp_imat3; 166 167 /// Low-precision signed integer 4x4 matrix. 168 /// @see gtc_matrix_integer 169 typedef detail::tmat4x4<int, lowp> lowp_imat4; 170 171 172 /// Low-precision signed integer 2x2 matrix. 173 /// @see gtc_matrix_integer 174 typedef detail::tmat2x2<int, lowp> lowp_imat2x2; 175 176 /// Low-precision signed integer 2x3 matrix. 177 /// @see gtc_matrix_integer 178 typedef detail::tmat2x3<int, lowp> lowp_imat2x3; 179 180 /// Low-precision signed integer 2x4 matrix. 181 /// @see gtc_matrix_integer 182 typedef detail::tmat2x4<int, lowp> lowp_imat2x4; 183 184 /// Low-precision signed integer 3x2 matrix. 185 /// @see gtc_matrix_integer 186 typedef detail::tmat3x2<int, lowp> lowp_imat3x2; 187 188 /// Low-precision signed integer 3x3 matrix. 189 /// @see gtc_matrix_integer 190 typedef detail::tmat3x3<int, lowp> lowp_imat3x3; 191 192 /// Low-precision signed integer 3x4 matrix. 193 /// @see gtc_matrix_integer 194 typedef detail::tmat3x4<int, lowp> lowp_imat3x4; 195 196 /// Low-precision signed integer 4x2 matrix. 197 /// @see gtc_matrix_integer 198 typedef detail::tmat4x2<int, lowp> lowp_imat4x2; 199 200 /// Low-precision signed integer 4x3 matrix. 201 /// @see gtc_matrix_integer 202 typedef detail::tmat4x3<int, lowp> lowp_imat4x3; 203 204 /// Low-precision signed integer 4x4 matrix. 205 /// @see gtc_matrix_integer 206 typedef detail::tmat4x4<int, lowp> lowp_imat4x4; 207 208 209 /// High-precision unsigned integer 2x2 matrix. 210 /// @see gtc_matrix_integer 211 typedef detail::tmat2x2<uint, highp> highp_umat2; 212 213 /// High-precision unsigned integer 3x3 matrix. 214 /// @see gtc_matrix_integer 215 typedef detail::tmat3x3<uint, highp> highp_umat3; 216 217 /// High-precision unsigned integer 4x4 matrix. 218 /// @see gtc_matrix_integer 219 typedef detail::tmat4x4<uint, highp> highp_umat4; 220 221 /// High-precision unsigned integer 2x2 matrix. 222 /// @see gtc_matrix_integer 223 typedef detail::tmat2x2<uint, highp> highp_umat2x2; 224 225 /// High-precision unsigned integer 2x3 matrix. 226 /// @see gtc_matrix_integer 227 typedef detail::tmat2x3<uint, highp> highp_umat2x3; 228 229 /// High-precision unsigned integer 2x4 matrix. 230 /// @see gtc_matrix_integer 231 typedef detail::tmat2x4<uint, highp> highp_umat2x4; 232 233 /// High-precision unsigned integer 3x2 matrix. 234 /// @see gtc_matrix_integer 235 typedef detail::tmat3x2<uint, highp> highp_umat3x2; 236 237 /// High-precision unsigned integer 3x3 matrix. 238 /// @see gtc_matrix_integer 239 typedef detail::tmat3x3<uint, highp> highp_umat3x3; 240 241 /// High-precision unsigned integer 3x4 matrix. 242 /// @see gtc_matrix_integer 243 typedef detail::tmat3x4<uint, highp> highp_umat3x4; 244 245 /// High-precision unsigned integer 4x2 matrix. 246 /// @see gtc_matrix_integer 247 typedef detail::tmat4x2<uint, highp> highp_umat4x2; 248 249 /// High-precision unsigned integer 4x3 matrix. 250 /// @see gtc_matrix_integer 251 typedef detail::tmat4x3<uint, highp> highp_umat4x3; 252 253 /// High-precision unsigned integer 4x4 matrix. 254 /// @see gtc_matrix_integer 255 typedef detail::tmat4x4<uint, highp> highp_umat4x4; 256 257 258 /// Medium-precision unsigned integer 2x2 matrix. 259 /// @see gtc_matrix_integer 260 typedef detail::tmat2x2<uint, mediump> mediump_umat2; 261 262 /// Medium-precision unsigned integer 3x3 matrix. 263 /// @see gtc_matrix_integer 264 typedef detail::tmat3x3<uint, mediump> mediump_umat3; 265 266 /// Medium-precision unsigned integer 4x4 matrix. 267 /// @see gtc_matrix_integer 268 typedef detail::tmat4x4<uint, mediump> mediump_umat4; 269 270 271 /// Medium-precision unsigned integer 2x2 matrix. 272 /// @see gtc_matrix_integer 273 typedef detail::tmat2x2<uint, mediump> mediump_umat2x2; 274 275 /// Medium-precision unsigned integer 2x3 matrix. 276 /// @see gtc_matrix_integer 277 typedef detail::tmat2x3<uint, mediump> mediump_umat2x3; 278 279 /// Medium-precision unsigned integer 2x4 matrix. 280 /// @see gtc_matrix_integer 281 typedef detail::tmat2x4<uint, mediump> mediump_umat2x4; 282 283 /// Medium-precision unsigned integer 3x2 matrix. 284 /// @see gtc_matrix_integer 285 typedef detail::tmat3x2<uint, mediump> mediump_umat3x2; 286 287 /// Medium-precision unsigned integer 3x3 matrix. 288 /// @see gtc_matrix_integer 289 typedef detail::tmat3x3<uint, mediump> mediump_umat3x3; 290 291 /// Medium-precision unsigned integer 3x4 matrix. 292 /// @see gtc_matrix_integer 293 typedef detail::tmat3x4<uint, mediump> mediump_umat3x4; 294 295 /// Medium-precision unsigned integer 4x2 matrix. 296 /// @see gtc_matrix_integer 297 typedef detail::tmat4x2<uint, mediump> mediump_umat4x2; 298 299 /// Medium-precision unsigned integer 4x3 matrix. 300 /// @see gtc_matrix_integer 301 typedef detail::tmat4x3<uint, mediump> mediump_umat4x3; 302 303 /// Medium-precision unsigned integer 4x4 matrix. 304 /// @see gtc_matrix_integer 305 typedef detail::tmat4x4<uint, mediump> mediump_umat4x4; 306 307 308 /// Low-precision unsigned integer 2x2 matrix. 309 /// @see gtc_matrix_integer 310 typedef detail::tmat2x2<uint, lowp> lowp_umat2; 311 312 /// Low-precision unsigned integer 3x3 matrix. 313 /// @see gtc_matrix_integer 314 typedef detail::tmat3x3<uint, lowp> lowp_umat3; 315 316 /// Low-precision unsigned integer 4x4 matrix. 317 /// @see gtc_matrix_integer 318 typedef detail::tmat4x4<uint, lowp> lowp_umat4; 319 320 321 /// Low-precision unsigned integer 2x2 matrix. 322 /// @see gtc_matrix_integer 323 typedef detail::tmat2x2<uint, lowp> lowp_umat2x2; 324 325 /// Low-precision unsigned integer 2x3 matrix. 326 /// @see gtc_matrix_integer 327 typedef detail::tmat2x3<uint, lowp> lowp_umat2x3; 328 329 /// Low-precision unsigned integer 2x4 matrix. 330 /// @see gtc_matrix_integer 331 typedef detail::tmat2x4<uint, lowp> lowp_umat2x4; 332 333 /// Low-precision unsigned integer 3x2 matrix. 334 /// @see gtc_matrix_integer 335 typedef detail::tmat3x2<uint, lowp> lowp_umat3x2; 336 337 /// Low-precision unsigned integer 3x3 matrix. 338 /// @see gtc_matrix_integer 339 typedef detail::tmat3x3<uint, lowp> lowp_umat3x3; 340 341 /// Low-precision unsigned integer 3x4 matrix. 342 /// @see gtc_matrix_integer 343 typedef detail::tmat3x4<uint, lowp> lowp_umat3x4; 344 345 /// Low-precision unsigned integer 4x2 matrix. 346 /// @see gtc_matrix_integer 347 typedef detail::tmat4x2<uint, lowp> lowp_umat4x2; 348 349 /// Low-precision unsigned integer 4x3 matrix. 350 /// @see gtc_matrix_integer 351 typedef detail::tmat4x3<uint, lowp> lowp_umat4x3; 352 353 /// Low-precision unsigned integer 4x4 matrix. 354 /// @see gtc_matrix_integer 355 typedef detail::tmat4x4<uint, lowp> lowp_umat4x4; 356 357 #if(defined(GLM_PRECISION_HIGHP_INT)) 358 typedef highp_imat2 imat2; 359 typedef highp_imat3 imat3; 360 typedef highp_imat4 imat4; 361 typedef highp_imat2x2 imat2x2; 362 typedef highp_imat2x3 imat2x3; 363 typedef highp_imat2x4 imat2x4; 364 typedef highp_imat3x2 imat3x2; 365 typedef highp_imat3x3 imat3x3; 366 typedef highp_imat3x4 imat3x4; 367 typedef highp_imat4x2 imat4x2; 368 typedef highp_imat4x3 imat4x3; 369 typedef highp_imat4x4 imat4x4; 370 #elif(defined(GLM_PRECISION_LOWP_INT)) 371 typedef lowp_imat2 imat2; 372 typedef lowp_imat3 imat3; 373 typedef lowp_imat4 imat4; 374 typedef lowp_imat2x2 imat2x2; 375 typedef lowp_imat2x3 imat2x3; 376 typedef lowp_imat2x4 imat2x4; 377 typedef lowp_imat3x2 imat3x2; 378 typedef lowp_imat3x3 imat3x3; 379 typedef lowp_imat3x4 imat3x4; 380 typedef lowp_imat4x2 imat4x2; 381 typedef lowp_imat4x3 imat4x3; 382 typedef lowp_imat4x4 imat4x4; 383 #else //if(defined(GLM_PRECISION_MEDIUMP_INT)) 384 385 /// Signed integer 2x2 matrix. 386 /// @see gtc_matrix_integer 387 typedef mediump_imat2 imat2; 388 389 /// Signed integer 3x3 matrix. 390 /// @see gtc_matrix_integer 391 typedef mediump_imat3 imat3; 392 393 /// Signed integer 4x4 matrix. 394 /// @see gtc_matrix_integer 395 typedef mediump_imat4 imat4; 396 397 /// Signed integer 2x2 matrix. 398 /// @see gtc_matrix_integer 399 typedef mediump_imat2x2 imat2x2; 400 401 /// Signed integer 2x3 matrix. 402 /// @see gtc_matrix_integer 403 typedef mediump_imat2x3 imat2x3; 404 405 /// Signed integer 2x4 matrix. 406 /// @see gtc_matrix_integer 407 typedef mediump_imat2x4 imat2x4; 408 409 /// Signed integer 3x2 matrix. 410 /// @see gtc_matrix_integer 411 typedef mediump_imat3x2 imat3x2; 412 413 /// Signed integer 3x3 matrix. 414 /// @see gtc_matrix_integer 415 typedef mediump_imat3x3 imat3x3; 416 417 /// Signed integer 3x4 matrix. 418 /// @see gtc_matrix_integer 419 typedef mediump_imat3x4 imat3x4; 420 421 /// Signed integer 4x2 matrix. 422 /// @see gtc_matrix_integer 423 typedef mediump_imat4x2 imat4x2; 424 425 /// Signed integer 4x3 matrix. 426 /// @see gtc_matrix_integer 427 typedef mediump_imat4x3 imat4x3; 428 429 /// Signed integer 4x4 matrix. 430 /// @see gtc_matrix_integer 431 typedef mediump_imat4x4 imat4x4; 432 #endif//GLM_PRECISION 433 434 #if(defined(GLM_PRECISION_HIGHP_UINT)) 435 typedef highp_umat2 umat2; 436 typedef highp_umat3 umat3; 437 typedef highp_umat4 umat4; 438 typedef highp_umat2x2 umat2x2; 439 typedef highp_umat2x3 umat2x3; 440 typedef highp_umat2x4 umat2x4; 441 typedef highp_umat3x2 umat3x2; 442 typedef highp_umat3x3 umat3x3; 443 typedef highp_umat3x4 umat3x4; 444 typedef highp_umat4x2 umat4x2; 445 typedef highp_umat4x3 umat4x3; 446 typedef highp_umat4x4 umat4x4; 447 #elif(defined(GLM_PRECISION_LOWP_UINT)) 448 typedef lowp_umat2 umat2; 449 typedef lowp_umat3 umat3; 450 typedef lowp_umat4 umat4; 451 typedef lowp_umat2x2 umat2x2; 452 typedef lowp_umat2x3 umat2x3; 453 typedef lowp_umat2x4 umat2x4; 454 typedef lowp_umat3x2 umat3x2; 455 typedef lowp_umat3x3 umat3x3; 456 typedef lowp_umat3x4 umat3x4; 457 typedef lowp_umat4x2 umat4x2; 458 typedef lowp_umat4x3 umat4x3; 459 typedef lowp_umat4x4 umat4x4; 460 #else //if(defined(GLM_PRECISION_MEDIUMP_UINT)) 461 462 /// Unsigned integer 2x2 matrix. 463 /// @see gtc_matrix_integer 464 typedef mediump_umat2 umat2; 465 466 /// Unsigned integer 3x3 matrix. 467 /// @see gtc_matrix_integer 468 typedef mediump_umat3 umat3; 469 470 /// Unsigned integer 4x4 matrix. 471 /// @see gtc_matrix_integer 472 typedef mediump_umat4 umat4; 473 474 /// Unsigned integer 2x2 matrix. 475 /// @see gtc_matrix_integer 476 typedef mediump_umat2x2 umat2x2; 477 478 /// Unsigned integer 2x3 matrix. 479 /// @see gtc_matrix_integer 480 typedef mediump_umat2x3 umat2x3; 481 482 /// Unsigned integer 2x4 matrix. 483 /// @see gtc_matrix_integer 484 typedef mediump_umat2x4 umat2x4; 485 486 /// Unsigned integer 3x2 matrix. 487 /// @see gtc_matrix_integer 488 typedef mediump_umat3x2 umat3x2; 489 490 /// Unsigned integer 3x3 matrix. 491 /// @see gtc_matrix_integer 492 typedef mediump_umat3x3 umat3x3; 493 494 /// Unsigned integer 3x4 matrix. 495 /// @see gtc_matrix_integer 496 typedef mediump_umat3x4 umat3x4; 497 498 /// Unsigned integer 4x2 matrix. 499 /// @see gtc_matrix_integer 500 typedef mediump_umat4x2 umat4x2; 501 502 /// Unsigned integer 4x3 matrix. 503 /// @see gtc_matrix_integer 504 typedef mediump_umat4x3 umat4x3; 505 506 /// Unsigned integer 4x4 matrix. 507 /// @see gtc_matrix_integer 508 typedef mediump_umat4x4 umat4x4; 509 #endif//GLM_PRECISION 510 511 /// @} 512 }//namespace glm 513 514 #endif//GLM_GTC_matrix_integer 515