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.6 by greg, Mon Oct 16 18:57:02 1989 UTC vs.
Revision 1.9 by greg, Tue Mar 6 08:47:30 1990 UTC

# 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) || sourcehit(r))
72 <                rayshade(r, r->ro->omod);
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  
# Line 95 | Line 105 | int  mod;
105   {
106          static int  depth = 0;
107          register OBJREC  *m;
98                                        /* check for clipped surface */
99        if (r->clipset != NULL && r->rot < FHUGE &&
100                        inset(r->clipset, mod)) {
101                raytrans(r);
102                return;
103        }
108                                          /* check for infinite loop */
109          if (depth++ >= MAXLOOP)
110                  objerror(r->ro, USER, "possible modifier loop");
# Line 206 | Line 210 | register RAY  *r;
210           *  still fraught with problems since reflected rays and similar
211           *  directions calculated from the surface normal may spawn rays behind
212           *  the surface.  The only solution is to curb textures at high
213 <         *  incidence (Rdot << 1).
213 >         *  incidence (namely, keep DOT(rdir,pert) < Rdot).
214           */
215  
216          for (i = 0; i < 3; i++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines