-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparserstruct.h
More file actions
53 lines (43 loc) · 891 Bytes
/
parserstruct.h
File metadata and controls
53 lines (43 loc) · 891 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
#ifndef PARSERSTRUCT_H
#define PARSERSTRUCT_H
#include <vector>
#include <string>
using namespace std;
struct faceInfo{
vector<int> vertices_index;
vector<int> text_coords_index;
vector<int> normals_index;
int smooth_index;
};
struct objInfo{
string name;
vector<float*> vertices4f;
vector<float*> text_coords3f;
vector<float*> normals3f;
vector<faceInfo> faces;
};
enum DRAW_TYPE{
DRAW_POINT,
DRAW_LINE,
DRAW_POLY
};
struct Vertex4f{
float x, y, z, w;
Vertex4f(float _x,float _y,float _z, float _w = 1){
x = _x; y = _y; z = _z; w = _w;
}
};
struct Vertex3f{
float x, y, z;
Vertex3f(float _x, float _y, float _z = 0){
x = _x; y = _y; z = _z;
}
};
struct Triangle{
int a, b, c, at, bt, ct;
Triangle(int _a,int _b,int _c,int _at = 0,int _bt = 0,int _ct = 0){
a = _a; b = _b; c = _c;
at = _at; bt = _bt; ct = _ct;
}
};
#endif