ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/virtuals.c
(Generate patch)

Comparing ray/src/rt/virtuals.c (file contents):
Revision 2.16 by greg, Tue Apr 19 01:15:07 2005 UTC vs.
Revision 2.17 by greg, Thu Sep 7 05:20:54 2006 UTC

# Line 309 | Line 309 | vstestvis(             /* pretest source visibility */
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;
# Line 373 | Line 373 | vstestvis(             /* pretest source visibility */
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");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines