| 1 | #pragma once |
| 2 | |
| 3 | #include <array> |
| 4 | |
| 5 | namespace sead |
| 6 | { |
| 7 | template <typename T> |
| 8 | struct BaseVec2 |
| 9 | { |
| 10 | union |
| 11 | { |
| 12 | struct |
| 13 | { |
| 14 | T x; |
| 15 | T y; |
| 16 | }; |
| 17 | std::array<T, 2> e; |
| 18 | }; |
| 19 | }; |
| 20 | |
| 21 | template <typename T> |
| 22 | struct BaseVec3 |
| 23 | { |
| 24 | union |
| 25 | { |
| 26 | struct |
| 27 | { |
| 28 | T x; |
| 29 | T y; |
| 30 | T z; |
| 31 | }; |
| 32 | std::array<T, 3> e; |
| 33 | }; |
| 34 | }; |
| 35 | |
| 36 | template <typename T> |
| 37 | struct BaseVec4 |
| 38 | { |
| 39 | union |
| 40 | { |
| 41 | struct |
| 42 | { |
| 43 | T x; |
| 44 | T y; |
| 45 | T z; |
| 46 | T w; |
| 47 | }; |
| 48 | std::array<T, 4> e; |
| 49 | }; |
| 50 | }; |
| 51 | |
| 52 | template <typename T> |
| 53 | struct BaseQuat |
| 54 | { |
| 55 | T x; |
| 56 | T y; |
| 57 | T z; |
| 58 | T w; |
| 59 | }; |
| 60 | |
| 61 | template <typename T> |
| 62 | struct BaseMtx22 |
| 63 | { |
| 64 | union |
| 65 | { |
| 66 | T m[2][2]; |
| 67 | T a[4]; |
| 68 | }; |
| 69 | }; |
| 70 | |
| 71 | template <typename T> |
| 72 | struct BaseMtx33 |
| 73 | { |
| 74 | union |
| 75 | { |
| 76 | T m[3][3]; |
| 77 | std::array<T, 9> a; |
| 78 | }; |
| 79 | }; |
| 80 | |
| 81 | template <typename T> |
| 82 | struct BaseMtx34 |
| 83 | { |
| 84 | union |
| 85 | { |
| 86 | T m[3][4]; |
| 87 | std::array<T, 12> a; |
| 88 | }; |
| 89 | }; |
| 90 | |
| 91 | template <typename T> |
| 92 | struct BaseMtx44 |
| 93 | { |
| 94 | union |
| 95 | { |
| 96 | T m[4][4]; |
| 97 | std::array<T, 16> a; |
| 98 | }; |
| 99 | }; |
| 100 | |
| 101 | } // namespace sead |
| 102 | |