-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmesh.h
41 lines (35 loc) · 968 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 MESH_CLASS_H
#define MESH_CLASS_H
/*
* This is the mesh class for OpenGL implementation of the 3D mode (Mac and Linux).
*
*/
#include<string>
#include"vao.h"
#include"ebo.h"
#include"camera.h"
#include"texture.h"
#include <vector>
class Mesh
{
public:
std::vector <Vertex> vertices;
std::vector <GLuint> indices;
std::vector <Texture> textures;
// Store VAO in public so it can be used in the Draw function
VAO VAO1;
// Initializes the mesh
Mesh(std::vector <Vertex>& vertices, std::vector <GLuint>& indices, std::vector <Texture>& textures);
// Draws the mesh
void Draw
(
Shader& shader,
Camera& camera,
glm::mat4 matrix = glm::mat4(1.0f),
glm::vec3 translation = glm::vec3(0.0f, 0.0f, 0.0f),
glm::quat rotation = glm::quat(1.0f, 0.0f, 0.0f, 0.0f),
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f)
);
//void Draw(Shader& shader, Camera& camera);
};
#endif