ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/objutil.h
(Generate patch)

Comparing ray/src/common/objutil.h (file contents):
Revision 2.15 by greg, Fri Apr 9 15:26:41 2021 UTC vs.
Revision 2.16 by greg, Fri Apr 23 18:31:45 2021 UTC

# Line 181 | Line 181 | extern void    setMaterial(Scene *sc, const char *nm);
181   /* Add a new face to our scene, using current group and material */
182   extern Face *   addFace(Scene *sc, VNDX vid[], int nv);
183  
184 + /* Get neighbor vertices: malloc array with valence in index[0] */
185 + extern int *    getVertexNeighbors(Scene *sc, int vid);
186 +
187   /* Expand bounding box min & max (initialize bbox to all zeroes) */
188   extern int      growBoundingBox(Scene *sc, double bbox[2][3],
189                                          int flreq, int flexc);
# Line 208 | Line 211 | extern void     efree(char *cp);
211   #define getGroupID(sc,nm)       findName(nm, (const char **)(sc)->grpname, (sc)->ngrps)
212   #define getMaterialID(sc,nm)    findName(nm, (const char **)(sc)->matname, (sc)->nmats)
213  
214 < #define CHUNKSIZ        128     /* object allocation chunk size */
214 > #define CHUNKBITS       7               /* object allocation chunk bits */
215 > #define CHUNKSIZ        (1<<CHUNKBITS)  /* object allocation chunk size */
216  
217   #define chunk_alloc(typ, arr, nold) \
218 <                ((nold)%CHUNKSIZ ? (arr) : \
218 >                ((nold)&(CHUNKSIZ-1) ? (arr) : \
219                  (typ *)erealloc((char *)(arr), sizeof(typ)*((nold)+CHUNKSIZ)))
220  
221   #ifdef __cplusplus

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines