aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/obj3d.cpp
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2023-11-26 08:43:14 +0100
committervimene <vincent.menegaux@gmail.com>2023-11-26 08:43:14 +0100
commit5a1d67d1797a3db874e44500e13237d676843185 (patch)
tree17d0f1c2db6cc32fe40fdde4a081b96e8ad0ae13 /src/o3d/obj3d.cpp
parentf63febed2a769d0c55192e192a20b8e39f162932 (diff)
downloadengine-5a1d67d1797a3db874e44500e13237d676843185.tar.gz
added namespaces, made every function in engine.cpp static and added warnings' flags
Diffstat (limited to 'src/o3d/obj3d.cpp')
-rw-r--r--src/o3d/obj3d.cpp19
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