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