309 |
|
FVECT onorm; |
310 |
|
FVECT offsdir; |
311 |
|
SRCINDEX si; |
312 |
< |
double or, d; |
312 |
> |
double or, d, d1; |
313 |
|
int stestlim, ssn; |
314 |
|
int nhit, nok; |
315 |
|
register int i, n; |
373 |
|
if (!srcray(&sr, NULL, &si) || sr.rsrc != sn) |
374 |
|
continue; /* can't get there from here */ |
375 |
|
} |
376 |
< |
srcvalue(&sr); /* check sample validity */ |
377 |
< |
if (bright(sr.rcol) <= FTINY) |
376 |
> |
sr.revf = srcvalue; |
377 |
> |
rayvalue(&sr); /* check sample validity */ |
378 |
> |
if ((d = bright(sr.rcol)) <= FTINY) |
379 |
|
continue; |
380 |
|
nok++; /* got sample; check obstructions */ |
381 |
|
rayclear(&sr); |
382 |
+ |
sr.revf = raytrace; |
383 |
|
rayvalue(&sr); |
384 |
< |
if (bright(sr.rcol) > FTINY) |
384 |
> |
if ((d1 = bright(sr.rcol)) > FTINY) { |
385 |
> |
if (d - d1 > FTINY) { |
386 |
> |
#ifdef DEBUG |
387 |
> |
fprintf(stderr, "\tpartially shadowed\n"); |
388 |
> |
#endif |
389 |
> |
return(f); /* intervening transmitter */ |
390 |
> |
} |
391 |
|
nhit++; |
392 |
+ |
} |
393 |
|
if (nhit > 0 && nhit < nok) { |
394 |
|
#ifdef DEBUG |
395 |
|
fprintf(stderr, "\tpartially occluded\n"); |