PGR Copakond OpenGL Engine - Bowling
Loading...
Searching...
No Matches
objLoader.h
Go to the documentation of this file.
1#ifndef PGR_SEM_COPAKOND_OBJLOADER_H
2#define PGR_SEM_COPAKOND_OBJLOADER_H
3
5#include "../meshes/mesh.h"
6
7#include <string>
8#include <vector>
9#include <fstream>
10#include <iostream>
11#include <string>
12#include <sstream>
13#include <limits>
14#include <map>
15
16namespace copakond {
18 class ObjLoader {
19 private:
20 std::vector<float> _vertices;
21 std::vector<float> _normals;
22 std::vector<float> _uvs;
23 std::vector<unsigned int> _faces;
24 std::map<std::string, std::shared_ptr<Material>> _materialDict;
25 std::vector<SubMesh> _subMeshes;
26
28 void remapBuffers(const std::vector<float> &vertices, const std::vector<float> &normals, const std::vector<float> &tempUvs, const
29 std::vector<std::string> &faces);
30
31 public:
32 ObjLoader(const std::string &fileName, bool normalizeCoord);
33
34 static std::vector<std::string> splitString(const std::string &str);
35
36
37
38 const std::vector<SubMesh>& getSubMeshes() const { return _subMeshes; }
39 const std::vector<float> &getVertices() const { return _vertices; }
40 const std::vector<float> &getNormals() const { return _normals; }
41 const std::vector<float>& getUvs() const { return _uvs; }
42 const std::vector<unsigned int> &getFaces() const { return _faces; }
43 };
44}
45
46#endif //PGR_SEM_COPAKOND_OBJLOADER_H
static std::vector< std::string > splitString(const std::string &str)
Definition objLoader.cpp:14
ObjLoader(const std::string &fileName, bool normalizeCoord)
Definition objLoader.cpp:25
const std::vector< float > & getNormals() const
Definition objLoader.h:40
const std::vector< unsigned int > & getFaces() const
Definition objLoader.h:42
const std::vector< float > & getUvs() const
Definition objLoader.h:41
const std::vector< SubMesh > & getSubMeshes() const
Definition objLoader.h:38
const std::vector< float > & getVertices() const
Definition objLoader.h:39
PGR Semestral work with sample scenes and bowling. doxygen was generated with a help of LLM.
Definition bezier.cpp:3