ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/o_cone.c
(Generate patch)

Comparing ray/src/rt/o_cone.c (file contents):
Revision 2.10 by greg, Sun Jan 31 18:08:04 2021 UTC vs.
Revision 2.12 by greg, Thu Mar 16 00:25:24 2023 UTC

# Line 73 | Line 73 | o_cone(                        /* intersect ray with cone */
73                  if ((rdx[2] <= FTINY) & (rdx[2] >= -FTINY))
74                          return(0);                      /* parallel */
75                  root[0] = -rox[2]/rdx[2];
76 <                if (rayreject(o, r, root[0]))
76 >                if (rayreject(o, r, root[0], -rdx[2]))
77                          return(0);                      /* have better */
78                  b = root[0]*rdx[0] + rox[0];
79                  c = root[0]*rdx[1] + rox[1];
# Line 85 | Line 85 | o_cone(                        /* intersect ray with cone */
85                  VSUM(r->rop, r->rorg, r->rdir, r->rot);
86                  VCOPY(r->ron, co->ad);
87                  r->rod = -rdx[2];
88 +                r->pert[0] = r->pert[1] = r->pert[2] = 0.0;
89 +                r->uv[0] = r->uv[1] = 0.0;
90                  r->rox = NULL;
91                  return(1);                              /* good */
92          }
# Line 104 | Line 106 | o_cone(                        /* intersect ray with cone */
106                          continue;               /* before p0 */
107                  if (b > co->al)
108                          continue;               /* after p1 */
109 <                if (rayreject(o, r, root[rn]))
109 >                if (rayreject(o, r, root[rn], 0))
110                          break;                  /* previous hit better */
111                  r->ro = o;
112                  r->rot = root[rn];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines