-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mesh.h
41 lines (30 loc) · 774 Bytes
/
Mesh.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef MARSROVER_MESH_H
#define MARSROVER_MESH_H
#include <vec3.hpp>
#include <vec2.hpp>
#include <glad/glad.h>
#include "Vertex.h"
#include "Texture.h"
#include "Shader.h"
#include <string>
#include <vector>
using namespace glm;
using namespace std;
class Mesh {
public:
string name;
vector<Vertex> vertices;
vector<uint> indices;
vector<Texture> textures;
glm::vec3 minVec;
glm::vec3 maxVec;
Mesh(string name, vector<Vertex> vertices, vector<uint> indices, vector<Texture> textures, glm::vec3 minVec, glm::vec3 maxVec);
const vec3 &getMinVec() const;
const vec3 &getMaxVec() const;
void draw(Shader& shader);
glm::vec3 getOrigin();
private:
uint VAO, VBO, EBO;
void setupMesh();
};
#endif //MARSROVER_MESH_H