diff options
author | vimene <vincent.menegaux@gmail.com> | 2023-12-11 12:37:19 +0100 |
---|---|---|
committer | vimene <vincent.menegaux@gmail.com> | 2023-12-11 12:37:19 +0100 |
commit | ff2c784d4c4100f0301628e8a52a6910d776d067 (patch) | |
tree | 2b6c4c8e8f910be4c1737fb01ee637df6f10caeb /src/o3d/tri.cpp | |
parent | 824aa5562864ca90ea903e2fa7d99459bbdf3a0b (diff) | |
download | engine-ff2c784d4c4100f0301628e8a52a6910d776d067.tar.gz |
renamed tri{_deriv,}_vertex.{h,cpp} to tri{_deriv,}.{h,cpp}
Diffstat (limited to 'src/o3d/tri.cpp')
-rw-r--r-- | src/o3d/tri.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/o3d/tri.cpp b/src/o3d/tri.cpp new file mode 100644 index 0000000..08f5e7e --- /dev/null +++ b/src/o3d/tri.cpp @@ -0,0 +1,16 @@ +#include "o3d/tri_vertex.h" +#include <vector> +#include "math/vector.h" +#include "o3d/vertex_data.h" +#include "o3d/deriv_vertex.h" +#include "o3d/vertex.h" +#include "o3d/tri_deriv_vertex.h" + +using namespace engine::o3d; + +TriangleVertex4::TriangleVertex4(Vertex4 vertex1, Vertex4 vertex2, Vertex4 vertex3) : vertex1{vertex1}, vertex2{vertex2}, vertex3{vertex3} { +} + +TriangleDerivedVertex4 TriangleVertex4::to_derived() const { + return {{vertex1.point, 1.f, 0.f}, {vertex2.point, 0.f, 1.f}, {vertex3.point, 0.f, 0.f}}; +} |