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 2.4 by greg, Tue Feb 23 13:57:11 1993 UTC vs.
Revision 2.8 by greg, Thu Dec 9 09:34:08 1993 UTC

# Line 25 | Line 25 | extern int  maxdepth;                  /* maximum recursion depth */
25   extern double  minweight;               /* minimum ray weight */
26   extern int  do_irrad;                   /* compute irradiance? */
27  
28 < long  raynum = 0L;                      /* next unique ray number */
29 < long  nrays = 0L;                       /* number of calls to localhit */
28 > unsigned long  raynum = 0;              /* next unique ray number */
29 > unsigned long  nrays = 0;               /* number of calls to localhit */
30  
31   static FLOAT  Lambfa[5] = {PI, PI, PI, 0.0, 0.0};
32   OBJREC  Lamb = {
# Line 34 | Line 34 | OBJREC  Lamb = {
34          {0, 5, NULL, Lambfa}, NULL,
35   };                                      /* a Lambertian surface */
36  
37 + static int  raymove(), checkset(), checkhit();
38 +
39   #define  MAXLOOP        128             /* modifier loop detection */
40  
41   #define  RAYHIT         (-1)            /* return value for intercepted ray */
# Line 103 | Line 105 | RAY  *r;
105   raycont(r)                      /* check for clipped object and continue */
106   register RAY  *r;
107   {
108 <        if (r->clipset != NULL && inset(r->clipset, r->ro->omod))
108 >        if ((r->clipset != NULL && inset(r->clipset, r->ro->omod)) ||
109 >                        r->ro->omod == OVOID)
110                  raytrans(r);
111          else
112                  rayshade(r, r->ro->omod);
# Line 328 | Line 331 | register CUBE  *scene;
331          sflags = 0;
332          for (i = 0; i < 3; i++) {
333                  curpos[i] = r->rorg[i];
334 <                if (r->rdir[i] > FTINY)
334 >                if (r->rdir[i] > 1e-7)
335                          sflags |= 1 << i;
336 <                else if (r->rdir[i] < -FTINY)
336 >                else if (r->rdir[i] < -1e-7)
337                          sflags |= 0x10 << i;
338          }
339          if (sflags == 0)
# Line 461 | Line 464 | OBJECT  *cxs;
464          checkset(oset, cxs);                    /* eliminate double-checking */
465          for (i = oset[0]; i > 0; i--) {
466                  o = objptr(oset[i]);
464                if (o->omod == OVOID && issurface(o->otype))
465                        continue;               /* ignore void surfaces */
467                  (*ofun[o->otype].funp)(o, r);
468          }
469          if (r->ro == NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines