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

Comparing ray/src/rt/srcsupp.c (file contents):
Revision 2.6 by greg, Fri Aug 28 15:10:47 1992 UTC vs.
Revision 2.8 by greg, Tue Nov 7 12:40:30 1995 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1992 Regents of the University of California */
1 > /* Copyright (c) 1995 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 119 | Line 119 | OBJREC  *so;
119          }
120          src->srad = sqrt(src->srad);
121                                                  /* compute size vectors */
122 <        if (f->nv == 4 || (f->nv == 5 &&        /* parallelogram case */
123 <                        dist2(VERTEX(f,0),VERTEX(f,4)) <= FTINY*FTINY))
122 >        if (f->nv == 4)                         /* parallelogram case */
123                  for (j = 0; j < 3; j++) {
124                          src->ss[SU][j] = .5*(VERTEX(f,1)[j]-VERTEX(f,0)[j]);
125                          src->ss[SV][j] = .5*(VERTEX(f,3)[j]-VERTEX(f,0)[j]);
# Line 252 | Line 251 | register OBJREC  *m;
251   }
252  
253  
254 < spotout(r, s, dist)             /* check if we're outside spot region */
254 > spotout(r, s)                   /* check if we're outside spot region */
255   register RAY  *r;
256   register SPOT  *s;
258 int  dist;
257   {
258          double  d;
259          FVECT  vd;
260          
261          if (s == NULL)
262                  return(0);
263 <        if (dist) {                     /* distant source */
263 >        if (s->flen < -FTINY) {         /* distant source */
264                  vd[0] = s->aim[0] - r->rorg[0];
265                  vd[1] = s->aim[1] - r->rorg[1];
266                  vd[2] = s->aim[2] - r->rorg[2];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines