OpenGL/headers/mesh.hpp
k 692fbf8196
All checks were successful
Verify build / verify_build (push) Successful in 1m0s
loading obj files working.
2025-05-28 23:56:20 -04:00

32 lines
665 B
C++

#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(Shader *s, std::string path);
~Mesh();
void draw(Camera *c);
void setPosition(glm::vec3 p);
void setScale(glm::vec3 s);
void setRotation(glm::quat r);
void setOwnedBuffers(bool o);
void setOwnedShader(bool o);
Shader *getShader();
private:
bool buffersOwned;
bool shaderOwned;
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