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.26 by greg, Wed Apr 17 14:06:35 1996 UTC vs.
Revision 2.29 by gregl, Tue Dec 23 18:25:15 1997 UTC

# Line 96 | Line 96 | register RAY  *r;
96   {
97          r->rno = raynum++;
98          r->newcset = r->clipset;
99 +        r->robj = OVOID;
100          r->ro = NULL;
101 <        r->rot = FHUGE;
101 >        r->rt = r->rot = FHUGE;
102          r->pert[0] = r->pert[1] = r->pert[2] = 0.0;
103          setcolor(r->pcol, 1.0, 1.0, 1.0);
104          setcolor(r->rcol, 0.0, 0.0, 0.0);
104        r->rt = 0.0;
105   }
106  
107  
# Line 189 | Line 189 | rayparticipate(r)                      /* compute ray medium participatio
189   register RAY  *r;
190   {
191          COLOR   ce, ca;
192        double  dist;
192          double  re, ge, be;
193  
194          if (intens(r->cext) <= 1./FHUGE)
195                  return;                         /* no medium */
196 <        if ((dist = r->rot) >= FHUGE)
197 <                dist = 2.*thescene.cusize;      /* what to use for infinity? */
198 <        re = dist*colval(r->cext,RED);
200 <        ge = dist*colval(r->cext,GRN);
201 <        be = dist*colval(r->cext,BLU);
196 >        re = r->rot*colval(r->cext,RED);
197 >        ge = r->rot*colval(r->cext,GRN);
198 >        be = r->rot*colval(r->cext,BLU);
199          if (r->crtype & SHADOW) {               /* no scattering for sources */
200                  re *= 1. - colval(r->albedo,RED);
201                  ge *= 1. - colval(r->albedo,GRN);
# Line 557 | Line 554 | OBJECT  *cxs;
554          checkset(oset, cxs);                    /* eliminate double-checking */
555          for (i = oset[0]; i > 0; i--) {
556                  o = objptr(oset[i]);
557 <                (*ofun[o->otype].funp)(o, r);
557 >                if ((*ofun[o->otype].funp)(o, r))
558 >                        r->robj = oset[i];
559          }
560          if (r->ro == NULL)
561                  return(0);                      /* no scores yet */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines