diff options
Diffstat (limited to 'src/o3d/obj3d.h')
-rw-r--r-- | src/o3d/obj3d.h | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/src/o3d/obj3d.h b/src/o3d/obj3d.h index 795b337..3a931b1 100644 --- a/src/o3d/obj3d.h +++ b/src/o3d/obj3d.h @@ -1,46 +1,22 @@ #ifndef O3D_OBJ3D_H #define O3D_OBJ3D_H -#include <vector> -#include <array> -#include <iterator> -#include "o3d/vertex.h" -#include "o3d/tri_vertex.h" +#include "math/math_vector.h" +#include "o3d/mesh.h" namespace engine::o3d { +class Scene; + class Object3D { public: - class TriangleVertex3Iterator { - public: - using iterator_category = std::input_iterator_tag; - using value_type = TriangleVertex3; - using difference_type = TriangleVertex3; - using pointer = const TriangleVertex3*; - using reference = TriangleVertex3; - - explicit TriangleVertex3Iterator(const Object3D* obj, int face_ind = 0); - TriangleVertex3Iterator& operator++(); - TriangleVertex3Iterator operator++(int); - bool operator==(TriangleVertex3Iterator other) const; - bool operator!=(TriangleVertex3Iterator other) const; - reference operator*() const; - - private: - const Object3D* obj; - int face_ind; - - }; - - static Object3D cube(); // this function should not be in this file - - Object3D(std::vector<Vertex3> pts, std::vector<std::array<int, 3>> faces); - TriangleVertex3Iterator begin(); - TriangleVertex3Iterator end(); + Scene* scene = nullptr; + Mesh mesh; + engine::math::MathVector3 loc; + float scale; + float rot_x, rot_y, rot_z; - private: - std::vector<Vertex3> pts; - std::vector<std::array<int, 3>> faces; + Object3D(Mesh mesh, engine::math::MathVector3 loc, float scale, float rot_x, float rot_y, float rot_z); }; } |