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

Comparing ray/src/rt/o_mesh.c (file contents):
Revision 2.11 by greg, Sat Feb 25 19:49:16 2006 UTC vs.
Revision 2.13 by greg, Tue Oct 23 05:03:52 2012 UTC

# Line 113 | Line 113 | RAY    *r;
113                                  "missing triangle vertices in mesh_hit");
114                  sv1 = volume_sign(r, tvi[0], tvi[1]);
115                  sv2 = volume_sign(r, tvi[1], tvi[2]);
116 +                if (sv1 != sv2)                 /* compare volume signs */
117 +                        continue;
118                  sv3 = volume_sign(r, tvi[2], tvi[0]);
119 <                                                /* compare volume signs */
118 <                if ((sv1 != sv2) | (sv2 != sv3))
119 >                if (sv2 != sv3)
120                          continue;
121                                                  /* compute intersection */
122                  getmeshvert(&tv[0], curmsh, tvi[0], MT_V);
# Line 198 | Line 199 | o_mesh(                        /* compute ray intersection with a mesh */
199                                          wt[2]*tv[2].n[i];
200                  multv3(r->pert, rcont.pert, curmi->x.f.xfm);
201                  if (normalize(r->pert) != 0.0)
202 <                        for (i = 0; i < 3; i++)
202 <                                r->pert[i] -= r->ron[i];
202 >                        VSUB(r->pert, r->pert, r->ron);
203          } else
204                  r->pert[0] = r->pert[1] = r->pert[2] = .0;
205  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines