call IntersectionRayTriangle in Intersection_Segment_Triangle instead of generic Intersection (missing overload).

This commit is contained in:
Marco Di Benedetto 2009-03-17 18:59:20 +00:00
parent eeacaeff3b
commit 915a7b40a1
1 changed files with 60 additions and 60 deletions

View File

@ -680,8 +680,8 @@ bool Intersection_Segment_Triangle( const vcg::Segment3<ScalarType> & seg,
ray.Set(seg.P0(),dir); ray.Set(seg.P0(),dir);
//then control for each direction the intersection with triangle //then control for each direction the intersection with triangle
if ((Intersection<ScalarType>(ray,vert0,vert1,vert2,a,b,dist)) if ((IntersectionRayTriangle<ScalarType>(ray,vert0,vert1,vert2,dist,a,b))
||(Intersection<ScalarType>(ray,vert1,vert0,vert2,b,a,dist))) ||(IntersectionRayTriangle<ScalarType>(ray,vert1,vert0,vert2,dist,b,a)))
return (dist<(seg.P1()-seg.P0()).Norm()); return (dist<(seg.P1()-seg.P0()).Norm());
else else
return(false); return(false);