nuclear@0: #ifndef MESH_H_ nuclear@0: #define MESH_H_ nuclear@0: nuclear@0: struct mesh_attrib { nuclear@0: char *name; nuclear@0: int count, elem_size; nuclear@0: void *data; nuclear@0: nuclear@0: int datasz; nuclear@0: }; nuclear@0: nuclear@0: struct mesh { nuclear@0: char *name; nuclear@0: int poly_nverts; /* 3, 4, etc */ nuclear@0: nuclear@0: struct mesh_attrib *attr; nuclear@0: int num_attr; nuclear@0: nuclear@0: int **polyidx; nuclear@0: int num_poly; nuclear@0: }; nuclear@0: nuclear@0: #ifdef __cplusplus nuclear@0: extern "C" { nuclear@0: #endif nuclear@0: nuclear@0: int mattr_init(struct mesh_attrib *ma); nuclear@0: void mattr_destroy(struct mesh_attrib *ma); nuclear@0: nuclear@0: int mattr_set_name(struct mesh_attrib *ma, const char *name); nuclear@0: int mattr_add_elem(struct mesh_attrib *ma, void *data); nuclear@0: nuclear@0: int mesh_init(struct mesh *m); nuclear@0: void mesh_destroy(struct mesh *m); nuclear@0: nuclear@0: int mesh_set_name(struct mesh *m, const char *name); nuclear@0: int mesh_add_attrib(struct mesh *m, struct mesh_attrib *attr); nuclear@0: int mesh_find_attrib(struct mesh *m, const char *name); nuclear@0: nuclear@0: #ifdef __cplusplus nuclear@0: } nuclear@0: #endif nuclear@0: nuclear@0: #endif /* MESH_H_ */