-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMesh.h
More file actions
55 lines (41 loc) · 934 Bytes
/
Mesh.h
File metadata and controls
55 lines (41 loc) · 934 Bytes
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef __Mesh_H__
#define __Mesh_H__
#include "Module.h"
#include "Globals.h"
#include <vector>
#include <string>
namespace tinygltf
{
class Model;
class Mesh;
class Primitive;
class Accessor;
}
class Mesh
{
public:
Mesh();
~Mesh();
void Load(const tinygltf::Model sourceModel, const tinygltf::Mesh srcMesh, const tinygltf::Primitive primitive);
void Draw(const std::vector<unsigned>& textures);
unsigned vbo = 0;
unsigned tex = 0;
unsigned ebo = 0;
unsigned vao = 0;
void DeleteBuffers();
//Name
std::string GetFileName() { return meshName; }
//Properties
int GetVertexCount() { return vertexCount; }
int GetIndexCount() { return indexCount; }
private:
//Mesh Name
std::string meshName;
//Properties
int vertexCount;
int indexCount;
int materialIndex;
void LoadEBO(const tinygltf::Model& model, const tinygltf::Mesh& mesh, const tinygltf::Primitive& primitive);
void CreateVAO();
};
#endif