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

Comparing ray/src/util/findglare.c (file contents):
Revision 1.21 by greg, Mon Apr 22 10:11:23 1991 UTC vs.
Revision 1.22 by greg, Mon Apr 22 14:56:28 1991 UTC

# Line 300 | Line 300 | int    x, y;
300          FVECT   org;                    /* dummy variable */
301  
302          hl = hlim(y);
303 <        if (x <= -hl)                   /* left region */
303 >        if (x <= -hl) {                 /* left region */
304 >                if (x <= -hl-sampdens)
305 >                        return(-1);
306                  return(viewray(org, vd, &leftview,
307                                  (double)(x+hl)/(2*sampdens)+.5,
308                                  (double)y/(2*sampdens)+.5));
309 <        if (x >= hl)                    /* right region */
309 >        }
310 >        if (x >= hl) {                  /* right region */
311 >                if (x >= hl+sampdens)
312 >                        return(-1);
313                  return(viewray(org, vd, &rightview,
314                                  (double)(x-hl)/(2*sampdens)+.5,
315                                  (double)y/(2*sampdens)+.5));
316 +        }
317                                          /* central region */
318          if (viewray(org, vd, &ourview, .5, (double)y/(2*sampdens)+.5) < 0)
319                  return(-1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines