ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/ot/oconv.c
(Generate patch)

Comparing ray/src/ot/oconv.c (file contents):
Revision 2.19 by schorsch, Sat Mar 27 12:41:45 2004 UTC vs.
Revision 2.23 by greg, Mon Feb 6 22:40:21 2023 UTC

# Line 18 | Line 18 | static const char RCSid[] = "$Id$";
18  
19   #define  OMARGIN        (10*FTINY)      /* margin around global cube */
20  
21 < #define  MAXOBJFIL      127             /* maximum number of scene files */
21 > #define  MAXOBJFIL      255             /* maximum number of scene files */
22  
23   char  *progname;                        /* argv[0] */
24  
# Line 28 | Line 28 | int  objlim = 6;                       /* # of objects before split */
28  
29   int  resolu = 16384;                    /* octree resolution limit */
30  
31 < CUBE  thescene = {EMPTY, {0.0, 0.0, 0.0}, 0.0};         /* our scene */
31 > CUBE  thescene = {{0.0, 0.0, 0.0}, 0.0, EMPTY};         /* our scene */
32  
33   char  *ofname[MAXOBJFIL+1];             /* object file names */
34   int  nfiles = 0;                        /* number of object files */
# Line 178 | Line 178 | cputs(void)                                    /* interactive error */
178  
179   void
180   wputs(                          /* warning message */
181 <        char  *s
181 >        const char  *s
182   )
183   {
184          if (!nowarn)
# Line 188 | Line 188 | wputs(                         /* warning message */
188  
189   void
190   eputs(                          /* put string to stderr */
191 <        register char  *s
191 >        const char  *s
192   )
193   {
194          static int  inln = 0;
# Line 217 | Line 217 | eputs(                         /* put string to stderr */
217  
218   static void
219   addobject(                      /* add an object to a cube */
220 <        register CUBE  *cu,
220 >        CUBE  *cu,
221          OBJECT  obj
222   )
223   {
# Line 257 | Line 257 | addobject(                     /* add an object to a cube */
257  
258   static void
259   add2full(                       /* add object to full node */
260 <        register CUBE  *cu,
260 >        CUBE  *cu,
261          OBJECT  obj,
262          int  inc
263   )
# Line 266 | Line 266 | add2full(                      /* add object to full node */
266          OBJECT  oset[MAXSET+1];
267          CUBE  cukid;
268          unsigned char  inflg[(MAXSET+7)/8], volflg[(MAXSET+7)/8];
269 <        register int  i, j;
269 >        int  i, j;
270  
271          objset(oset, cu->cutree);
272          cukid.cusize = cu->cusize * 0.5;
273  
274 <        if (inc==O_IN || oset[0] < objlim || cukid.cusize < mincusize) {
274 >        if (inc==O_IN || oset[0] < objlim || cukid.cusize <
275 >                        (oset[0] < MAXSET ? mincusize : mincusize/256.0)) {
276                                                  /* add to set */
277                  if (oset[0] >= MAXSET) {
278                          sprintf(errmsg, "set overflow in addobject (%s)",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines