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

Comparing ray/src/rt/ambient.c (file contents):
Revision 2.43 by gregl, Sat Aug 30 10:17:01 1997 UTC vs.
Revision 2.45 by gwlarson, Wed Aug 12 18:16:07 1998 UTC

# Line 80 | Line 80 | static long  sortintvl = SORT_INTVL;   /* time until nex
80  
81   #define  newambval()    (AMBVAL *)bmalloc(sizeof(AMBVAL))
82  
83 extern long  ftell(), lseek();
83   static int  initambfile(), avsave(), avinsert(), sortambvals(), avlmemi();
84   static AMBVAL  *avstore();
85   #ifdef  F_SETLKW
# Line 378 | Line 377 | COLOR  cr;
377   register AMBVAL  *ap;
378   FVECT  pv, nv;
379   {
380 <        FVECT  v1, v2;
380 >        FVECT  v1;
381          register int  i;
382          double  d;
383  
# Line 387 | Line 386 | FVECT  pv, nv;
386          for (i = 0; i < 3; i++)
387                  d += ap->gpos[i]*(pv[i]-ap->pos[i]);
388                                          /* gradient due to rotation */
389 <        VCOPY(v1, ap->dir);
390 <        fcross(v2, v1, nv);
392 <        d += DOT(ap->gdir, v2);
389 >        VCROSS(v1, ap->dir, nv);
390 >        d += DOT(ap->gdir, v1);
391          if (d <= 0.0) {
392                  setcolor(cr, 0.0, 0.0, 0.0);
393                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines