Corrected a small (!) bug in the IntersectionSegmentTriangle. (the line triangle intersection function returns a **signed** distance...)

This commit is contained in:
Paolo Cignoni 2012-10-15 09:42:05 +00:00
parent 1331ead487
commit 372ee1ed99
1 changed files with 1 additions and 1 deletions

View File

@ -596,7 +596,7 @@ bool IntersectionSegmentTriangle( const vcg::Segment3<ScalarType> & seg,
line.Set(seg.P0(),dir);
ScalarType orig_dist;
if(IntersectionLineTriangle<ScalarType>(line,vert0,vert1,vert2,orig_dist,a,b))
return (orig_dist<=length);
return (orig_dist>=0 && orig_dist<=length);
return false;
}
/**