mirror of https://github.com/CGAL/cgal
Merge pull request #5096 from maxGimeno/GraphicsView-is_facet_convex-maxGimeno
GraphicsView: Fix is_facet_convex()
This commit is contained in:
commit
604e3525b6
|
|
@ -502,11 +502,11 @@ public:
|
|||
// Is it possible that orientation==COPLANAR ? Maybe if V1 or V2 is very small ?
|
||||
}
|
||||
while(++id!=facet.size() &&
|
||||
(orientation==CGAL::COPLANAR || orientation==CGAL::ZERO));
|
||||
(orientation==CGAL::COPLANAR ));
|
||||
|
||||
//Here, all orientations were COPLANAR. Not sure this case is possible,
|
||||
// but we stop here.
|
||||
if (orientation==CGAL::COPLANAR || orientation==CGAL::ZERO)
|
||||
if (orientation==CGAL::COPLANAR)
|
||||
{ return false; }
|
||||
|
||||
// Now we compute convexness
|
||||
|
|
@ -523,6 +523,16 @@ public:
|
|||
|
||||
if(local_orientation!=CGAL::ZERO && local_orientation!=orientation)
|
||||
{ return false; }
|
||||
// V1 and V2 are collinear
|
||||
if(local_orientation==CGAL::ZERO )
|
||||
{
|
||||
//TS and TU are opposite
|
||||
if(CGAL::scalar_product(V1,V2) >=0)
|
||||
return true;
|
||||
//TS and TU have the same direction.
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue