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

Comparing ray/src/rt/source.c (file contents):
Revision 1.40 by greg, Tue Jul 30 18:23:41 1991 UTC vs.
Revision 1.41 by greg, Tue Aug 6 14:07:03 1991 UTC

# Line 164 | Line 164 | register int  sn;              /* source number */
164          if (source[sn].sflags & SDISTANT) {
165                  if (source[sn].sflags & SSPOT) {        /* check location */
166                          for (i = 0; i < 3; i++)
167 <                                vd[i] = sr->rorg[i] - source[sn].sl.s->aim[i];
167 >                                vd[i] = source[sn].sl.s->aim[i] - sr->rorg[i];
168                          d = DOT(sr->rdir,vd);
169 +                        if (d <= FTINY)
170 +                                return(0.0);
171                          d = DOT(vd,vd) - d*d;
172                          if (PI*d > source[sn].sl.s->siz)
173                                  return(0.0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines