Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
obj_model.h
1#ifndef OE_SCENE_LOADER_OBJ_MODEL_H
2#define OE_SCENE_LOADER_OBJ_MODEL_H
3
4#include <string>
5#include <map>
6#include "../mesh.h"
7#include "base.h"
8
9namespace oe::scene::loader
10{
11 class ObjModel : public BaseLoader
12 {
13 public:
14 ObjModel(const std::string& filename);
15 //ModelMeshData();
16
17 const std::map<std::string, std::vector<uint32_t>>& getIndicesByParts() const
18 {
19 return _indices_by_part;
20 }
21
22 const bool& hasNormals() { return _has_normals; }
23 const bool& hasTexcoords() { return _has_texcoords; }
24
25 std::vector<oe::scene::Vertex>& getVertices() { return _vertices; }
26 std::vector<uint32_t>& getIndices() { return _indices; }
27
28 private:
29 std::map<std::string, std::vector<uint32_t>> _indices_by_part;
30 bool _has_normals;
31 bool _has_texcoords;
32
33 std::vector<Vertex> _vertices;
34 std::vector<uint32_t> _indices;
35 };
36}
37
38#endif
Definition base.h:11
Definition obj_model.h:12
Generators of geometry / scene by computation (eg. Bezier) or from files (eg. Gltf)
Definition base.h:9