projects
/
demo
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ed40f5d7ece57bdfecea9f3a7632026c500b9c66
[demo]
/
src
/
mesh.h
1
#ifndef MESH_H_
2
#define MESH_H_
3
4
#include <stdint.h>
5
#include <string>
6
#include <vector>
7
#include <gmath/gmath.h>
8
9
enum {
10
MESH_VERTEX = 1,
11
MESH_NORMAL = 2,
12
MESH_TEXTURE = 3,
13
MESH_INDEX = 4,
14
MESH_TANGENT = 5
15
};
16
17
class Mesh {
18
public:
19
std::vector<uint16_t> indices;
20
std::vector<Vec3> vertices;
21
std::vector<Vec3> normals;
22
std::vector<Vec2> tex_coords;
23
24
std::string name;
25
unsigned int mat_idx;
26
27
28
Mesh();
29
virtual ~Mesh() = 0;
30
31
virtual void draw() const = 0;
32
virtual void update_vertex_data() = 0;
33
};
34
35
#endif // MESH_H_