From 6f0b727ccf1f3b791d38c72519a3005cf56dd2fb Mon Sep 17 00:00:00 2001 From: Kyle K Date: Sun, 3 Oct 2010 19:52:04 -0500 Subject: Initial commit --- obj.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 obj.h (limited to 'obj.h') diff --git a/obj.h b/obj.h new file mode 100644 index 0000000..962d325 --- /dev/null +++ b/obj.h @@ -0,0 +1,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 + -- cgit v1.2.3