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.61 by greg, Mon Dec 14 04:49:16 2009 UTC vs.
Revision 2.63 by greg, Wed Dec 16 03:30:50 2009 UTC

# Line 160 | Line 160 | rtrace(                                /* trace rays from file */
160  
161                  d = normalize(direc);
162                  if (d == 0.0) {                         /* zero ==> flush */
163                        if (nproc > 1 && ray_fifo_flush() < 0)
164                                error(USER, "lost children");
165                        bogusray();
163                          if (--nextflush <= 0 || !vcount) {
164 +                                if (nproc > 1 && ray_fifo_flush() < 0)
165 +                                        error(USER, "lost children");
166 +                                bogusray();
167                                  fflush(stdout);
168                                  nextflush = hresolu;
169 <                        }
169 >                        } else
170 >                                bogusray();
171                  } else {                                /* compute and print */
172                          rtcompute(orig, direc, lim_dist ? d : 0.0);
173                                                          /* flush if time */
# Line 320 | Line 321 | rayirrad(                      /* compute irradiance rather than radiance
321          RAY *r
322   )
323   {
324 +        void    (*old_revf)(RAY *) = r->revf;
325 +
326          r->rot = 1e-5;                  /* pretend we hit surface */
327          VSUM(r->rop, r->rorg, r->rdir, r->rot);
328          r->ron[0] = -r->rdir[0];
329          r->ron[1] = -r->rdir[1];
330          r->ron[2] = -r->rdir[2];
331          r->rod = 1.0;
329        r->revf = raytrace;
332                                          /* compute result */
333 +        r->revf = raytrace;
334          (*ofun[Lamb.otype].funp)(&Lamb, r);
335 +        r->revf = old_revf;
336   }
337  
338  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines