polygon_triangulation.h: fix a missing call to updateList() in TesselatePolygon.
This commit is contained in:
parent
6a233a1367
commit
2ec957a226
|
@ -624,6 +624,7 @@ public:
|
|||
return;
|
||||
|
||||
outerNode->updateList();
|
||||
|
||||
if( !earcutList( outerNode ) )
|
||||
{
|
||||
m_vertices.clear();
|
||||
|
@ -635,9 +636,11 @@ public:
|
|||
for( auto path : simplified )
|
||||
{
|
||||
outerNode = createList( path );
|
||||
|
||||
if( !outerNode )
|
||||
return;
|
||||
|
||||
outerNode->updateList();
|
||||
earcutList( outerNode );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -975,12 +975,11 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment, int aLayer )
|
|||
|
||||
#if 0
|
||||
// On Opengl, a not convex filled polygon is usually drawn by using triangles as primitives.
|
||||
// Although using CacheTriangulation() to create basic triangle primitives
|
||||
// to draw the polygon solid shape on Opengl, it is not used because CacheTriangulation()
|
||||
// does not work fine with any polygon.
|
||||
// It must be a simple polygon.
|
||||
// Although CacheTriangulation() can create basic triangle primitives
|
||||
// to draw the polygon solid shape on Opengl, it is not used because it does not work fine
|
||||
// with any polygon. It must be a simple polygon.
|
||||
// And unfortunately, calling shape.Simplify( PM_FAST) is very slow.
|
||||
// So we just use GLU tesselation (much slower, but works with any polygon)
|
||||
// So for now we just use GLU tesselation (much slower, but works with any polygon)
|
||||
// This section is left until a better way is found
|
||||
if( !shape.IsTriangulationUpToDate() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue