This commit is contained in:
parent
78ba333164
commit
78f53fdd54
3 changed files with 76 additions and 18 deletions
28
headers/mesh.hpp
Normal file
28
headers/mesh.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef MESH_H
|
||||
#define MESH_H
|
||||
#include "camera.hpp"
|
||||
#include "shader.hpp"
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
|
||||
class Mesh {
|
||||
public:
|
||||
Mesh(Shader *s, unsigned int VAO, int count);
|
||||
~Mesh();
|
||||
void draw(Camera *c);
|
||||
void setPosition(glm::vec3 p);
|
||||
void setScale(glm::vec3 s);
|
||||
void setRotation(glm::quat r);
|
||||
void setOwned(bool o);
|
||||
Shader *getShader();
|
||||
|
||||
private:
|
||||
bool buffersOwned;
|
||||
int count;
|
||||
unsigned int VAO;
|
||||
Shader *shader;
|
||||
glm::vec3 position; /*0,0,0*/
|
||||
glm::vec3 scale; /*1,1,1*/
|
||||
glm::quat rotation; /*1,0,0,0*/
|
||||
};
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue