diff options
Diffstat (limited to 'src/o3d/obj3d.cpp')
-rw-r--r-- | src/o3d/obj3d.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/o3d/obj3d.cpp b/src/o3d/obj3d.cpp index 584e304..9ccb93a 100644 --- a/src/o3d/obj3d.cpp +++ b/src/o3d/obj3d.cpp @@ -1,9 +1,12 @@ #include "o3d/obj3d.h" #include <vector> #include <array> +#include "math/math_vector.h" #include "o3d/vertex.h" #include "o3d/tri_vertex.h" +using namespace engine::o3d; + Object3D::TriangleVertex3Iterator::TriangleVertex3Iterator(const Object3D* obj, int face_ind) : obj{obj}, face_ind{face_ind} { } @@ -37,14 +40,14 @@ Object3D::TriangleVertex3Iterator::reference Object3D::TriangleVertex3Iterator:: Object3D Object3D::cube() { return { { - { MathVector3(-1.f, -1.f, -1.f), {} }, - { MathVector3(+1.f, -1.f, -1.f), {} }, - { MathVector3(-1.f, +1.f, -1.f), {} }, - { MathVector3(+1.f, +1.f, -1.f), {} }, - { MathVector3(-1.f, -1.f, +1.f), {} }, - { MathVector3(+1.f, -1.f, +1.f), {} }, - { MathVector3(-1.f, +1.f, +1.f), {} }, - { MathVector3(+1.f, +1.f, +1.f), {} }, + { engine::math::MathVector3(-1.f, -1.f, -1.f), {} }, + { engine::math::MathVector3(+1.f, -1.f, -1.f), {} }, + { engine::math::MathVector3(-1.f, +1.f, -1.f), {} }, + { engine::math::MathVector3(+1.f, +1.f, -1.f), {} }, + { engine::math::MathVector3(-1.f, -1.f, +1.f), {} }, + { engine::math::MathVector3(+1.f, -1.f, +1.f), {} }, + { engine::math::MathVector3(-1.f, +1.f, +1.f), {} }, + { engine::math::MathVector3(+1.f, +1.f, +1.f), {} }, }, { { 0, 2, 3 }, { 0, 3, 1 }, // face 1 |