--- ray/src/common/objutil.h 2021/04/09 15:26:41 2.15 +++ ray/src/common/objutil.h 2022/01/15 16:57:46 2.17 @@ -1,4 +1,4 @@ -/* RCSid $Id: objutil.h,v 2.15 2021/04/09 15:26:41 greg Exp $ */ +/* RCSid $Id: objutil.h,v 2.17 2022/01/15 16:57:46 greg Exp $ */ /* * Declarations for .OBJ file utility * @@ -181,6 +181,9 @@ extern void setMaterial(Scene *sc, const char *nm); /* Add a new face to our scene, using current group and material */ extern Face * addFace(Scene *sc, VNDX vid[], int nv); +/* Get neighbor vertices: malloc array with valence in index[0] */ +extern int * getVertexNeighbors(Scene *sc, int vid); + /* Expand bounding box min & max (initialize bbox to all zeroes) */ extern int growBoundingBox(Scene *sc, double bbox[2][3], int flreq, int flexc); @@ -208,11 +211,12 @@ extern void efree(char *cp); #define getGroupID(sc,nm) findName(nm, (const char **)(sc)->grpname, (sc)->ngrps) #define getMaterialID(sc,nm) findName(nm, (const char **)(sc)->matname, (sc)->nmats) -#define CHUNKSIZ 128 /* object allocation chunk size */ +#define CHUNKBITS 7 /* object allocation chunk bits */ +#define CHUNKSIZ (1<