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

Comparing ray/src/rt/rtrace.c (file contents):
Revision 2.9 by greg, Fri Nov 6 16:48:32 1992 UTC vs.
Revision 2.13 by greg, Mon Mar 8 12:37:33 1993 UTC

# Line 50 | Line 50 | double  shadthresh = .05;              /* shadow threshold */
50   double  shadcert = .5;                  /* shadow certainty */
51   int  directrelay = 1;                   /* number of source relays */
52   int  vspretest = 512;                   /* virtual source pretest density */
53 < int  directinvis = 0;                   /* sources invisible? */
53 > int  directvis = 1;                     /* sources visible? */
54   double  srcsizerat = .25;               /* maximum ratio source size/dist. */
55  
56   double  specthresh = .15;               /* specular sampling threshold */
# Line 75 | Line 75 | static RAY  thisray;                   /* for our convenience */
75   static int  oputo(), oputd(), oputv(), oputl(), oputL(),
76                  oputp(), oputn(), oputN(), oputs(), oputw(), oputm();
77  
78 + static int  ourtrace(), tabin();
79   static int  (*ray_out[10])(), (*every_out[10])();
80   static int  castonly;
81  
# Line 86 | Line 87 | static int  (*putreal)();
87   quit(code)                      /* quit program */
88   int  code;
89   {
90 + #ifndef  NIX
91 +        headclean();            /* delete header file */
92 +        pfclean();              /* clean up persist files */
93 + #endif
94          exit(code);
95   }
96  
# Line 135 | Line 140 | char  *fname;
140          default:
141                  error(CONSISTENCY, "botched output format");
142          }
143 <        if (hresolu > 0 && vresolu > 0)
144 <                fprtresolu(hresolu, vresolu, stdout);
143 >        if (hresolu > 0) {
144 >                if (vresolu > 0)
145 >                        fprtresolu(hresolu, vresolu, stdout);
146 >                fflush(stdout);
147 >        }
148                                          /* process file */
149          while (getvec(orig, inform, fp) == 0 &&
150                          getvec(direc, inform, fp) == 0) {
# Line 161 | Line 169 | char  *fname;
169                  if (--vcount == 0)                      /* check for end */
170                          break;
171          }
172 +        fflush(stdout);
173          if (vcount > 0)
174                  error(USER, "read error");
175 <        fclose(fp);
175 >        if (fname != NULL)
176 >                fclose(fp);
177   }
178  
179  
180   setoutput(vs)                           /* set up output tables */
181   register char  *vs;
182   {
183 <        extern int  ourtrace(), (*trace)();
183 >        extern int  (*trace)();
184          register int (**table)() = ray_out;
185  
186          castonly = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines