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.4 by greg, Sun May 7 17:50:51 1989 UTC vs.
Revision 1.8 by greg, Tue Jan 2 15:16:14 1990 UTC

# Line 22 | Line 22 | extern double  minweight;              /* minimum ray weight */
22  
23   long  nrays = 0L;                       /* number of rays traced */
24  
25 < #define  MAXLOOP        1024            /* modifier loop detection */
25 > #define  MAXLOOP        128             /* modifier loop detection */
26  
27   #define  RAYHIT         (-1)            /* return value for intercepted ray */
28  
# Line 64 | Line 64 | double  rw;
64  
65  
66   rayvalue(r)                     /* compute a ray's value */
67 < register RAY  *r;
67 > RAY  *r;
68   {
69          extern int  (*trace)();
70  
71 <        if (localhit(r, &thescene))
72 <                if (r->clipset != NULL && inset(r->clipset, r->ro->omod))
73 <                        raytrans(r);            /* object is clipped */
74 <                else
75 <                        rayshade(r, r->ro->omod);
76 <        else if (sourcehit(r))
77 <                rayshade(r, r->ro->omod);
71 >        if (localhit(r, &thescene) || sourcehit(r))
72 >                raycont(r);
73  
74          if (trace != NULL)
75                  (*trace)(r);            /* trace execution */
76   }
77  
78  
79 + raycont(r)                      /* check for clipped object and continue */
80 + register RAY  *r;
81 + {
82 +        if (r->clipset != NULL && inset(r->clipset, r->ro->omod))
83 +                raytrans(r);
84 +        else
85 +                rayshade(r, r->ro->omod);
86 + }
87 +
88 +
89   raytrans(r)                     /* transmit ray as is */
90 < RAY  *r;
90 > register RAY  *r;
91   {
92          RAY  tr;
93  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines