Fixed a bug in SweepLine.add() that the returned value of

GeomUtils::intersect2dSeg2dSegParametric() was not properly tested.
Now two collinear line segments are not considered an intersection.
This commit is contained in:
Tamito Kajiyama
2010-01-18 03:54:15 +00:00
parent dd5e7258cd
commit 9802fdf4c2

View File

@@ -298,7 +298,7 @@ public:
if(S->CommonVertex(*currentS, CP))
continue; // the two edges have a common vertex->no need to check
if(GeomUtils::intersect2dSeg2dSegParametric(v0, v1, v2, v3, t, u))
if(GeomUtils::intersect2dSeg2dSegParametric(v0, v1, v2, v3, t, u) == GeomUtils::DO_INTERSECT)
{
// create the intersection
Intersection<Segment<T,Point> > * inter = new Intersection<Segment<T,Point> >(S,t,currentS,u);