9
3

matrix_integer.hpp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. /// @ref gtc_matrix_integer
  2. /// @file glm/gtc/matrix_integer.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer
  7. /// @ingroup gtc
  8. ///
  9. /// Include <glm/gtc/matrix_integer.hpp> to use the features of this extension.
  10. ///
  11. /// Defines a number of matrices with integer types.
  12. #pragma once
  13. // Dependency:
  14. #include "../mat2x2.hpp"
  15. #include "../mat2x3.hpp"
  16. #include "../mat2x4.hpp"
  17. #include "../mat3x2.hpp"
  18. #include "../mat3x3.hpp"
  19. #include "../mat3x4.hpp"
  20. #include "../mat4x2.hpp"
  21. #include "../mat4x3.hpp"
  22. #include "../mat4x4.hpp"
  23. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  24. # pragma message("GLM: GLM_GTC_matrix_integer extension included")
  25. #endif
  26. namespace glm
  27. {
  28. /// @addtogroup gtc_matrix_integer
  29. /// @{
  30. /// High-qualifier signed integer 2x2 matrix.
  31. /// @see gtc_matrix_integer
  32. typedef mat<2, 2, int, highp> highp_imat2;
  33. /// High-qualifier signed integer 3x3 matrix.
  34. /// @see gtc_matrix_integer
  35. typedef mat<3, 3, int, highp> highp_imat3;
  36. /// High-qualifier signed integer 4x4 matrix.
  37. /// @see gtc_matrix_integer
  38. typedef mat<4, 4, int, highp> highp_imat4;
  39. /// High-qualifier signed integer 2x2 matrix.
  40. /// @see gtc_matrix_integer
  41. typedef mat<2, 2, int, highp> highp_imat2x2;
  42. /// High-qualifier signed integer 2x3 matrix.
  43. /// @see gtc_matrix_integer
  44. typedef mat<2, 3, int, highp> highp_imat2x3;
  45. /// High-qualifier signed integer 2x4 matrix.
  46. /// @see gtc_matrix_integer
  47. typedef mat<2, 4, int, highp> highp_imat2x4;
  48. /// High-qualifier signed integer 3x2 matrix.
  49. /// @see gtc_matrix_integer
  50. typedef mat<3, 2, int, highp> highp_imat3x2;
  51. /// High-qualifier signed integer 3x3 matrix.
  52. /// @see gtc_matrix_integer
  53. typedef mat<3, 3, int, highp> highp_imat3x3;
  54. /// High-qualifier signed integer 3x4 matrix.
  55. /// @see gtc_matrix_integer
  56. typedef mat<3, 4, int, highp> highp_imat3x4;
  57. /// High-qualifier signed integer 4x2 matrix.
  58. /// @see gtc_matrix_integer
  59. typedef mat<4, 2, int, highp> highp_imat4x2;
  60. /// High-qualifier signed integer 4x3 matrix.
  61. /// @see gtc_matrix_integer
  62. typedef mat<4, 3, int, highp> highp_imat4x3;
  63. /// High-qualifier signed integer 4x4 matrix.
  64. /// @see gtc_matrix_integer
  65. typedef mat<4, 4, int, highp> highp_imat4x4;
  66. /// Medium-qualifier signed integer 2x2 matrix.
  67. /// @see gtc_matrix_integer
  68. typedef mat<2, 2, int, mediump> mediump_imat2;
  69. /// Medium-qualifier signed integer 3x3 matrix.
  70. /// @see gtc_matrix_integer
  71. typedef mat<3, 3, int, mediump> mediump_imat3;
  72. /// Medium-qualifier signed integer 4x4 matrix.
  73. /// @see gtc_matrix_integer
  74. typedef mat<4, 4, int, mediump> mediump_imat4;
  75. /// Medium-qualifier signed integer 2x2 matrix.
  76. /// @see gtc_matrix_integer
  77. typedef mat<2, 2, int, mediump> mediump_imat2x2;
  78. /// Medium-qualifier signed integer 2x3 matrix.
  79. /// @see gtc_matrix_integer
  80. typedef mat<2, 3, int, mediump> mediump_imat2x3;
  81. /// Medium-qualifier signed integer 2x4 matrix.
  82. /// @see gtc_matrix_integer
  83. typedef mat<2, 4, int, mediump> mediump_imat2x4;
  84. /// Medium-qualifier signed integer 3x2 matrix.
  85. /// @see gtc_matrix_integer
  86. typedef mat<3, 2, int, mediump> mediump_imat3x2;
  87. /// Medium-qualifier signed integer 3x3 matrix.
  88. /// @see gtc_matrix_integer
  89. typedef mat<3, 3, int, mediump> mediump_imat3x3;
  90. /// Medium-qualifier signed integer 3x4 matrix.
  91. /// @see gtc_matrix_integer
  92. typedef mat<3, 4, int, mediump> mediump_imat3x4;
  93. /// Medium-qualifier signed integer 4x2 matrix.
  94. /// @see gtc_matrix_integer
  95. typedef mat<4, 2, int, mediump> mediump_imat4x2;
  96. /// Medium-qualifier signed integer 4x3 matrix.
  97. /// @see gtc_matrix_integer
  98. typedef mat<4, 3, int, mediump> mediump_imat4x3;
  99. /// Medium-qualifier signed integer 4x4 matrix.
  100. /// @see gtc_matrix_integer
  101. typedef mat<4, 4, int, mediump> mediump_imat4x4;
  102. /// Low-qualifier signed integer 2x2 matrix.
  103. /// @see gtc_matrix_integer
  104. typedef mat<2, 2, int, lowp> lowp_imat2;
  105. /// Low-qualifier signed integer 3x3 matrix.
  106. /// @see gtc_matrix_integer
  107. typedef mat<3, 3, int, lowp> lowp_imat3;
  108. /// Low-qualifier signed integer 4x4 matrix.
  109. /// @see gtc_matrix_integer
  110. typedef mat<4, 4, int, lowp> lowp_imat4;
  111. /// Low-qualifier signed integer 2x2 matrix.
  112. /// @see gtc_matrix_integer
  113. typedef mat<2, 2, int, lowp> lowp_imat2x2;
  114. /// Low-qualifier signed integer 2x3 matrix.
  115. /// @see gtc_matrix_integer
  116. typedef mat<2, 3, int, lowp> lowp_imat2x3;
  117. /// Low-qualifier signed integer 2x4 matrix.
  118. /// @see gtc_matrix_integer
  119. typedef mat<2, 4, int, lowp> lowp_imat2x4;
  120. /// Low-qualifier signed integer 3x2 matrix.
  121. /// @see gtc_matrix_integer
  122. typedef mat<3, 2, int, lowp> lowp_imat3x2;
  123. /// Low-qualifier signed integer 3x3 matrix.
  124. /// @see gtc_matrix_integer
  125. typedef mat<3, 3, int, lowp> lowp_imat3x3;
  126. /// Low-qualifier signed integer 3x4 matrix.
  127. /// @see gtc_matrix_integer
  128. typedef mat<3, 4, int, lowp> lowp_imat3x4;
  129. /// Low-qualifier signed integer 4x2 matrix.
  130. /// @see gtc_matrix_integer
  131. typedef mat<4, 2, int, lowp> lowp_imat4x2;
  132. /// Low-qualifier signed integer 4x3 matrix.
  133. /// @see gtc_matrix_integer
  134. typedef mat<4, 3, int, lowp> lowp_imat4x3;
  135. /// Low-qualifier signed integer 4x4 matrix.
  136. /// @see gtc_matrix_integer
  137. typedef mat<4, 4, int, lowp> lowp_imat4x4;
  138. /// High-qualifier unsigned integer 2x2 matrix.
  139. /// @see gtc_matrix_integer
  140. typedef mat<2, 2, uint, highp> highp_umat2;
  141. /// High-qualifier unsigned integer 3x3 matrix.
  142. /// @see gtc_matrix_integer
  143. typedef mat<3, 3, uint, highp> highp_umat3;
  144. /// High-qualifier unsigned integer 4x4 matrix.
  145. /// @see gtc_matrix_integer
  146. typedef mat<4, 4, uint, highp> highp_umat4;
  147. /// High-qualifier unsigned integer 2x2 matrix.
  148. /// @see gtc_matrix_integer
  149. typedef mat<2, 2, uint, highp> highp_umat2x2;
  150. /// High-qualifier unsigned integer 2x3 matrix.
  151. /// @see gtc_matrix_integer
  152. typedef mat<2, 3, uint, highp> highp_umat2x3;
  153. /// High-qualifier unsigned integer 2x4 matrix.
  154. /// @see gtc_matrix_integer
  155. typedef mat<2, 4, uint, highp> highp_umat2x4;
  156. /// High-qualifier unsigned integer 3x2 matrix.
  157. /// @see gtc_matrix_integer
  158. typedef mat<3, 2, uint, highp> highp_umat3x2;
  159. /// High-qualifier unsigned integer 3x3 matrix.
  160. /// @see gtc_matrix_integer
  161. typedef mat<3, 3, uint, highp> highp_umat3x3;
  162. /// High-qualifier unsigned integer 3x4 matrix.
  163. /// @see gtc_matrix_integer
  164. typedef mat<3, 4, uint, highp> highp_umat3x4;
  165. /// High-qualifier unsigned integer 4x2 matrix.
  166. /// @see gtc_matrix_integer
  167. typedef mat<4, 2, uint, highp> highp_umat4x2;
  168. /// High-qualifier unsigned integer 4x3 matrix.
  169. /// @see gtc_matrix_integer
  170. typedef mat<4, 3, uint, highp> highp_umat4x3;
  171. /// High-qualifier unsigned integer 4x4 matrix.
  172. /// @see gtc_matrix_integer
  173. typedef mat<4, 4, uint, highp> highp_umat4x4;
  174. /// Medium-qualifier unsigned integer 2x2 matrix.
  175. /// @see gtc_matrix_integer
  176. typedef mat<2, 2, uint, mediump> mediump_umat2;
  177. /// Medium-qualifier unsigned integer 3x3 matrix.
  178. /// @see gtc_matrix_integer
  179. typedef mat<3, 3, uint, mediump> mediump_umat3;
  180. /// Medium-qualifier unsigned integer 4x4 matrix.
  181. /// @see gtc_matrix_integer
  182. typedef mat<4, 4, uint, mediump> mediump_umat4;
  183. /// Medium-qualifier unsigned integer 2x2 matrix.
  184. /// @see gtc_matrix_integer
  185. typedef mat<2, 2, uint, mediump> mediump_umat2x2;
  186. /// Medium-qualifier unsigned integer 2x3 matrix.
  187. /// @see gtc_matrix_integer
  188. typedef mat<2, 3, uint, mediump> mediump_umat2x3;
  189. /// Medium-qualifier unsigned integer 2x4 matrix.
  190. /// @see gtc_matrix_integer
  191. typedef mat<2, 4, uint, mediump> mediump_umat2x4;
  192. /// Medium-qualifier unsigned integer 3x2 matrix.
  193. /// @see gtc_matrix_integer
  194. typedef mat<3, 2, uint, mediump> mediump_umat3x2;
  195. /// Medium-qualifier unsigned integer 3x3 matrix.
  196. /// @see gtc_matrix_integer
  197. typedef mat<3, 3, uint, mediump> mediump_umat3x3;
  198. /// Medium-qualifier unsigned integer 3x4 matrix.
  199. /// @see gtc_matrix_integer
  200. typedef mat<3, 4, uint, mediump> mediump_umat3x4;
  201. /// Medium-qualifier unsigned integer 4x2 matrix.
  202. /// @see gtc_matrix_integer
  203. typedef mat<4, 2, uint, mediump> mediump_umat4x2;
  204. /// Medium-qualifier unsigned integer 4x3 matrix.
  205. /// @see gtc_matrix_integer
  206. typedef mat<4, 3, uint, mediump> mediump_umat4x3;
  207. /// Medium-qualifier unsigned integer 4x4 matrix.
  208. /// @see gtc_matrix_integer
  209. typedef mat<4, 4, uint, mediump> mediump_umat4x4;
  210. /// Low-qualifier unsigned integer 2x2 matrix.
  211. /// @see gtc_matrix_integer
  212. typedef mat<2, 2, uint, lowp> lowp_umat2;
  213. /// Low-qualifier unsigned integer 3x3 matrix.
  214. /// @see gtc_matrix_integer
  215. typedef mat<3, 3, uint, lowp> lowp_umat3;
  216. /// Low-qualifier unsigned integer 4x4 matrix.
  217. /// @see gtc_matrix_integer
  218. typedef mat<4, 4, uint, lowp> lowp_umat4;
  219. /// Low-qualifier unsigned integer 2x2 matrix.
  220. /// @see gtc_matrix_integer
  221. typedef mat<2, 2, uint, lowp> lowp_umat2x2;
  222. /// Low-qualifier unsigned integer 2x3 matrix.
  223. /// @see gtc_matrix_integer
  224. typedef mat<2, 3, uint, lowp> lowp_umat2x3;
  225. /// Low-qualifier unsigned integer 2x4 matrix.
  226. /// @see gtc_matrix_integer
  227. typedef mat<2, 4, uint, lowp> lowp_umat2x4;
  228. /// Low-qualifier unsigned integer 3x2 matrix.
  229. /// @see gtc_matrix_integer
  230. typedef mat<3, 2, uint, lowp> lowp_umat3x2;
  231. /// Low-qualifier unsigned integer 3x3 matrix.
  232. /// @see gtc_matrix_integer
  233. typedef mat<3, 3, uint, lowp> lowp_umat3x3;
  234. /// Low-qualifier unsigned integer 3x4 matrix.
  235. /// @see gtc_matrix_integer
  236. typedef mat<3, 4, uint, lowp> lowp_umat3x4;
  237. /// Low-qualifier unsigned integer 4x2 matrix.
  238. /// @see gtc_matrix_integer
  239. typedef mat<4, 2, uint, lowp> lowp_umat4x2;
  240. /// Low-qualifier unsigned integer 4x3 matrix.
  241. /// @see gtc_matrix_integer
  242. typedef mat<4, 3, uint, lowp> lowp_umat4x3;
  243. /// Low-qualifier unsigned integer 4x4 matrix.
  244. /// @see gtc_matrix_integer
  245. typedef mat<4, 4, uint, lowp> lowp_umat4x4;
  246. #if(defined(GLM_PRECISION_HIGHP_INT))
  247. typedef highp_imat2 imat2;
  248. typedef highp_imat3 imat3;
  249. typedef highp_imat4 imat4;
  250. typedef highp_imat2x2 imat2x2;
  251. typedef highp_imat2x3 imat2x3;
  252. typedef highp_imat2x4 imat2x4;
  253. typedef highp_imat3x2 imat3x2;
  254. typedef highp_imat3x3 imat3x3;
  255. typedef highp_imat3x4 imat3x4;
  256. typedef highp_imat4x2 imat4x2;
  257. typedef highp_imat4x3 imat4x3;
  258. typedef highp_imat4x4 imat4x4;
  259. #elif(defined(GLM_PRECISION_LOWP_INT))
  260. typedef lowp_imat2 imat2;
  261. typedef lowp_imat3 imat3;
  262. typedef lowp_imat4 imat4;
  263. typedef lowp_imat2x2 imat2x2;
  264. typedef lowp_imat2x3 imat2x3;
  265. typedef lowp_imat2x4 imat2x4;
  266. typedef lowp_imat3x2 imat3x2;
  267. typedef lowp_imat3x3 imat3x3;
  268. typedef lowp_imat3x4 imat3x4;
  269. typedef lowp_imat4x2 imat4x2;
  270. typedef lowp_imat4x3 imat4x3;
  271. typedef lowp_imat4x4 imat4x4;
  272. #else //if(defined(GLM_PRECISION_MEDIUMP_INT))
  273. /// Signed integer 2x2 matrix.
  274. /// @see gtc_matrix_integer
  275. typedef mediump_imat2 imat2;
  276. /// Signed integer 3x3 matrix.
  277. /// @see gtc_matrix_integer
  278. typedef mediump_imat3 imat3;
  279. /// Signed integer 4x4 matrix.
  280. /// @see gtc_matrix_integer
  281. typedef mediump_imat4 imat4;
  282. /// Signed integer 2x2 matrix.
  283. /// @see gtc_matrix_integer
  284. typedef mediump_imat2x2 imat2x2;
  285. /// Signed integer 2x3 matrix.
  286. /// @see gtc_matrix_integer
  287. typedef mediump_imat2x3 imat2x3;
  288. /// Signed integer 2x4 matrix.
  289. /// @see gtc_matrix_integer
  290. typedef mediump_imat2x4 imat2x4;
  291. /// Signed integer 3x2 matrix.
  292. /// @see gtc_matrix_integer
  293. typedef mediump_imat3x2 imat3x2;
  294. /// Signed integer 3x3 matrix.
  295. /// @see gtc_matrix_integer
  296. typedef mediump_imat3x3 imat3x3;
  297. /// Signed integer 3x4 matrix.
  298. /// @see gtc_matrix_integer
  299. typedef mediump_imat3x4 imat3x4;
  300. /// Signed integer 4x2 matrix.
  301. /// @see gtc_matrix_integer
  302. typedef mediump_imat4x2 imat4x2;
  303. /// Signed integer 4x3 matrix.
  304. /// @see gtc_matrix_integer
  305. typedef mediump_imat4x3 imat4x3;
  306. /// Signed integer 4x4 matrix.
  307. /// @see gtc_matrix_integer
  308. typedef mediump_imat4x4 imat4x4;
  309. #endif//GLM_PRECISION
  310. #if(defined(GLM_PRECISION_HIGHP_UINT))
  311. typedef highp_umat2 umat2;
  312. typedef highp_umat3 umat3;
  313. typedef highp_umat4 umat4;
  314. typedef highp_umat2x2 umat2x2;
  315. typedef highp_umat2x3 umat2x3;
  316. typedef highp_umat2x4 umat2x4;
  317. typedef highp_umat3x2 umat3x2;
  318. typedef highp_umat3x3 umat3x3;
  319. typedef highp_umat3x4 umat3x4;
  320. typedef highp_umat4x2 umat4x2;
  321. typedef highp_umat4x3 umat4x3;
  322. typedef highp_umat4x4 umat4x4;
  323. #elif(defined(GLM_PRECISION_LOWP_UINT))
  324. typedef lowp_umat2 umat2;
  325. typedef lowp_umat3 umat3;
  326. typedef lowp_umat4 umat4;
  327. typedef lowp_umat2x2 umat2x2;
  328. typedef lowp_umat2x3 umat2x3;
  329. typedef lowp_umat2x4 umat2x4;
  330. typedef lowp_umat3x2 umat3x2;
  331. typedef lowp_umat3x3 umat3x3;
  332. typedef lowp_umat3x4 umat3x4;
  333. typedef lowp_umat4x2 umat4x2;
  334. typedef lowp_umat4x3 umat4x3;
  335. typedef lowp_umat4x4 umat4x4;
  336. #else //if(defined(GLM_PRECISION_MEDIUMP_UINT))
  337. /// Unsigned integer 2x2 matrix.
  338. /// @see gtc_matrix_integer
  339. typedef mediump_umat2 umat2;
  340. /// Unsigned integer 3x3 matrix.
  341. /// @see gtc_matrix_integer
  342. typedef mediump_umat3 umat3;
  343. /// Unsigned integer 4x4 matrix.
  344. /// @see gtc_matrix_integer
  345. typedef mediump_umat4 umat4;
  346. /// Unsigned integer 2x2 matrix.
  347. /// @see gtc_matrix_integer
  348. typedef mediump_umat2x2 umat2x2;
  349. /// Unsigned integer 2x3 matrix.
  350. /// @see gtc_matrix_integer
  351. typedef mediump_umat2x3 umat2x3;
  352. /// Unsigned integer 2x4 matrix.
  353. /// @see gtc_matrix_integer
  354. typedef mediump_umat2x4 umat2x4;
  355. /// Unsigned integer 3x2 matrix.
  356. /// @see gtc_matrix_integer
  357. typedef mediump_umat3x2 umat3x2;
  358. /// Unsigned integer 3x3 matrix.
  359. /// @see gtc_matrix_integer
  360. typedef mediump_umat3x3 umat3x3;
  361. /// Unsigned integer 3x4 matrix.
  362. /// @see gtc_matrix_integer
  363. typedef mediump_umat3x4 umat3x4;
  364. /// Unsigned integer 4x2 matrix.
  365. /// @see gtc_matrix_integer
  366. typedef mediump_umat4x2 umat4x2;
  367. /// Unsigned integer 4x3 matrix.
  368. /// @see gtc_matrix_integer
  369. typedef mediump_umat4x3 umat4x3;
  370. /// Unsigned integer 4x4 matrix.
  371. /// @see gtc_matrix_integer
  372. typedef mediump_umat4x4 umat4x4;
  373. #endif//GLM_PRECISION
  374. /// @}
  375. }//namespace glm