scenefile
annotate src/mesh.h @ 0:8c6d64af9505
scenefile
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Fri, 13 Jan 2012 09:34:16 +0200 |
parents | |
children | 38489ad82bf4 |
rev | line source |
---|---|
nuclear@0 | 1 #ifndef MESH_H_ |
nuclear@0 | 2 #define MESH_H_ |
nuclear@0 | 3 |
nuclear@0 | 4 struct mesh_attrib { |
nuclear@0 | 5 char *name; |
nuclear@0 | 6 int count, elem_size; |
nuclear@0 | 7 void *data; |
nuclear@0 | 8 |
nuclear@0 | 9 int datasz; |
nuclear@0 | 10 }; |
nuclear@0 | 11 |
nuclear@0 | 12 struct mesh { |
nuclear@0 | 13 char *name; |
nuclear@0 | 14 int poly_nverts; /* 3, 4, etc */ |
nuclear@0 | 15 |
nuclear@0 | 16 struct mesh_attrib *attr; |
nuclear@0 | 17 int num_attr; |
nuclear@0 | 18 |
nuclear@0 | 19 int **polyidx; |
nuclear@0 | 20 int num_poly; |
nuclear@0 | 21 }; |
nuclear@0 | 22 |
nuclear@0 | 23 #ifdef __cplusplus |
nuclear@0 | 24 extern "C" { |
nuclear@0 | 25 #endif |
nuclear@0 | 26 |
nuclear@0 | 27 int mattr_init(struct mesh_attrib *ma); |
nuclear@0 | 28 void mattr_destroy(struct mesh_attrib *ma); |
nuclear@0 | 29 |
nuclear@0 | 30 int mattr_set_name(struct mesh_attrib *ma, const char *name); |
nuclear@0 | 31 int mattr_add_elem(struct mesh_attrib *ma, void *data); |
nuclear@0 | 32 |
nuclear@0 | 33 int mesh_init(struct mesh *m); |
nuclear@0 | 34 void mesh_destroy(struct mesh *m); |
nuclear@0 | 35 |
nuclear@0 | 36 int mesh_set_name(struct mesh *m, const char *name); |
nuclear@0 | 37 int mesh_add_attrib(struct mesh *m, struct mesh_attrib *attr); |
nuclear@0 | 38 int mesh_find_attrib(struct mesh *m, const char *name); |
nuclear@0 | 39 |
nuclear@0 | 40 #ifdef __cplusplus |
nuclear@0 | 41 } |
nuclear@0 | 42 #endif |
nuclear@0 | 43 |
nuclear@0 | 44 #endif /* MESH_H_ */ |