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

Comparing ray/src/rt/raytrace.c (file contents):
Revision 1.15 by greg, Wed May 1 11:17:01 1991 UTC vs.
Revision 1.17 by greg, Fri May 10 08:51:06 1991 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1990 Regents of the University of California */
1 > /* Copyright (c) 1991 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 118 | Line 118 | int  mod;
118   {
119          static int  depth = 0;
120          register OBJREC  *m;
121                                        /* check for irradiance calc. */
122        if (do_irrad && !(r->crtype & ~(PRIMARY|TRANS))) {
123                if (irr_ignore(objptr(mod)->otype))
124                        raytrans(r);
125                else
126                        (*ofun[Lamb.otype].funp)(&Lamb, r);
127                return;
128        }
121                                          /* check for infinite loop */
122          if (depth++ >= MAXLOOP)
123                  objerror(r->ro, USER, "possible modifier loop");
# Line 137 | Line 129 | int  mod;
129                          error(USER, errmsg);
130                  }
131                  ******/
132 +                                        /* hack for irradiance calculation */
133 +                if (do_irrad && !(r->crtype & ~(PRIMARY|TRANS))) {
134 +                        if (irr_ignore(m->otype)) {
135 +                                depth--;
136 +                                raytrans(r);
137 +                                return;
138 +                        }
139 +                        if (m->otype != MAT_ILLUM)
140 +                                m = &Lamb;
141 +                }
142                  (*ofun[m->otype].funp)(m, r);   /* execute function */
143                  m->lastrno = r->rno;
144                  if (ismaterial(m->otype)) {     /* materials call raytexture */
# Line 320 | Line 322 | register CUBE  *scene;
322                  else if (r->rdir[i] < -FTINY)
323                          sflags |= 0x10 << i;
324          }
325 +        if (sflags == 0)
326 +                error(CONSISTENCY, "zero ray direction in localhit");
327          t = 0.0;
328          if (!incube(scene, curpos)) {
329                                          /* find distance to entry */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines