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

Comparing ray/src/rt/rpict.c (file contents):
Revision 1.21 by greg, Tue Jun 26 09:00:12 1990 UTC vs.
Revision 1.23 by greg, Thu Nov 1 12:06:01 1990 UTC

# Line 141 | Line 141 | char  *zfile, *oldfile;
141          fputresolu(YMAJOR|YDECR, hresolu, vresolu, stdout);
142                                          /* recover file and compute first */
143          i = salvage(oldfile);
144 <        if (zfd != -1 && lseek(zfd, (long)i*hresolu*sizeof(float), 0) == -1)
144 >        if (zfd != -1 && i > 0 &&
145 >                        lseek(zfd, (long)i*hresolu*sizeof(float), 0) == -1)
146                  error(SYSTEM, "z file seek error in render");
147          ypos = vresolu-1 - i;
148          fillscanline(scanbar[0], zbar[0], hresolu, ypos, psample);
# Line 320 | Line 321 | int  x, y;                     /* pixel position */
321   {
322          static RAY  thisray;    /* our ray for this pixel */
323  
324 <        viewray(thisray.rorg, thisray.rdir, &ourview,
325 <                        (x+pixjitter())/hresolu, (y+pixjitter())/vresolu);
324 >        if (viewray(thisray.rorg, thisray.rdir, &ourview,
325 >                        (x+pixjitter())/hresolu, (y+pixjitter())/vresolu) < 0) {
326 >                setcolor(col, 0.0, 0.0, 0.0);
327 >                return(0.0);
328 >        }
329  
330          rayorigin(&thisray, NULL, PRIMARY, 1.0);
331          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines