Corrected a small (!) bug in the IntersectionSegmentTriangle. (the line triangle intersection function returns a **signed** distance...)
This commit is contained in:
parent
1331ead487
commit
372ee1ed99
vcg/space
|
@ -596,7 +596,7 @@ bool IntersectionSegmentTriangle( const vcg::Segment3<ScalarType> & seg,
|
||||||
line.Set(seg.P0(),dir);
|
line.Set(seg.P0(),dir);
|
||||||
ScalarType orig_dist;
|
ScalarType orig_dist;
|
||||||
if(IntersectionLineTriangle<ScalarType>(line,vert0,vert1,vert2,orig_dist,a,b))
|
if(IntersectionLineTriangle<ScalarType>(line,vert0,vert1,vert2,orig_dist,a,b))
|
||||||
return (orig_dist<=length);
|
return (orig_dist>=0 && orig_dist<=length);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue