-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMeshObject.h
More file actions
46 lines (35 loc) · 709 Bytes
/
Copy pathMeshObject.h
File metadata and controls
46 lines (35 loc) · 709 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
#ifndef __MESHOBJECT_H__
#define __MESHOBJECT_H__
#include "Globals.h"
#include "Application.h"
#include "GameObject.h"
#include "Mesh_R.h"
#include "Joint.h"
struct Vertex {
vec3 Position;
vec3 Normal;
vec4 Colors;
vec2 TexCoords;
vec4 Joints;
vec4 Weights;
};
class aiMesh;
class MeshObject
{
public:
MeshObject(vector<Vertex> vertices, vector<uint> indices, GameObject* gameObject);
~MeshObject();
bool SetupBuffers();
void Draw();
const vec3 getNormal(vec3 p1, vec3 p2, vec3 p3) const;
void CleanUp();
void DebugNormals() const;
public:
vector<Vertex> vertices;
vector<uint> indices;
uint VAO;
GameObject* gameobject;
private:
uint VBO, EBO;
};
#endif