diff options
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}}; +} |