aboutsummaryrefslogtreecommitdiffstats
path: root/include/vec3.hpp
diff options
context:
space:
mode:
authorQuentin LADEVIE <qladevie@wanadev.fr>2023-01-22 17:59:24 +0100
committerQuentin LADEVIE <qladevie@wanadev.fr>2023-01-22 17:59:24 +0100
commit0a882c4b85423a170455f05a52d18f7fa7c9220b (patch)
tree3bdc24d73ba7cc828fce2b93ce85f73831b12204 /include/vec3.hpp
parent5e3bb454d50091e581d5d1d03af34e38277694b3 (diff)
Api test bindless and command buffers
Diffstat (limited to 'include/vec3.hpp')
-rw-r--r--include/vec3.hpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/vec3.hpp b/include/vec3.hpp
index 2fec69e..75b67d2 100644
--- a/include/vec3.hpp
+++ b/include/vec3.hpp
@@ -2,6 +2,14 @@
#define __VEC3_HPP_
#include <xmmintrin.h>
+#include <cstdint>
+
+struct vec3u {
+ union {
+ uint32_t vec[3];
+ uint32_t x, y, z;
+ };
+};
class vec3 {
public:
@@ -24,6 +32,10 @@ class vec3 {
vec3& operator/=(float numerator);
+ vec3 operator<(const vec3& vec) const;
+
+ vec3 operator>(const vec3& vec) const;
+
float operator[](int axis);
[[nodiscard]] float length() const;
@@ -34,10 +46,6 @@ class vec3 {
[[nodiscard]] vec3 cross(const vec3& vec) const;
- [[nodiscard]] vec3 min(const vec3& vec) const;
-
- [[nodiscard]] vec3 max(const vec3& vec) const;
-
vec3& normalize();
[[nodiscard]] bool near_zero() const;