-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parser.h
40 lines (36 loc) · 897 Bytes
/
Parser.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
#include "TextureLoader.h"
struct GROUP {
int numVertices;
unsigned int material_id;
};
class ObjParser : public TextureLoader {
public:
std::vector<tinyobj::shape_t> shapes;
std::vector<tinyobj::material_t> materials;
std::vector<GROUP> *group;
GLuint *vao;
GLuint *texture;
int shapeCount;
mat4 normalizeMatrix;
mat4 loadObj(char*);
private:
mat4 getNormalizeMatrix(std::vector<tinyobj::shape_t>);
};
class FbxParser : public TextureLoader {
public:
fbx_handles fbxHandles;
std::vector<tinyobj::shape_t> shapes;
std::vector<tinyobj::material_t> materials;
std::vector<GROUP> *group;
GLuint *vao;
GLuint *texture;
GLuint *positionBuffer;
GLuint *normalBuffer;
GLuint *textureCoordinateBuffer;
GLuint *indexBuffer;
int shapeCount;
mat4 normalizeMatrix;
mat4 loadFbx(char*);
private:
mat4 getNormalizeMatrix(std::vector<tinyobj::shape_t>);
};