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

Comparing ray/src/rt/srcsamp.c (file contents):
Revision 2.1 by greg, Tue Nov 12 17:10:39 1991 UTC vs.
Revision 2.2 by greg, Mon Nov 25 09:52:49 1991 UTC

# Line 24 | Line 24 | register SRCINDEX  *si;                /* source index (modified to
24          FVECT  vpos;
25          double  d;
26          register int  i;
27 <
27 > nextsample:
28          while (++si->sp >= si->np) {    /* get next sample */
29                  if (++si->sn >= nsources)
30                          return(0.0);    /* no more */
# Line 76 | Line 76 | register SRCINDEX  *si;                /* source index (modified to
76                          r->rdir[i] -= r->rorg[i];
77                                          /* compute distance */
78          if ((d = normalize(r->rdir)) == 0.0)
79 <                return(nextssamp(r, si));       /* at source! */
79 >                goto nextsample;                /* at source! */
80  
81                                          /* compute sample size */
82          si->dom  = source[si->sn].ss2;
# Line 92 | Line 92 | register SRCINDEX  *si;                /* source index (modified to
92          }
93          if (source[si->sn].sflags & SDISTANT)
94                  return(FHUGE);
95 +        if (si->dom <= FTINY)
96 +                goto nextsample;                /* behind source? */
97          si->dom /= d*d;
98          return(d);              /* sample OK, return distance */
99   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines