aboutsummaryrefslogtreecommitdiff
path: root/obj.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-11-11 15:07:52 +0000
committerrodri <rgl@antares-labs.eu>2023-11-11 15:07:52 +0000
commitb4d8077f0ce99505f7b65a67fc92aa20dc96ed78 (patch)
tree808e0a68f0db19266d4d4ccc8f78aa10360e93c0 /obj.h
parent8589a86c50275a53276e468d150737e395a04e4e (diff)
downloadlibobj-b4d8077f0ce99505f7b65a67fc92aa20dc96ed78.tar.gz
libobj-b4d8077f0ce99505f7b65a67fc92aa20dc96ed78.tar.bz2
libobj-b4d8077f0ce99505f7b65a67fc92aa20dc96ed78.zip
add support for multiple vertex type indices in face elements.
Diffstat (limited to 'obj.h')
-rw-r--r--obj.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/obj.h b/obj.h
index 83e80dc..dff7d6e 100644
--- a/obj.h
+++ b/obj.h
@@ -28,6 +28,7 @@ enum {
typedef union OBJVertex OBJVertex;
typedef struct OBJVertexArray OBJVertexArray;
+typedef struct OBJIndexArray OBJIndexArray;
typedef struct OBJElem OBJElem;
//typedef struct OBJGroup OBJGroup;
typedef struct OBJObject OBJObject;
@@ -48,10 +49,15 @@ struct OBJVertexArray
int nvert;
};
-struct OBJElem
+struct OBJIndexArray
{
int *indices;
int nindex;
+};
+
+struct OBJElem
+{
+ OBJIndexArray indextab[OBJNVERT];
int type;
OBJElem *next;
};