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.7 by greg, Tue Dec 20 20:15:04 1994 UTC vs.
Revision 2.8 by greg, Wed Dec 21 09:07:19 1994 UTC

# Line 131 | Line 131 | double  x, y;
131                  orig[2] = v->vp[2] + v->vfore*v->vdir[2]
132                                  + x*v->hvec[2] + y*v->vvec[2];
133                  VCOPY(direc, v->vdir);
134 <                return(v->vaft - v->vfore);
134 >                return(v->vaft > FTINY ? v->vaft - v->vfore : 0.0);
135          case VT_PER:                    /* perspective view */
136                  direc[0] = v->vdir[0] + x*v->hvec[0] + y*v->vvec[0];
137                  direc[1] = v->vdir[1] + x*v->hvec[1] + y*v->vvec[1];
# Line 140 | Line 140 | double  x, y;
140                  orig[1] = v->vp[1] + v->vfore*direc[1];
141                  orig[2] = v->vp[2] + v->vfore*direc[2];
142                  d = normalize(direc);
143 <                return((v->vaft - v->vfore)*d);
143 >                return(v->vaft > FTINY ? (v->vaft - v->vfore)*d : 0.0);
144          case VT_HEM:                    /* hemispherical fisheye */
145                  z = 1.0 - x*x*v->hn2 - y*y*v->vn2;
146                  if (z < 0.0)
# Line 152 | Line 152 | double  x, y;
152                  orig[0] = v->vp[0] + v->vfore*direc[0];
153                  orig[1] = v->vp[1] + v->vfore*direc[1];
154                  orig[2] = v->vp[2] + v->vfore*direc[2];
155 <                return(v->vaft - v->vfore);
155 >                return(v->vaft > FTINY ? v->vaft - v->vfore : 0.0);
156          case VT_ANG:                    /* angular fisheye */
157                  x *= v->horiz/180.0;
158                  y *= v->vert/180.0;
# Line 170 | Line 170 | double  x, y;
170                  orig[0] = v->vp[0] + v->vfore*direc[0];
171                  orig[1] = v->vp[1] + v->vfore*direc[1];
172                  orig[2] = v->vp[2] + v->vfore*direc[2];
173 <                return(v->vaft - v->vfore);
173 >                return(v->vaft > FTINY ? v->vaft - v->vfore : 0.0);
174          }
175          return(-1.0);
176   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines