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

Comparing ray/src/common/image.c (file contents):
Revision 2.42 by greg, Wed Jan 24 04:23:06 2018 UTC vs.
Revision 2.44 by greg, Wed Jan 24 17:22:24 2018 UTC

# Line 231 | Line 231 | viewloc(                       /* find image location for point */
231   FVECT  ip,
232   VIEW  *v,
233   FVECT  p
234 < )
234 > )       /* returns: Good=1, Bad=0, Behind=-1, OutOfFrame=2, Behind+OOF=-2 */
235   {
236          double  d, d2;
237          FVECT  disp;
# Line 307 | Line 307 | FVECT  p
307          }
308          ip[0] = DOT(disp,v->hvec)/v->hn2 + 0.5 - v->hoff;
309          ip[1] = DOT(disp,v->vvec)/v->vn2 + 0.5 - v->voff;
310 < gotall:                                 /* return -1 if behind */
311 <        return(1 - 2*(ip[2] <= 0.0));
310 > gotall:                                 /* compute return value */
311 >        return( (1 - 2*(ip[2] <= 0.0)) * (1 +
312 >        ((0.0 >= ip[0]) | (ip[0] >= 1.0) | (0.0 >= ip[1]) | (ip[1] >= 1.0))) );
313   }
314  
315  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines