diff options
author | vimene <vincent.menegaux@gmail.com> | 2023-11-17 13:05:22 +0100 |
---|---|---|
committer | vimene <vincent.menegaux@gmail.com> | 2023-11-17 13:05:22 +0100 |
commit | 3dc7f970305480bf5c4f60c21416adfc0b8dc958 (patch) | |
tree | b48b3d4cc153f5c88c43194eaf62475e5afe7d00 /vertex.cpp | |
download | engine-3dc7f970305480bf5c4f60c21416adfc0b8dc958.tar.gz |
initial commit
Diffstat (limited to 'vertex.cpp')
-rw-r--r-- | vertex.cpp | 16 |
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}; +} |