aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/tri.hpp
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2025-12-10 20:40:42 +0100
committervimene <vincent.menegaux@gmail.com>2025-12-10 20:40:42 +0100
commit761604f9e4815e8f4355637ebb46052314cbed86 (patch)
treeb9cd6dde75ebf5897f8e67835522c6411d6ab7cb /src/o3d/tri.hpp
parentc666035bc6a51e4dd76daebefffaf8bbc951977c (diff)
downloadengine-761604f9e4815e8f4355637ebb46052314cbed86.tar.gz
renamed .h to .hpp
Diffstat (limited to 'src/o3d/tri.hpp')
-rw-r--r--src/o3d/tri.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/o3d/tri.hpp b/src/o3d/tri.hpp
new file mode 100644
index 0000000..7538d22
--- /dev/null
+++ b/src/o3d/tri.hpp
@@ -0,0 +1,22 @@
+#ifndef O3D_TRI_H
+#define O3D_TRI_H
+
+#include <vector>
+#include "o3d/vertex.hpp"
+#include "o3d/tri_deriv.hpp"
+
+namespace engine::o3d {
+
+struct Triangle {
+ Vertex vertex1;
+ Vertex vertex2;
+ Vertex vertex3;
+
+ constexpr TriangleDerived to_derived() const & {
+ return {{vertex1.vertex, 1.f, 0.f}, {vertex2.vertex, 0.f, 1.f}, {vertex3.vertex, 0.f, 0.f}};
+ }
+};
+
+}
+
+#endif // O3D_TRI_H