_swizzle_func.hpp 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. #pragma once
  2. #define GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, CONST, A, B) \
  3. vec<2, T, Q> A ## B() CONST \
  4. { \
  5. return vec<2, T, Q>(this->A, this->B); \
  6. }
  7. #define GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, CONST, A, B, C) \
  8. vec<3, T, Q> A ## B ## C() CONST \
  9. { \
  10. return vec<3, T, Q>(this->A, this->B, this->C); \
  11. }
  12. #define GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, CONST, A, B, C, D) \
  13. vec<4, T, Q> A ## B ## C ## D() CONST \
  14. { \
  15. return vec<4, T, Q>(this->A, this->B, this->C, this->D); \
  16. }
  17. #define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(T, P, L, CONST, A, B) \
  18. template<typename T> \
  19. vec<L, T, Q> vec<L, T, Q>::A ## B() CONST \
  20. { \
  21. return vec<2, T, Q>(this->A, this->B); \
  22. }
  23. #define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(T, P, L, CONST, A, B, C) \
  24. template<typename T> \
  25. vec<3, T, Q> vec<L, T, Q>::A ## B ## C() CONST \
  26. { \
  27. return vec<3, T, Q>(this->A, this->B, this->C); \
  28. }
  29. #define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(T, P, L, CONST, A, B, C, D) \
  30. template<typename T> \
  31. vec<4, T, Q> vec<L, T, Q>::A ## B ## C ## D() CONST \
  32. { \
  33. return vec<4, T, Q>(this->A, this->B, this->C, this->D); \
  34. }
  35. #define GLM_MUTABLE
  36. #define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, A, B) \
  37. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, 2, GLM_MUTABLE, A, B) \
  38. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, 2, GLM_MUTABLE, B, A)
  39. #define GLM_SWIZZLE_GEN_REF_FROM_VEC2(T, P) \
  40. GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, x, y) \
  41. GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, r, g) \
  42. GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, s, t)
  43. #define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
  44. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, B) \
  45. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, C) \
  46. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, A) \
  47. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, C) \
  48. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, A) \
  49. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, B)
  50. #define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
  51. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, A, B, C) \
  52. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, A, C, B) \
  53. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, B, A, C) \
  54. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, B, C, A) \
  55. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, C, A, B) \
  56. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, C, B, A)
  57. #define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, A, B, C) \
  58. GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
  59. GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(T, P, A, B, C)
  60. #define GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, P) \
  61. GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, x, y, z) \
  62. GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, r, g, b) \
  63. GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, s, t, p)
  64. #define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  65. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, B) \
  66. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, C) \
  67. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, D) \
  68. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, A) \
  69. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, C) \
  70. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, D) \
  71. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, A) \
  72. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, B) \
  73. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, D) \
  74. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, A) \
  75. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, B) \
  76. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, C)
  77. #define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  78. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, B, C) \
  79. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, B, D) \
  80. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, C, B) \
  81. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, C, D) \
  82. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, D, B) \
  83. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, D, C) \
  84. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, A, C) \
  85. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, A, D) \
  86. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, C, A) \
  87. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, C, D) \
  88. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, D, A) \
  89. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, D, C) \
  90. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, A, B) \
  91. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, A, D) \
  92. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, B, A) \
  93. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, B, D) \
  94. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, D, A) \
  95. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, D, B) \
  96. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, A, B) \
  97. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, A, C) \
  98. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, B, A) \
  99. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, B, C) \
  100. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, C, A) \
  101. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, C, B)
  102. #define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  103. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, C, B, D) \
  104. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, C, D, B) \
  105. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, D, B, C) \
  106. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, D, C, B) \
  107. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, B, D, C) \
  108. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, B, C, D) \
  109. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, C, A, D) \
  110. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, C, D, A) \
  111. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, D, A, C) \
  112. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, D, C, A) \
  113. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, A, D, C) \
  114. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, A, C, D) \
  115. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, B, A, D) \
  116. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, B, D, A) \
  117. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, D, A, B) \
  118. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, D, B, A) \
  119. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, A, D, B) \
  120. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, A, B, D) \
  121. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, C, B, A) \
  122. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, C, A, B) \
  123. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, A, B, C) \
  124. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, A, C, B) \
  125. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, B, A, C) \
  126. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, B, C, A)
  127. #define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, A, B, C, D) \
  128. GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  129. GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  130. GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D)
  131. #define GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, P) \
  132. GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, x, y, z, w) \
  133. GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, r, g, b, a) \
  134. GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, s, t, p, q)
  135. #define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(T, P, A, B) \
  136. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \
  137. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \
  138. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \
  139. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B)
  140. #define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(T, P, A, B) \
  141. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \
  142. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \
  143. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \
  144. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \
  145. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \
  146. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \
  147. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \
  148. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B)
  149. #define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(T, P, A, B) \
  150. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \
  151. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \
  152. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \
  153. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \
  154. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \
  155. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \
  156. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \
  157. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \
  158. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \
  159. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \
  160. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \
  161. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \
  162. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \
  163. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \
  164. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \
  165. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B)
  166. #define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, A, B) \
  167. GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(T, P, A, B) \
  168. GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(T, P, A, B) \
  169. GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(T, P, A, B)
  170. #define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P) \
  171. GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, x, y) \
  172. GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, r, g) \
  173. GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, s, t)
  174. #define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
  175. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \
  176. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \
  177. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, C) \
  178. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \
  179. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B) \
  180. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, C) \
  181. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, A) \
  182. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, B) \
  183. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, C)
  184. #define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
  185. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \
  186. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \
  187. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, C) \
  188. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \
  189. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \
  190. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, C) \
  191. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, A) \
  192. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, B) \
  193. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, C) \
  194. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \
  195. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \
  196. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, C) \
  197. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \
  198. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B) \
  199. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, C) \
  200. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, A) \
  201. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, B) \
  202. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, C) \
  203. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, A) \
  204. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, B) \
  205. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, C) \
  206. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, A) \
  207. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, B) \
  208. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, C) \
  209. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, A) \
  210. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, B) \
  211. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, C)
  212. #define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
  213. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \
  214. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \
  215. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, C) \
  216. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \
  217. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \
  218. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, C) \
  219. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, A) \
  220. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, B) \
  221. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, C) \
  222. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \
  223. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \
  224. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, C) \
  225. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \
  226. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \
  227. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, C) \
  228. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, A) \
  229. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, B) \
  230. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, C) \
  231. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, A) \
  232. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, B) \
  233. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, C) \
  234. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, A) \
  235. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, B) \
  236. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, C) \
  237. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, A) \
  238. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, B) \
  239. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, C) \
  240. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \
  241. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \
  242. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, C) \
  243. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \
  244. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \
  245. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, C) \
  246. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, A) \
  247. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, B) \
  248. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, C) \
  249. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \
  250. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \
  251. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, C) \
  252. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \
  253. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B) \
  254. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, C) \
  255. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, A) \
  256. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, B) \
  257. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, C) \
  258. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, A) \
  259. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, B) \
  260. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, C) \
  261. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, A) \
  262. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, B) \
  263. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, C) \
  264. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, A) \
  265. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, B) \
  266. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, C) \
  267. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, A) \
  268. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, B) \
  269. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, C) \
  270. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, A) \
  271. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, B) \
  272. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, C) \
  273. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, A) \
  274. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, B) \
  275. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, C) \
  276. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, A) \
  277. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, B) \
  278. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, C) \
  279. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, A) \
  280. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, B) \
  281. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, C) \
  282. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, A) \
  283. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, B) \
  284. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, C) \
  285. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, A) \
  286. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, B) \
  287. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, C) \
  288. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, A) \
  289. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, B) \
  290. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, C) \
  291. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, A) \
  292. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, B) \
  293. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, C)
  294. #define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, A, B, C) \
  295. GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
  296. GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
  297. GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(T, P, A, B, C)
  298. #define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P) \
  299. GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, x, y, z) \
  300. GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, r, g, b) \
  301. GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, s, t, p)
  302. #define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  303. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \
  304. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \
  305. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, C) \
  306. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, D) \
  307. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \
  308. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B) \
  309. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, C) \
  310. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, D) \
  311. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, A) \
  312. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, B) \
  313. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, C) \
  314. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, D) \
  315. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, A) \
  316. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, B) \
  317. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, C) \
  318. GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, D)
  319. #define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  320. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \
  321. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \
  322. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, C) \
  323. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, D) \
  324. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \
  325. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \
  326. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, C) \
  327. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, D) \
  328. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, A) \
  329. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, B) \
  330. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, C) \
  331. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, D) \
  332. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, A) \
  333. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, B) \
  334. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, C) \
  335. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, D) \
  336. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \
  337. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \
  338. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, C) \
  339. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, D) \
  340. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \
  341. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B) \
  342. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, C) \
  343. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, D) \
  344. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, A) \
  345. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, B) \
  346. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, C) \
  347. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, D) \
  348. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, A) \
  349. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, B) \
  350. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, C) \
  351. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, D) \
  352. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, A) \
  353. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, B) \
  354. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, C) \
  355. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, D) \
  356. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, A) \
  357. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, B) \
  358. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, C) \
  359. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, D) \
  360. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, A) \
  361. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, B) \
  362. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, C) \
  363. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, D) \
  364. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, A) \
  365. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, B) \
  366. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, C) \
  367. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, D) \
  368. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, A) \
  369. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, B) \
  370. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, C) \
  371. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, D) \
  372. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, A) \
  373. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, B) \
  374. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, C) \
  375. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, D) \
  376. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, A) \
  377. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, B) \
  378. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, C) \
  379. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, D) \
  380. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, A) \
  381. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, B) \
  382. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, C) \
  383. GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, D)
  384. #define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  385. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \
  386. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \
  387. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, C) \
  388. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, D) \
  389. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \
  390. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \
  391. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, C) \
  392. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, D) \
  393. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, A) \
  394. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, B) \
  395. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, C) \
  396. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, D) \
  397. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, A) \
  398. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, B) \
  399. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, C) \
  400. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, D) \
  401. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \
  402. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \
  403. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, C) \
  404. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, D) \
  405. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \
  406. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \
  407. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, C) \
  408. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, D) \
  409. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, A) \
  410. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, B) \
  411. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, C) \
  412. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, D) \
  413. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, A) \
  414. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, B) \
  415. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, C) \
  416. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, D) \
  417. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, A) \
  418. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, B) \
  419. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, C) \
  420. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, D) \
  421. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, A) \
  422. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, B) \
  423. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, C) \
  424. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, D) \
  425. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, A) \
  426. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, B) \
  427. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, C) \
  428. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, D) \
  429. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, A) \
  430. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, B) \
  431. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, C) \
  432. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, D) \
  433. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, A) \
  434. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, B) \
  435. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, C) \
  436. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, D) \
  437. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, A) \
  438. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, B) \
  439. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, C) \
  440. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, D) \
  441. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, A) \
  442. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, B) \
  443. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, C) \
  444. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, D) \
  445. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, A) \
  446. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, B) \
  447. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, C) \
  448. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, D) \
  449. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \
  450. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \
  451. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, C) \
  452. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, D) \
  453. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \
  454. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \
  455. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, C) \
  456. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, D) \
  457. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, A) \
  458. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, B) \
  459. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, C) \
  460. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, D) \
  461. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, A) \
  462. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, B) \
  463. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, C) \
  464. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, D) \
  465. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \
  466. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \
  467. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, C) \
  468. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, D) \
  469. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \
  470. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B) \
  471. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, C) \
  472. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, D) \
  473. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, A) \
  474. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, B) \
  475. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, C) \
  476. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, D) \
  477. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, A) \
  478. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, B) \
  479. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, C) \
  480. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, D) \
  481. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, A) \
  482. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, B) \
  483. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, C) \
  484. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, D) \
  485. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, A) \
  486. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, B) \
  487. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, C) \
  488. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, D) \
  489. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, A) \
  490. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, B) \
  491. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, C) \
  492. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, D) \
  493. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, A) \
  494. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, B) \
  495. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, C) \
  496. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, D) \
  497. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, A) \
  498. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, B) \
  499. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, C) \
  500. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, D) \
  501. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, A) \
  502. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, B) \
  503. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, C) \
  504. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, D) \
  505. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, A) \
  506. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, B) \
  507. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, C) \
  508. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, D) \
  509. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, A) \
  510. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, B) \
  511. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, C) \
  512. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, D) \
  513. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, A) \
  514. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, B) \
  515. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, C) \
  516. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, D) \
  517. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, A) \
  518. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, B) \
  519. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, C) \
  520. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, D) \
  521. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, A) \
  522. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, B) \
  523. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, C) \
  524. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, D) \
  525. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, A) \
  526. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, B) \
  527. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, C) \
  528. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, D) \
  529. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, A) \
  530. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, B) \
  531. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, C) \
  532. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, D) \
  533. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, A) \
  534. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, B) \
  535. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, C) \
  536. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, D) \
  537. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, A) \
  538. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, B) \
  539. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, C) \
  540. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, D) \
  541. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, A) \
  542. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, B) \
  543. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, C) \
  544. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, D) \
  545. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, A) \
  546. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, B) \
  547. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, C) \
  548. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, D) \
  549. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, A) \
  550. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, B) \
  551. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, C) \
  552. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, D) \
  553. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, A) \
  554. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, B) \
  555. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, C) \
  556. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, D) \
  557. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, A) \
  558. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, B) \
  559. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, C) \
  560. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, D) \
  561. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, A) \
  562. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, B) \
  563. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, C) \
  564. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, D) \
  565. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, A) \
  566. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, B) \
  567. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, C) \
  568. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, D) \
  569. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, A) \
  570. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, B) \
  571. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, C) \
  572. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, D) \
  573. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, A) \
  574. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, B) \
  575. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, C) \
  576. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, D) \
  577. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, A) \
  578. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, B) \
  579. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, C) \
  580. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, D) \
  581. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, A) \
  582. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, B) \
  583. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, C) \
  584. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, D) \
  585. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, A) \
  586. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, B) \
  587. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, C) \
  588. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, D) \
  589. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, A) \
  590. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, B) \
  591. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, C) \
  592. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, D) \
  593. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, A) \
  594. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, B) \
  595. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, C) \
  596. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, D) \
  597. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, A) \
  598. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, B) \
  599. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, C) \
  600. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, D) \
  601. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, A) \
  602. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, B) \
  603. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, C) \
  604. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, D) \
  605. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, A) \
  606. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, B) \
  607. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, C) \
  608. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, D) \
  609. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, A) \
  610. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, B) \
  611. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, C) \
  612. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, D) \
  613. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, A) \
  614. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, B) \
  615. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, C) \
  616. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, D) \
  617. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, A) \
  618. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, B) \
  619. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, C) \
  620. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, D) \
  621. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, A) \
  622. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, B) \
  623. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, C) \
  624. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, D) \
  625. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, A) \
  626. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, B) \
  627. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, C) \
  628. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, D) \
  629. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, A) \
  630. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, B) \
  631. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, C) \
  632. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, D) \
  633. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, A) \
  634. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, B) \
  635. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, C) \
  636. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, D) \
  637. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, A) \
  638. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, B) \
  639. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, C) \
  640. GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, D)
  641. #define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, A, B, C, D) \
  642. GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  643. GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
  644. GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D)
  645. #define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P) \
  646. GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, x, y, z, w) \
  647. GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, r, g, b, a) \
  648. GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, s, t, p, q)