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

Comparing ray/src/rt/rtrace.c (file contents):
Revision 2.59 by greg, Sun Dec 13 19:13:04 2009 UTC vs.
Revision 2.60 by greg, Mon Dec 14 03:15:45 2009 UTC

# Line 338 | Line 338 | rtcompute(                     /* compute and print ray value(s) */
338          double  dmax
339   )
340   {
341 <        if (imm_irrad) {                /* set up ray */
341 >                                        /* set up ray */
342 >        rayorigin(&thisray, PRIMARY, NULL, NULL);
343 >        if (imm_irrad) {
344                  VSUM(thisray.rorg, org, dir, 1.1e-4);
345                  thisray.rdir[0] = -dir[0];
346                  thisray.rdir[1] = -dir[1];
347                  thisray.rdir[2] = -dir[2];
348                  thisray.rmax = 0.0;
349 +                thisray.revf = rayirrad;
350          } else {
351                  VCOPY(thisray.rorg, org);
352                  VCOPY(thisray.rdir, dir);
353                  thisray.rmax = dmax;
354 +                if (castonly)
355 +                        thisray.revf = raycast;
356          }
352        rayorigin(&thisray, PRIMARY, NULL, NULL);
353                                        /* special case evaluators */
354        if (castonly)
355                thisray.revf = raycast;
356        else if (imm_irrad)
357                thisray.revf = rayirrad;
358
357          if (ray_pnprocs > 1) {          /* multiprocessing FIFO? */
358                  if (ray_fifo_in(&thisray) < 0)
359                          error(USER, "lost children");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines