PGR Copakond OpenGL Engine - Bowling
Loading...
Searching...
No Matches
objMesh.h
Go to the documentation of this file.
1#ifndef PGR_SEM_COPAKOND_OBJMESH_H
2#define PGR_SEM_COPAKOND_OBJMESH_H
3
4#include "../mesh.h"
5
6namespace copakond {
8 class ObjMesh : public Mesh {
9 private:
10 std::string _fileLocation;
11 std::vector<float> _vertices;
12 std::vector<unsigned int> _faces;
13 std::vector<float> _normals;
14 std::vector<float> _uvs;
15
16 GLuint _vboUvs = 0;
17 GLuint _ebo = 0;
18
19 void constructor(const std::string &objFileLocation, bool normalizeCoord);
20
21 public:
22 ObjMesh(const std::string &objFileLocation);
23 ObjMesh(const std::string &objFileLocation, const glm::vec3 &position);
24 ObjMesh(const std::string &objFileLocation, const glm::vec3 &position, const glm::vec3 &rotation);
25 ObjMesh(const std::string &objFileLocation, const glm::vec3 &position, const glm::vec3 &rotation, const glm::vec3 &scale);
26
27 ObjMesh(const std::string &objFileLocation, bool normalizeCoord);
28 ObjMesh(const std::string &objFileLocation, bool normalizeCoord, const glm::vec3 &position);
29 ObjMesh(const std::string &objFileLocation, bool normalizeCoord, const glm::vec3 &position, const glm::vec3 &rotation);
30 ObjMesh(const std::string &objFileLocation, bool normalizeCoord, const glm::vec3 &position, const glm::vec3 &rotation,
31 const glm::vec3 &scale);
32
33 ~ObjMesh() override;
34
36 void init(GLuint shader) override;
37
39 void draw(float deltaTime) override;
40 };
41}
42
43#endif //PGR_SEM_COPAKOND_OBJMESH_H
glm::vec3 & rotation()
Definition geometry.h:61
glm::vec3 & scale()
Definition geometry.h:62
glm::vec3 & position()
Definition geometry.h:60
Mesh()
Definition mesh.cpp:12
~ObjMesh() override
Definition objMesh.cpp:41
ObjMesh(const std::string &objFileLocation)
Definition objMesh.cpp:16
PGR Semestral work with sample scenes and bowling. doxygen was generated with a help of LLM.
Definition bezier.cpp:3
Shader * shader
Definition main.cpp:37
void init()
Initializes OpenGL context, scene data, and sets up GLUT callbacks.
Definition main.cpp:42
void draw()
Main render loop. Handles updates, physics, and rendering of all scene elements.
Definition main.cpp:97