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 |
|
} |
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"); |