Created mesh class
All checks were successful
Verify build / verify_build (push) Successful in 57s

This commit is contained in:
k
2025-05-27 15:32:05 -04:00
parent 78ba333164
commit 78f53fdd54
3 changed files with 76 additions and 18 deletions

28
headers/mesh.hpp Normal file
View 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