| 1 | #include <limits> |
|---|---|
| 2 | |
| 3 | #include <math/seadBoundBox.h> |
| 4 | |
| 5 | namespace sead |
| 6 | { |
| 7 | template <typename T> |
| 8 | static BoundBox2<T> getUndefined2() |
| 9 | { |
| 10 | Vector2<T> min(std::numeric_limits<T>::max(), std::numeric_limits<T>::max()); |
| 11 | Vector2<T> max(std::numeric_limits<T>::min(), std::numeric_limits<T>::min()); |
| 12 | return {min, max}; |
| 13 | } |
| 14 | |
| 15 | template <typename T> |
| 16 | static BoundBox3<T> getUndefined3() |
| 17 | { |
| 18 | Vector3<T> min(std::numeric_limits<T>::max(), std::numeric_limits<T>::max(), |
| 19 | std::numeric_limits<T>::max()); |
| 20 | Vector3<T> max(std::numeric_limits<T>::min(), std::numeric_limits<T>::min(), |
| 21 | std::numeric_limits<T>::min()); |
| 22 | return {min, max}; |
| 23 | } |
| 24 | |
| 25 | template <> |
| 26 | const BoundBox2<s32> BoundBox2<s32>::cUndefined = getUndefined2<s32>(); |
| 27 | template <> |
| 28 | const BoundBox2<u32> BoundBox2<u32>::cUndefined = getUndefined2<u32>(); |
| 29 | template <> |
| 30 | const BoundBox2<s64> BoundBox2<s64>::cUndefined = getUndefined2<s64>(); |
| 31 | template <> |
| 32 | const BoundBox2<u64> BoundBox2<u64>::cUndefined = getUndefined2<u64>(); |
| 33 | template <> |
| 34 | const BoundBox2<f32> BoundBox2<f32>::cUndefined = getUndefined2<f32>(); |
| 35 | template <> |
| 36 | const BoundBox2<f64> BoundBox2<f64>::cUndefined = getUndefined2<f64>(); |
| 37 | |
| 38 | template <> |
| 39 | const BoundBox3<s32> BoundBox3<s32>::cUndefined = getUndefined3<s32>(); |
| 40 | template <> |
| 41 | const BoundBox3<u32> BoundBox3<u32>::cUndefined = getUndefined3<u32>(); |
| 42 | template <> |
| 43 | const BoundBox3<s64> BoundBox3<s64>::cUndefined = getUndefined3<s64>(); |
| 44 | template <> |
| 45 | const BoundBox3<u64> BoundBox3<u64>::cUndefined = getUndefined3<u64>(); |
| 46 | template <> |
| 47 | const BoundBox3<f32> BoundBox3<f32>::cUndefined = getUndefined3<f32>(); |
| 48 | template <> |
| 49 | const BoundBox3<f64> BoundBox3<f64>::cUndefined = getUndefined3<f64>(); |
| 50 | } // namespace sead |
| 51 |