💿🐜 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.

225 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.hpp"
  22. #include "math/matrix-type.hpp"
  23. #include "math/matrix-operators.hpp"
  24. /// 2D vector of bools
  25. using bool2 = math::vector<bool, 2>;
  26. /// 3D vector of bools
  27. using bool3 = math::vector<bool, 3>;
  28. /// 4D vector of bools
  29. using bool4 = math::vector<bool, 4>;
  30. /// 2D vector of chars
  31. using char2 = math::vector<char, 2>;
  32. /// 3D vector of chars
  33. using char3 = math::vector<char, 3>;
  34. /// 4D vector of chars
  35. using char4 = math::vector<char, 4>;
  36. /// 2D vector of unsigned chars
  37. using uchar2 = math::vector<unsigned char, 2>;
  38. /// 3D vector of unsigned chars
  39. using uchar3 = math::vector<unsigned char, 3>;
  40. /// 4D vector of unsigned chars
  41. using uchar4 = math::vector<unsigned char, 4>;
  42. /// 2D vector of shorts
  43. using short2 = math::vector<short, 2>;
  44. /// 3D vector of shorts
  45. using short3 = math::vector<short, 3>;
  46. /// 4D vector of shorts
  47. using short4 = math::vector<short, 4>;
  48. /// 2D vector of unsigned shorts
  49. using ushort2 = math::vector<unsigned short, 2>;
  50. /// 3D vector of unsigned shorts
  51. using ushort3 = math::vector<unsigned short, 3>;
  52. /// 4D vector of unsigned shorts
  53. using ushort4 = math::vector<unsigned short, 4>;
  54. /// 2D vector of ints
  55. using int2 = math::vector<int, 2>;
  56. /// 3D vector of ints
  57. using int3 = math::vector<int, 3>;
  58. /// 4D vector of ints
  59. using int4 = math::vector<int, 4>;
  60. /// 2D vector of unsigned ints
  61. using uint2 = math::vector<unsigned int, 2>;
  62. /// 3D vector of unsigned ints
  63. using uint3 = math::vector<unsigned int, 3>;
  64. /// 4D vector of unsigned ints
  65. using uint4 = math::vector<unsigned int, 4>;
  66. /// 2D vector of longs
  67. using long2 = math::vector<long, 2>;
  68. /// 3D vector of longs
  69. using long3 = math::vector<long, 3>;
  70. /// 4D vector of longs
  71. using long4 = math::vector<long, 4>;
  72. /// 2D vector of unsigned longs
  73. using ulong2 = math::vector<unsigned long, 2>;
  74. /// 3D vector of unsigned longs
  75. using ulong3 = math::vector<unsigned long, 3>;
  76. /// 4D vector of unsigned longs
  77. using ulong4 = math::vector<unsigned long, 4>;
  78. /// 2D vector of floats
  79. using float2 = math::vector<float, 2>;
  80. /// 3D vector of floats
  81. using float3 = math::vector<float, 3>;
  82. /// 4D vector of floats
  83. using float4 = math::vector<float, 4>;
  84. /// 2D vector of doubles
  85. using double2 = math::vector<double, 2>;
  86. /// 3D vector of doubles
  87. using double3 = math::vector<double, 3>;
  88. /// 4D vector of doubles
  89. using double4 = math::vector<double, 4>;
  90. /// 2x2 matrix of bools
  91. using bool2x2 = math::matrix<bool, 2, 2>;
  92. /// 3x3 matrix of bools
  93. using bool3x3 = math::matrix<bool, 3, 3>;
  94. /// 4x4 matrix of bools
  95. using bool4x4 = math::matrix<bool, 4, 4>;
  96. /// 2x2 matrix of chars
  97. using char2x2 = math::matrix<char, 2, 2>;
  98. /// 3x3 matrix of chars
  99. using char3x3 = math::matrix<char, 3, 3>;
  100. /// 4x4 matrix of chars
  101. using char4x4 = math::matrix<char, 4, 4>;
  102. /// 2x2 matrix of unsigned chars
  103. using uchar2x2 = math::matrix<unsigned char, 2, 2>;
  104. /// 3x3 matrix of unsigned chars
  105. using uchar3x3 = math::matrix<unsigned char, 3, 3>;
  106. /// 4x4 matrix of unsigned chars
  107. using uchar4x4 = math::matrix<unsigned char, 4, 4>;
  108. /// 2x2 matrix of shorts
  109. using short2x2 = math::matrix<short, 2, 2>;
  110. /// 3x3 matrix of shorts
  111. using short3x3 = math::matrix<short, 3, 3>;
  112. /// 4x4 matrix of shorts
  113. using short4x4 = math::matrix<short, 4, 4>;
  114. /// 2x2 matrix of unsigned shorts
  115. using ushort2x2 = math::matrix<unsigned short, 2, 2>;
  116. /// 3x3 matrix of unsigned shorts
  117. using ushort3x3 = math::matrix<unsigned short, 3, 3>;
  118. /// 4x4 matrix of unsigned shorts
  119. using ushort4x4 = math::matrix<unsigned short, 4, 4>;
  120. /// 2x2 matrix of ints
  121. using int2x2 = math::matrix<int, 2, 2>;
  122. /// 3x3 matrix of ints
  123. using int3x3 = math::matrix<int, 3, 3>;
  124. /// 4x4 matrix of ints
  125. using int4x4 = math::matrix<int, 4, 4>;
  126. /// 2x2 matrix of unsigned ints
  127. using uint2x2 = math::matrix<unsigned int, 2, 2>;
  128. /// 3x3 matrix of unsigned ints
  129. using uint3x3 = math::matrix<unsigned int, 3, 3>;
  130. /// 4x4 matrix of unsigned ints
  131. using uint4x4 = math::matrix<unsigned int, 4, 4>;
  132. /// 2x2 matrix of longs
  133. using long2x2 = math::matrix<long, 2, 2>;
  134. /// 3x3 matrix of longs
  135. using long3x3 = math::matrix<long, 3, 3>;
  136. /// 4x4 matrix of longs
  137. using long4x4 = math::matrix<long, 4, 4>;
  138. /// 2x2 matrix of unsigned longs
  139. using ulong2x2 = math::matrix<unsigned long, 2, 2>;
  140. /// 3x3 matrix of unsigned longs
  141. using ulong3x3 = math::matrix<unsigned long, 3, 3>;
  142. /// 4x4 matrix of unsigned longs
  143. using ulong4x4 = math::matrix<unsigned long, 4, 4>;
  144. /// 2x2 matrix of floats
  145. using float2x2 = math::matrix<float, 2, 2>;
  146. /// 3x3 matrix of floats
  147. using float3x3 = math::matrix<float, 3, 3>;
  148. /// 4x4 matrix of floats
  149. using float4x4 = math::matrix<float, 4, 4>;
  150. /// 2x2 matrix of doubles
  151. using double2x2 = math::matrix<double, 2, 2>;
  152. /// 3x3 matrix of doubles
  153. using double3x3 = math::matrix<double, 3, 3>;
  154. /// 4x4 matrix of doubles
  155. using double4x4 = math::matrix<double, 4, 4>;
  156. #endif // ANTKEEPER_FUNDAMENTAL_TYPES_HPP