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.20 by greg, Mon Jun 17 08:26:18 1991 UTC vs.
Revision 1.21 by greg, Thu Jun 20 13:29:32 1991 UTC

# Line 24 | Line 24 | extern double  minweight;              /* minimum ray weight */
24   extern int  do_irrad;                   /* compute irradiance? */
25  
26   long  raynum = 0L;                      /* next unique ray number */
27 < long  nrays = 0L;                       /* number of calls to rayvalue */
27 > long  nrays = 0L;                       /* number of calls to localhit */
28  
29   static double  Lambfa[5] = {PI, PI, PI, 0.0, 0.0};
30   OBJREC  Lamb = {
# Line 48 | Line 48 | double  rw;
48                  r->crtype = r->rtype = rt;
49                  r->rsrc = -1;
50                  r->clipset = NULL;
51 +                r->revf = raytrace;
52          } else {                                /* spawned ray */
53                  r->rlvl = ro->rlvl;
54                  if (rt & RAYREFL) {
# Line 58 | Line 59 | double  rw;
59                          r->rsrc = ro->rsrc;
60                          r->clipset = ro->newcset;
61                  }
62 +                r->revf = ro->revf;
63                  r->rweight = ro->rweight * rw;
64                  r->crtype = ro->crtype | (r->rtype = rt);
65                  VCOPY(r->rorg, ro->rop);
# Line 74 | Line 76 | double  rw;
76   }
77  
78  
79 < rayvalue(r)                     /* compute a ray's value */
79 > raytrace(r)                     /* trace a ray and compute its value */
80   RAY  *r;
81   {
82          extern int  (*trace)();
83  
82        nrays++;                        /* increment trace counter */
84          if (localhit(r, &thescene))
85                  raycont(r);
86          else if (sourcehit(r))
# Line 315 | Line 316 | register CUBE  *scene;
316          double  t, dt;
317          register int  i;
318  
319 +        nrays++;                        /* increment trace counter */
320          sflags = 0;
321          for (i = 0; i < 3; i++) {
322                  curpos[i] = r->rorg[i];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines