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

Comparing ray/src/hd/holo.c (file contents):
Revision 3.6 by gregl, Tue Nov 11 17:03:28 1997 UTC vs.
Revision 3.9 by gregl, Mon Dec 15 20:43:24 1997 UTC

# Line 199 | Line 199 | register GCOORD        *gc;
199   }
200  
201  
202 < hdlseg(lseg, hp, i)                     /* compute line segment for beam */
202 > hdlseg(lseg, hp, gc)                    /* compute line segment for beam */
203   register int    lseg[2][3];
204   register HOLO   *hp;
205 < int     i;
205 > GCOORD  gc[2];
206   {
207        GCOORD  gc[2];
207          register int    k;
208  
210        if (!hdbcoord(gc, hp, i))               /* compute grid coordinates */
211                return(0);
209          for (k = 0; k < 2; k++) {               /* compute end points */
210                  lseg[k][gc[k].w>>1] = gc[k].w&1 ? hp->grid[gc[k].w>>1]-1 : 0 ;
211                  lseg[k][wg0[gc[k].w]] = gc[k].i[0];
# Line 250 | Line 247 | FVECT  wp;
247          gp[0] = DOT(vt, hp->wn[0]) * hp->wg[0];
248          gp[1] = DOT(vt, hp->wn[1]) * hp->wg[1];
249          gp[2] = DOT(vt, hp->wn[2]) * hp->wg[2];
250 + }
251 +
252 +
253 + hdworld(wp, hp, gp)             /* compute world coordinates */
254 + register FVECT  wp;
255 + register HOLO   *hp;
256 + FVECT   gp;
257 + {
258 +        register double d;
259 +
260 +        d = gp[0]/hp->grid[0];
261 +        VSUM(wp, hp->orig, hp->xv[0], d);
262 +
263 +        d = gp[1]/hp->grid[1];
264 +        VSUM(wp, wp, hp->xv[1], d);
265 +
266 +        d = gp[2]/hp->grid[2];
267 +        VSUM(wp, wp, hp->xv[2], d);
268   }
269  
270  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines