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

Comparing ray/src/rt/rv3.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:41:39 1989 UTC vs.
Revision 1.2 by greg, Wed Apr 5 09:38:12 1989 UTC

# Line 266 | Line 266 | FVECT  vc;
266   {
267          extern double  sqrt(), dist2();
268          double  d;
269 +        FVECT  v;
270          VIEW  nv;
271          register int  i;
272  
273          VCOPY(nv.vup, ourview.vup);
274          nv.hresolu = ourview.hresolu; nv.vresolu = ourview.vresolu;
275          spinvector(nv.vdir, ourview.vdir, ourview.vup, angle*(PI/180.));
275        d = sqrt(dist2(ourview.vp, vc)) / mag;
276        for (i = 0; i < 3; i++)
277                nv.vp[i] = vc[i] - d*nv.vdir[i];
276          if ((nv.type = ourview.type) == VT_PAR) {
277                  nv.horiz = ourview.horiz / mag;
278                  nv.vert = ourview.vert / mag;
279 +                for (i = 0; i < 3; i++)
280 +                        v[i] = vc[i] - ourview.vp[i];
281 +                d = DOT(v, ourview.vdir);       /* don't move closer */
282          } else {
283                  nv.horiz = ourview.horiz;
284                  nv.vert = ourview.vert;
285 +                d = sqrt(dist2(ourview.vp, vc)) / mag;
286          }
287 +        for (i = 0; i < 3; i++)
288 +                nv.vp[i] = vc[i] - d*nv.vdir[i];
289          newview(&nv);
290   }
291  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines