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.4 by greg, Mon Sep 21 12:11:39 1992 UTC vs.
Revision 2.5 by greg, Fri Oct 9 10:26:28 1992 UTC

# Line 54 | Line 54 | char  **argv;
54          int  outflags = IO_ALL;
55          OBJECT  startobj;
56          int  i;
57        
58        progname = argv[0];
57  
58 +        progname = argv[0] = fixargv0(argv[0]);
59 +
60          if ((libpath = getenv(ULIBVAR)) == NULL)
61                  libpath = DEFPATH;
62  
# Line 111 | Line 111 | breakopt:
111          printf("\n");
112  
113          startobj = nobjects;            /* previous objects already converted */
114 <        
114 >
115          for ( ; i < argc; i++)          /* read new scene descriptions */
116                  if (!strcmp(argv[i], "-")) {    /* from stdin */
117                          readobj(NULL);
# Line 150 | Line 150 | breakopt:
150          }
151  
152          mincusize = thescene.cusize / resolu - FTINY;
153 <                
153 >
154          for (i = startobj; i < nobjects; i++)           /* add new objects */
155                  addobject(&thescene, i);
156 <        
156 >
157          thescene.cutree = combine(thescene.cutree);     /* optimize */
158  
159          writeoct(outflags, &thescene, ofname);  /* write structures to stdout */
# Line 220 | Line 220 | OBJECT obj;
220  
221          if (in == O_MISS)
222                  return;                         /* no intersection */
223 <        
223 >
224          if (istree(cu->cutree)) {
225                                                  /* do children */
226                  cukid.cusize = cu->cusize * 0.5;
# Line 245 | Line 245 | OBJECT obj;
245                                          /* add to full node */
246          objset(oset, cu->cutree);
247          cukid.cusize = cu->cusize * 0.5;
248 <        
248 >
249          if (in==O_IN || oset[0] < objlim || cukid.cusize < mincusize) {
250                                                  /* add to set */
251                  if (oset[0] >= MAXSET) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines