diff options
author | vimene <vincent.menegaux@gmail.com> | 2023-11-22 20:32:48 +0100 |
---|---|---|
committer | vimene <vincent.menegaux@gmail.com> | 2023-11-22 20:32:48 +0100 |
commit | 4558a2a704bf75266f7262f8dd41bb1c9b094e1d (patch) | |
tree | 3042dedc701d0458d5ede0a85d554ec174c61a6f /src/o3d/vertex.cpp | |
parent | 6322e8d7e6e4ddb1c0a0b3a00a1b516d1a84df49 (diff) | |
download | engine-4558a2a704bf75266f7262f8dd41bb1c9b094e1d.tar.gz |
code refactoring
Diffstat (limited to 'src/o3d/vertex.cpp')
-rw-r--r-- | src/o3d/vertex.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/o3d/vertex.cpp b/src/o3d/vertex.cpp new file mode 100644 index 0000000..c3bddef --- /dev/null +++ b/src/o3d/vertex.cpp @@ -0,0 +1,16 @@ +#include "o3d/vertex.h" +#include "math/math_vector.h" +#include "o3d/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}; +} |