aboutsummaryrefslogtreecommitdiff
path: root/vertex.cpp
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2023-11-17 13:05:22 +0100
committervimene <vincent.menegaux@gmail.com>2023-11-17 13:05:22 +0100
commit3dc7f970305480bf5c4f60c21416adfc0b8dc958 (patch)
treeb48b3d4cc153f5c88c43194eaf62475e5afe7d00 /vertex.cpp
downloadengine-3dc7f970305480bf5c4f60c21416adfc0b8dc958.tar.gz
initial commit
Diffstat (limited to 'vertex.cpp')
-rw-r--r--vertex.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/vertex.cpp b/vertex.cpp
new file mode 100644
index 0000000..d136754
--- /dev/null
+++ b/vertex.cpp
@@ -0,0 +1,16 @@
+#include "vertex.h"
+#include "math_vector.h"
+#include "vertex_data.h"
+
+Vertex3::Vertex3(MathVector3 point, VertexData data) : point{point}, data{data} {
+}
+
+Vertex4::Vertex4(MathVector4 point, VertexData data) : point{point}, data{data} {
+}
+
+Vertex4::Vertex4(Vertex3 vertex) : point{vertex.point}, data{vertex.data} {
+}
+
+Vertex3 Vertex4::div_by_w() const {
+ return {point.div_by_w(), data};
+}