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.77 by greg, Fri Feb 22 19:42:27 2019 UTC vs.
Revision 2.81 by greg, Sun Mar 29 18:21:57 2020 UTC

# Line 68 | Line 68 | rayorigin(             /* start new ray from old one */
68                  r->gecc = seccg;
69                  r->slights = NULL;
70          } else {                                /* spawned ray */
71 <                if (ro->rot >= FHUGE) {
71 >                if (ro->rot >= FHUGE*.99) {
72                          memset(r, 0, sizeof(RAY));
73                          return(-1);             /* illegal continuation */
74                  }
# Line 146 | Line 146 | rayclear(                      /* clear a ray for (re)evaluation */
146          r->ro = NULL;
147          r->rox = NULL;
148          r->rxt = r->rmt = r->rot = FHUGE;
149 +        VCOPY(r->rop, r->rorg);
150          r->pert[0] = r->pert[1] = r->pert[2] = 0.0;
151 +        r->rflips = 0;
152          r->uv[0] = r->uv[1] = 0.0;
153          setcolor(r->pcol, 1.0, 1.0, 1.0);
154          setcolor(r->mcol, 0.0, 0.0, 0.0);
# Line 229 | Line 231 | rayshade(              /* shade ray r with material mod */
231          int     tst_irrad = do_irrad && !(r->crtype & ~(PRIMARY|TRANS));
232          OBJREC  *m;
233  
234 <        r->rxt = r->rmt = r->rot;       /* preset effective ray length */
234 >        r->rxt = r->rot;                /* preset effective ray length */
235          for ( ; mod != OVOID; mod = m->omod) {
236                  m = objptr(mod);
237                  /****** unnecessary test since modifier() is always called
# Line 509 | Line 511 | flipsurface(                   /* reverse surface orientation */
511          r->pert[0] = -r->pert[0];
512          r->pert[1] = -r->pert[1];
513          r->pert[2] = -r->pert[2];
514 +        r->rflips++;
515   }
516  
517  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines