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.2 by greg, Tue Apr 11 13:30:31 1989 UTC vs.
Revision 1.7 by greg, Wed Nov 29 14:35:25 1989 UTC

# Line 22 | Line 22 | extern double  minweight;              /* minimum ray weight */
22  
23   long  nrays = 0L;                       /* number of rays traced */
24  
25 < #define  MAXLOOP        32              /* modifier loop detection */
25 > #define  MAXLOOP        128             /* modifier loop detection */
26  
27   #define  RAYHIT         (-1)            /* return value for intercepted ray */
28  
# Line 56 | Line 56 | double  rw;
56          r->newcset = r->clipset;
57          r->ro = NULL;
58          r->rot = FHUGE;
59        r->rofs = 1.0; setident4(r->rofx);
60        r->robs = 1.0; setident4(r->robx);
59          r->pert[0] = r->pert[1] = r->pert[2] = 0.0;
60          setcolor(r->pcol, 1.0, 1.0, 1.0);
61          setcolor(r->rcol, 0.0, 0.0, 0.0);
# Line 70 | Line 68 | register RAY  *r;
68   {
69          extern int  (*trace)();
70  
71 <        if (localhit(r, &thescene))
71 >        if (localhit(r, &thescene) || sourcehit(r))
72 >                                                /* check for clipped object */
73                  if (r->clipset != NULL && inset(r->clipset, r->ro->omod))
74 <                        raytrans(r);            /* object is clipped */
74 >                        raytrans(r);
75                  else
76                          rayshade(r, r->ro->omod);
78        else if (sourcehit(r))
79                rayshade(r, r->ro->omod);
77  
78          if (trace != NULL)
79                  (*trace)(r);            /* trace execution */
# Line 104 | Line 101 | int  mod;
101          register OBJREC  *m;
102                                          /* check for infinite loop */
103          if (depth++ >= MAXLOOP)
104 <                objerror(r->ro, USER, "material loop");
104 >                objerror(r->ro, USER, "possible modifier loop");
105          for ( ; mod != OVOID; mod = m->omod) {
106                  m = objptr(mod);
107 +                /****** unnecessary test since modifier() is always called
108                  if (!ismodifier(m->otype)) {
109                          sprintf(errmsg, "illegal modifier \"%s\"", m->oname);
110                          error(USER, errmsg);
111                  }
112 +                ******/
113                  (*ofun[m->otype].funp)(m, r);   /* execute function */
114                  m->lastrno = r->rno;
115                  if (ismaterial(m->otype)) {     /* materials call raytexture */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines