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.8 by greg, Tue Feb 25 02:47:23 2003 UTC vs.
Revision 2.11 by greg, Sat Sep 13 17:31:35 2003 UTC

# Line 114 | Line 114 | unsigned char  *pt;            /* partition array */
114                                          /* check this partition */
115          p = spart(pt, pp[0]);
116          pp[0]++;
117 <        if (p == S0)                    /* leaf partition */
117 >        if (p == S0) {                  /* leaf partition */
118                  if (pp[1]) {
119                          pp[1]--;
120                          return(0);      /* not there yet */
121                  } else
122                          return(1);      /* we've arrived */
123 +        }
124                                  /* else check lower */
125          sz[p] >>= 1;
126          ct[p] -= sz[p];
# Line 229 | Line 230 | flatpart(si, r)                                /* partition a flat source */
230   register SRCINDEX  *si;
231   register RAY  *r;
232   {
233 <        register FLOAT  *vp;
233 >        register RREAL  *vp;
234          FVECT  v;
235          double  du2, dv2;
236          int  pi;
# Line 240 | Line 241 | register RAY  *r;
241          v[1] = r->rorg[1] - vp[1];
242          v[2] = r->rorg[2] - vp[2];
243          vp = source[si->sn].snorm;
244 <        if (DOT(v,vp) <= FTINY) {       /* behind source */
244 >        if (DOT(v,vp) <= 0.) {          /* behind source */
245                  si->np = 0;
246                  return;
247          }
# Line 313 | Line 314 | scylform(sn, dir)              /* compute cosine for cylinder's pr
314   int  sn;
315   register FVECT  dir;            /* assume normalized */
316   {
317 <        register FLOAT  *dv;
317 >        register RREAL  *dv;
318          double  d;
319  
320          dv = source[sn].ss[SU];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines