aboutsummaryrefslogtreecommitdiffstats
path: root/include/vec3.hpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2025-01-26 22:14:47 +0100
committerladevieq <ladevie.quentin@gmail.com>2025-01-26 22:14:47 +0100
commit2b2d374eb642edf345f93fa559e8cd7d76a0c9d1 (patch)
treefbc1440dc1514a55d14f72a773b0ea962eb93dd0 /include/vec3.hpp
parentf63be3ecc79499a9a362ce38d0f3be44033c37fc (diff)
Fix mesh loading for new API
Diffstat (limited to 'include/vec3.hpp')
-rw-r--r--include/vec3.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/vec3.hpp b/include/vec3.hpp
index 75b67d2..968f3ed 100644
--- a/include/vec3.hpp
+++ b/include/vec3.hpp
@@ -6,8 +6,10 @@
struct vec3u {
union {
- uint32_t vec[3];
- uint32_t x, y, z;
+ uint32_t arr[3];
+ struct {
+ uint32_t x, y, z;
+ } vec;
};
};
@@ -36,6 +38,9 @@ class vec3 {
vec3 operator>(const vec3& vec) const;
+ [[nodiscard]]vec3 (min)(const vec3& vec) const;
+ [[nodiscard]]vec3 (max)(const vec3& vec) const;
+
float operator[](int axis);
[[nodiscard]] float length() const;