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

Comparing ray/src/util/glaresrc.c (file contents):
Revision 1.2 by greg, Mon Mar 18 14:32:17 1991 UTC vs.
Revision 1.4 by greg, Tue Mar 19 09:10:58 1991 UTC

# Line 88 | Line 88 | double br;
88          register int    i;
89  
90          if (h <= -hlim) {                       /* left region */
91 <                d = (double)(h+hlim)/SAMPDENS;
91 >                d = (double)(h+hlim)/sampdens;
92                  if (d <= -1.0+FTINY)
93                          return;
94                  tanb = d/sqrt(1.0-d*d);
# Line 102 | Line 102 | double br;
102                  return;
103          }
104          if (h >= hlim) {                        /* right region */
105 <                d = (double)(h-hlim)/SAMPDENS;
105 >                d = (double)(h-hlim)/sampdens;
106                  if (d >= 1.0-FTINY)
107                          return;
108                  tanb = d/sqrt(1.0-d*d);
# Line 246 | Line 246 | int    v;
246  
247   close_allsrcs()                 /* done with everything */
248   {
249 <        register struct source  *this;
249 >        register struct source  *this, *nsrc;
250  
251 <        for (this = curlist; this != NULL; this = this->next)
251 >        for (this = curlist; this != NULL; this = nsrc) {
252 >                nsrc = this->next;
253                  donesource(this);
254 +        }
255          curlist = NULL;
256   }
257  
# Line 265 | Line 267 | register struct source *sp;
267          sp->dom = 0.0;
268          sp->dir[0] = sp->dir[1] = sp->dir[1] = 0.0;
269          sp->brt = 0.0;
270 +        n = 0;
271          for (ss = sp->first; ss != NULL; ss = ss->next) {
272                  sp->brt += ss->brsum;
273                  n += ss->r - ss->l;
# Line 287 | Line 290 | register struct source *sp;
290          donelist = sp;
291          if (verbose)
292                  fprintf(stderr,
293 <        "%s: found source at (%f,%f,%f), solid angle %f, brightness %f\n",
293 >        "%s: found source at (%f,%f,%f), dw %f, br %f\n",
294                          progname, sp->dir[0], sp->dir[1], sp->dir[2],
295                          sp->dom, sp->brt);
296   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines