324 |
|
{ |
325 |
|
RAY sr; |
326 |
|
FVECT onorm; |
327 |
< |
FVECT offsdir; |
327 |
> |
double offsdir[3]; |
328 |
|
SRCINDEX si; |
329 |
|
double or, d, d1; |
330 |
|
int stestlim, ssn; |
340 |
|
/* 32. == heuristic constant */ |
341 |
|
n = 32.*or2/(thescene.cusize*thescene.cusize)*vspretest + .5; |
342 |
|
} else { |
343 |
< |
for (i = 0; i < 3; i++) |
344 |
< |
offsdir[i] = source[sn].sloc[i] - oc[i]; |
343 |
> |
VSUB(offsdir, source[sn].sloc, oc); |
344 |
|
d = DOT(offsdir,offsdir); |
345 |
|
if (d <= FTINY) |
346 |
|
n = 2.*PI * vspretest + .5; |
376 |
|
sr.rorg[i] = oc[i] + offsdir[i] + d*onorm[i]; |
377 |
|
sr.rdir[i] = -onorm[i]; |
378 |
|
} |
379 |
+ |
sr.rmax = 0.0; |
380 |
|
rayorigin(&sr, PRIMARY, NULL, NULL); |
381 |
|
} while (!(*ofun[o->otype].funp)(o, &sr)); |
382 |
|
/* check against source */ |