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.61 by greg, Mon Dec 14 04:49:16 2009 UTC

# Line 326 | Line 326 | rayirrad(                      /* compute irradiance rather than radiance
326          r->ron[1] = -r->rdir[1];
327          r->ron[2] = -r->rdir[2];
328          r->rod = 1.0;
329 +        r->revf = raytrace;
330                                          /* compute result */
331          (*ofun[Lamb.otype].funp)(&Lamb, r);
332   }
# Line 338 | Line 339 | rtcompute(                     /* compute and print ray value(s) */
339          double  dmax
340   )
341   {
342 <        if (imm_irrad) {                /* set up ray */
342 >                                        /* set up ray */
343 >        rayorigin(&thisray, PRIMARY, NULL, NULL);
344 >        if (imm_irrad) {
345                  VSUM(thisray.rorg, org, dir, 1.1e-4);
346                  thisray.rdir[0] = -dir[0];
347                  thisray.rdir[1] = -dir[1];
348                  thisray.rdir[2] = -dir[2];
349                  thisray.rmax = 0.0;
350 +                thisray.revf = rayirrad;
351          } else {
352                  VCOPY(thisray.rorg, org);
353                  VCOPY(thisray.rdir, dir);
354                  thisray.rmax = dmax;
355 +                if (castonly)
356 +                        thisray.revf = raycast;
357          }
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
358          if (ray_pnprocs > 1) {          /* multiprocessing FIFO? */
359                  if (ray_fifo_in(&thisray) < 0)
360                          error(USER, "lost children");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines