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

Comparing ray/src/rt/raytrace.c (file contents):
Revision 2.61 by greg, Sun Sep 26 15:51:15 2010 UTC vs.
Revision 2.63 by greg, Wed Apr 6 00:14:26 2011 UTC

# Line 361 | Line 361 | raydist(               /* compute (cumulative) ray distance */
361  
362   extern void
363   raycontrib(             /* compute (cumulative) ray contribution */
364 <        double  rc[3],
364 >        RREAL  rc[3],
365          const RAY  *r,
366          int  flags
367   )
# Line 520 | Line 520 | localhit(              /* check for hit in the octree */
520          if (r->rmax > FTINY) {          /* except aft plane if one */
521                  r->ro = &Aftplane;
522                  r->rot = r->rmax;
523 <                for (i = 0; i < 3; i++)
524 <                        r->rop[i] = r->rorg[i] + r->rot*r->rdir[i];
523 >                VSUM(r->rop, r->rorg, r->rdir, r->rot);
524          }
525                                          /* find global cube entrance point */
526          t = 0.0;
# Line 544 | Line 543 | localhit(              /* check for hit in the octree */
543                  if (t >= r->rot)        /* clipped already */
544                          return(0);
545                                          /* advance position */
546 <                for (i = 0; i < 3; i++)
548 <                        curpos[i] += r->rdir[i]*t;
546 >                VSUM(curpos, curpos, r->rdir, t);
547  
548                  if (!incube(scene, curpos))     /* non-intersecting ray */
549                          return(0);
# Line 636 | Line 634 | raymove(               /* check for hit as we move */
634                          ax = 2;
635                  }
636          }
637 <        pos[0] += r->rdir[0]*t;
640 <        pos[1] += r->rdir[1]*t;
641 <        pos[2] += r->rdir[2]*t;
637 >        VSUM(pos, pos, r->rdir, t);
638          return(ax);
639   }
640  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines