blob: 962d3256e608b535dafbdb5269d5df6bf436935e (
plain)
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
|
#ifndef OBJ_H
#define OBJ_H
typedef struct
{
float x, y, z;
} ObjVertex;
typedef ObjVertex ObjNormal;
typedef struct
{
float u, v;
} ObjTexCoord;
typedef struct
{
int Vertex[3];
int Normal[3];
int TexCoord[3];
} ObjTriangle;
typedef struct
{
int nVertex, nNormal, nTexCoord, nTriangle;
ObjVertex *VertexArray;
ObjNormal *NormalArray;
ObjTexCoord *TexCoordArray;
ObjTriangle *TriangleArray;
} ObjModel;
ObjModel *ObjLoadModel(char *, size_t);
size_t ObjLoadFile(char *, char **);
#endif
|