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.23 by greg, Tue Jan 14 19:54:27 1997 UTC vs.
Revision 2.24 by gregl, Wed Jul 9 11:25:49 1997 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1995 Regents of the University of California */
1 > /* Copyright (c) 1997 Silicon Graphics, Inc. */
2  
3   #ifndef lint
4 < static char SCCSid[] = "$SunId$ LBL";
4 > static char SCCSid[] = "$SunId$ SGI";
5   #endif
6  
7   /*
# Line 163 | Line 163 | char  *fname;
163                          getvec(direc, inform, fp) == 0) {
164  
165                  if (normalize(direc) == 0.0) {          /* zero ==> flush */
166 <                        fflush(stdout);
167 <                        continue;
168 <                }
169 <                samplendx++;
166 >                        bogusray();
167 >                        if (--nextflush <= 0) {
168 >                                fflush(stdout);
169 >                                nextflush = hresolu;
170 >                        }
171 >                } else {
172 >                        samplendx++;
173                                                          /* compute and print */
174 <                if (imm_irrad)
175 <                        irrad(orig, direc);
176 <                else
177 <                        rad(orig, direc);
174 >                        if (imm_irrad)
175 >                                irrad(orig, direc);
176 >                        else
177 >                                rad(orig, direc);
178                                                          /* flush if time */
179 <                if (--nextflush == 0) {
180 <                        fflush(stdout);
181 <                        nextflush = hresolu;
179 >                        if (--nextflush == 0) {
180 >                                fflush(stdout);
181 >                                nextflush = hresolu;
182 >                        }
183                  }
184                  if (ferror(stdout))
185                          error(SYSTEM, "write error");
# Line 243 | Line 247 | register char  *vs;
247                          break;
248                  }
249          *table = NULL;
250 + }
251 +
252 +
253 + bogusray()                      /* print out empty record */
254 + {
255 +        thisray.rorg[0] = thisray.rorg[1] = thisray.rorg[2] =
256 +        thisray.rdir[0] = thisray.rdir[1] = thisray.rdir[2] = 0.0;
257 +        rayorigin(&thisray, NULL, PRIMARY, 1.0);
258 +        printvals(&thisray);
259   }
260  
261  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines