From 5a1d67d1797a3db874e44500e13237d676843185 Mon Sep 17 00:00:00 2001 From: vimene Date: Sun, 26 Nov 2023 08:43:14 +0100 Subject: added namespaces, made every function in engine.cpp static and added warnings' flags --- src/o3d/obj3d.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/o3d/obj3d.cpp') 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 #include +#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 -- cgit v1.2.3