💿🐜 Antkeeper source code https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

226 lines
5.6 KiB

  1. /*
  2. * Copyright (C) 2021 Christopher J. Howard
  3. *
  4. * This file is part of Antkeeper source code.
  5. *
  6. * Antkeeper source code is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Antkeeper source code is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef ANTKEEPER_FUNDAMENTAL_TYPES_HPP
  20. #define ANTKEEPER_FUNDAMENTAL_TYPES_HPP
  21. #include "math/vector-type.hpp"
  22. #include "math/vector-operators.hpp"
  23. #include "math/matrix-type.hpp"
  24. #include "math/matrix-operators.hpp"
  25. /// 2D vector of bools
  26. using bool2 = math::vector<bool, 2>;
  27. /// 3D vector of bools
  28. using bool3 = math::vector<bool, 3>;
  29. /// 4D vector of bools
  30. using bool4 = math::vector<bool, 4>;
  31. /// 2D vector of chars
  32. using char2 = math::vector<char, 2>;
  33. /// 3D vector of chars
  34. using char3 = math::vector<char, 3>;
  35. /// 4D vector of chars
  36. using char4 = math::vector<char, 4>;
  37. /// 2D vector of unsigned chars
  38. using uchar2 = math::vector<unsigned char, 2>;
  39. /// 3D vector of unsigned chars
  40. using uchar3 = math::vector<unsigned char, 3>;
  41. /// 4D vector of unsigned chars
  42. using uchar4 = math::vector<unsigned char, 4>;
  43. /// 2D vector of shorts
  44. using short2 = math::vector<short, 2>;
  45. /// 3D vector of shorts
  46. using short3 = math::vector<short, 3>;
  47. /// 4D vector of shorts
  48. using short4 = math::vector<short, 4>;
  49. /// 2D vector of unsigned shorts
  50. using ushort2 = math::vector<unsigned short, 2>;
  51. /// 3D vector of unsigned shorts
  52. using ushort3 = math::vector<unsigned short, 3>;
  53. /// 4D vector of unsigned shorts
  54. using ushort4 = math::vector<unsigned short, 4>;
  55. /// 2D vector of ints
  56. using int2 = math::vector<int, 2>;
  57. /// 3D vector of ints
  58. using int3 = math::vector<int, 3>;
  59. /// 4D vector of ints
  60. using int4 = math::vector<int, 4>;
  61. /// 2D vector of unsigned ints
  62. using uint2 = math::vector<unsigned int, 2>;
  63. /// 3D vector of unsigned ints
  64. using uint3 = math::vector<unsigned int, 3>;
  65. /// 4D vector of unsigned ints
  66. using uint4 = math::vector<unsigned int, 4>;
  67. /// 2D vector of longs
  68. using long2 = math::vector<long, 2>;
  69. /// 3D vector of longs
  70. using long3 = math::vector<long, 3>;
  71. /// 4D vector of longs
  72. using long4 = math::vector<long, 4>;
  73. /// 2D vector of unsigned longs
  74. using ulong2 = math::vector<unsigned long, 2>;
  75. /// 3D vector of unsigned longs
  76. using ulong3 = math::vector<unsigned long, 3>;
  77. /// 4D vector of unsigned longs
  78. using ulong4 = math::vector<unsigned long, 4>;
  79. /// 2D vector of floats
  80. using float2 = math::vector<float, 2>;
  81. /// 3D vector of floats
  82. using float3 = math::vector<float, 3>;
  83. /// 4D vector of floats
  84. using float4 = math::vector<float, 4>;
  85. /// 2D vector of doubles
  86. using double2 = math::vector<double, 2>;
  87. /// 3D vector of doubles
  88. using double3 = math::vector<double, 3>;
  89. /// 4D vector of doubles
  90. using double4 = math::vector<double, 4>;
  91. /// 2x2 matrix of bools
  92. using bool2x2 = math::matrix<bool, 2, 2>;
  93. /// 3x3 matrix of bools
  94. using bool3x3 = math::matrix<bool, 3, 3>;
  95. /// 4x4 matrix of bools
  96. using bool4x4 = math::matrix<bool, 4, 4>;
  97. /// 2x2 matrix of chars
  98. using char2x2 = math::matrix<char, 2, 2>;
  99. /// 3x3 matrix of chars
  100. using char3x3 = math::matrix<char, 3, 3>;
  101. /// 4x4 matrix of chars
  102. using char4x4 = math::matrix<char, 4, 4>;
  103. /// 2x2 matrix of unsigned chars
  104. using uchar2x2 = math::matrix<unsigned char, 2, 2>;
  105. /// 3x3 matrix of unsigned chars
  106. using uchar3x3 = math::matrix<unsigned char, 3, 3>;
  107. /// 4x4 matrix of unsigned chars
  108. using uchar4x4 = math::matrix<unsigned char, 4, 4>;
  109. /// 2x2 matrix of shorts
  110. using short2x2 = math::matrix<short, 2, 2>;
  111. /// 3x3 matrix of shorts
  112. using short3x3 = math::matrix<short, 3, 3>;
  113. /// 4x4 matrix of shorts
  114. using short4x4 = math::matrix<short, 4, 4>;
  115. /// 2x2 matrix of unsigned shorts
  116. using ushort2x2 = math::matrix<unsigned short, 2, 2>;
  117. /// 3x3 matrix of unsigned shorts
  118. using ushort3x3 = math::matrix<unsigned short, 3, 3>;
  119. /// 4x4 matrix of unsigned shorts
  120. using ushort4x4 = math::matrix<unsigned short, 4, 4>;
  121. /// 2x2 matrix of ints
  122. using int2x2 = math::matrix<int, 2, 2>;
  123. /// 3x3 matrix of ints
  124. using int3x3 = math::matrix<int, 3, 3>;
  125. /// 4x4 matrix of ints
  126. using int4x4 = math::matrix<int, 4, 4>;
  127. /// 2x2 matrix of unsigned ints
  128. using uint2x2 = math::matrix<unsigned int, 2, 2>;
  129. /// 3x3 matrix of unsigned ints
  130. using uint3x3 = math::matrix<unsigned int, 3, 3>;
  131. /// 4x4 matrix of unsigned ints
  132. using uint4x4 = math::matrix<unsigned int, 4, 4>;
  133. /// 2x2 matrix of longs
  134. using long2x2 = math::matrix<long, 2, 2>;
  135. /// 3x3 matrix of longs
  136. using long3x3 = math::matrix<long, 3, 3>;
  137. /// 4x4 matrix of longs
  138. using long4x4 = math::matrix<long, 4, 4>;
  139. /// 2x2 matrix of unsigned longs
  140. using ulong2x2 = math::matrix<unsigned long, 2, 2>;
  141. /// 3x3 matrix of unsigned longs
  142. using ulong3x3 = math::matrix<unsigned long, 3, 3>;
  143. /// 4x4 matrix of unsigned longs
  144. using ulong4x4 = math::matrix<unsigned long, 4, 4>;
  145. /// 2x2 matrix of floats
  146. using float2x2 = math::matrix<float, 2, 2>;
  147. /// 3x3 matrix of floats
  148. using float3x3 = math::matrix<float, 3, 3>;
  149. /// 4x4 matrix of floats
  150. using float4x4 = math::matrix<float, 4, 4>;
  151. /// 2x2 matrix of doubles
  152. using double2x2 = math::matrix<double, 2, 2>;
  153. /// 3x3 matrix of doubles
  154. using double3x3 = math::matrix<double, 3, 3>;
  155. /// 4x4 matrix of doubles
  156. using double4x4 = math::matrix<double, 4, 4>;
  157. #endif // ANTKEEPER_FUNDAMENTAL_TYPES_HPP