# | Line 320 | Line 320 | rayirrad( /* compute irradiance rather than radiance | |
---|---|---|
320 | RAY *r | |
321 | ) | |
322 | { | |
323 | + | void (*old_revf)(RAY *) = r->revf; |
324 | + | |
325 | r->rot = 1e-5; /* pretend we hit surface */ | |
326 | VSUM(r->rop, r->rorg, r->rdir, r->rot); | |
327 | r->ron[0] = -r->rdir[0]; | |
328 | r->ron[1] = -r->rdir[1]; | |
329 | r->ron[2] = -r->rdir[2]; | |
330 | r->rod = 1.0; | |
329 | – | r->revf = raytrace; |
331 | /* compute result */ | |
332 | + | r->revf = raytrace; |
333 | (*ofun[Lamb.otype].funp)(&Lamb, r); | |
334 | + | r->revf = old_revf; |
335 | } | |
336 | ||
337 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |