KiCad PCB EDA Suite
PolygonTriangulation Class Reference

#include <polygon_triangulation.h>

Classes

struct  Vertex
 

Public Member Functions

 PolygonTriangulation (SHAPE_POLY_SET::TRIANGULATED_POLYGON &aResult)
 
bool TesselatePolygon (const SHAPE_LINE_CHAIN &aPoly)
 

Private Member Functions

int32_t zOrder (const double aX, const double aY) const
 Calculate the Morton code of the Vertex http://www.graphics.stanford.edu/~seander/bithacks.html#InterleaveBMN. More...
 
bool removeNullTriangles (Vertex *aStart)
 Function removeNullTriangles Iterates through the list to remove NULL triangles if they exist. More...
 
VertexcreateList (const ClipperLib::Path &aPath)
 Function createList Takes a Clipper path and converts it into a circular, doubly-linked list for triangulation. More...
 
VertexcreateList (const SHAPE_LINE_CHAIN &points)
 Function createList Takes the SHAPE_LINE_CHAIN and links each point into a circular, doubly-linked list. More...
 
bool earcutList (Vertex *aPoint, int pass=0)
 Function: earcutList Walks through a circular linked list starting at aPoint. More...
 
bool isEar (Vertex *aEar) const
 Function isEar Checks whether the given vertex is in the middle of an ear. More...
 
void splitPolygon (Vertex *start)
 Function splitPolygon If we cannot find an ear to slice in the current polygon list, we use this to split the polygon into two separate lists and slice them each independently. More...
 
bool goodSplit (const Vertex *a, const Vertex *b) const
 Check if a segment joining two vertices lies fully inside the polygon. More...
 
double area (const Vertex *p, const Vertex *q, const Vertex *r) const
 Function area Returns the twice the signed area of the triangle formed by vertices p, q, r. More...
 
bool intersects (const Vertex *p1, const Vertex *q1, const Vertex *p2, const Vertex *q2) const
 Function intersects Checks for intersection between two segments, end points included. More...
 
bool intersectsPolygon (const Vertex *a, const Vertex *b) const
 Function intersectsPolygon Checks whether the segment from vertex a -> vertex b crosses any of the segments of the polygon of which vertex a is a member. More...
 
bool locallyInside (const Vertex *a, const Vertex *b) const
 Function locallyInside Checks whether the segment from vertex a -> vertex b is inside the polygon around the immediate area of vertex a. More...
 
VertexinsertVertex (const VECTOR2I &pt, Vertex *last)
 Function insertVertex Creates an entry in the vertices lookup and optionally inserts the newly created vertex into an existing linked list. More...
 

Private Attributes

BOX2I m_bbox
 
std::deque< Vertexm_vertices
 
SHAPE_POLY_SET::TRIANGULATED_POLYGONm_result
 

Detailed Description

Definition at line 56 of file polygon_triangulation.h.

Constructor & Destructor Documentation

PolygonTriangulation::PolygonTriangulation ( SHAPE_POLY_SET::TRIANGULATED_POLYGON aResult)
inline

Definition at line 61 of file polygon_triangulation.h.

61  :
62  m_result( aResult )
63  {};
SHAPE_POLY_SET::TRIANGULATED_POLYGON & m_result

Member Function Documentation

double PolygonTriangulation::area ( const Vertex p,
const Vertex q,
const Vertex r 
) const
inlineprivate

Function area Returns the twice the signed area of the triangle formed by vertices p, q, r.

Definition at line 562 of file polygon_triangulation.h.

References PolygonTriangulation::Vertex::x, and PolygonTriangulation::Vertex::y.

Referenced by intersects(), isEar(), locallyInside(), and removeNullTriangles().

563  {
564  return ( q->y - p->y ) * ( r->x - q->x ) - ( q->x - p->x ) * ( r->y - q->y );
565  }
Vertex* PolygonTriangulation::createList ( const ClipperLib::Path &  aPath)
inlineprivate

Function createList Takes a Clipper path and converts it into a circular, doubly-linked list for triangulation.

Definition at line 301 of file polygon_triangulation.h.

References PolygonTriangulation::Vertex::i, insertVertex(), PolygonTriangulation::Vertex::next, and PolygonTriangulation::Vertex::remove().

Referenced by TesselatePolygon().

302  {
303  Vertex* tail = nullptr;
304  double sum = 0.0;
305  auto len = aPath.size();
306 
307  // Check for winding order
308  for( size_t i = 0; i < len; i++ )
309  {
310  auto p1 = aPath.at( i );
311  auto p2 = aPath.at( ( i + 1 ) < len ? i + 1 : 0 );
312 
313  sum += ( ( p2.X - p1.X ) * ( p2.Y + p1.Y ) );
314  }
315 
316  if( sum <= 0.0 )
317  {
318  for( auto point : aPath )
319  tail = insertVertex( VECTOR2I( point.X, point.Y ), tail );
320  }
321  else
322  {
323  for( size_t i = 0; i < len; i++ )
324  {
325  auto p = aPath.at( len - i - 1 );
326  tail = insertVertex( VECTOR2I( p.X, p.Y ), tail );
327  }
328  }
329 
330  if( tail && ( *tail == *tail->next ) )
331  {
332  tail->next->remove();
333  }
334 
335  return tail;
336 
337  }
VECTOR2< int > VECTOR2I
Definition: vector2d.h:587
size_t i
Definition: json11.cpp:597
Vertex * insertVertex(const VECTOR2I &pt, Vertex *last)
Function insertVertex Creates an entry in the vertices lookup and optionally inserts the newly create...
Vertex* PolygonTriangulation::createList ( const SHAPE_LINE_CHAIN points)
inlineprivate

Function createList Takes the SHAPE_LINE_CHAIN and links each point into a circular, doubly-linked list.

Definition at line 344 of file polygon_triangulation.h.

References SHAPE_LINE_CHAIN::CPoint(), PolygonTriangulation::Vertex::i, insertVertex(), PolygonTriangulation::Vertex::next, SHAPE_LINE_CHAIN::PointCount(), PolygonTriangulation::Vertex::remove(), VECTOR2< T >::x, and VECTOR2< T >::y.

345  {
346  Vertex* tail = nullptr;
347  double sum = 0.0;
348 
349  // Check for winding order
350  for( int i = 0; i < points.PointCount(); i++ )
351  {
352  VECTOR2D p1 = points.CPoint( i );
353  VECTOR2D p2 = points.CPoint( i + 1 );
354 
355  sum += ( ( p2.x - p1.x ) * ( p2.y + p1.y ) );
356  }
357 
358  if( sum > 0.0 )
359  for( int i = points.PointCount() - 1; i >= 0; i--)
360  tail = insertVertex( points.CPoint( i ), tail );
361  else
362  for( int i = 0; i < points.PointCount(); i++ )
363  tail = insertVertex( points.CPoint( i ), tail );
364 
365  if( tail && ( *tail == *tail->next ) )
366  {
367  tail->next->remove();
368  }
369 
370  return tail;
371  }
int PointCount() const
Function PointCount()
void remove()
Function remove Removes the node from the linked list and z-ordered linked list.
size_t i
Definition: json11.cpp:597
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
Vertex * insertVertex(const VECTOR2I &pt, Vertex *last)
Function insertVertex Creates an entry in the vertices lookup and optionally inserts the newly create...
bool PolygonTriangulation::earcutList ( Vertex aPoint,
int  pass = 0 
)
inlineprivate

Function: earcutList Walks through a circular linked list starting at aPoint.

For each point, test to see if the adjacent points form a triangle that is completely enclosed by the remaining polygon (an "ear" sticking off the polygon). If the three points form an ear, we log the ear's location and remove the center point from the linked list.

This function can be called recursively in the case of difficult polygons. In cases where there is an intersection (not technically allowed by KiCad, but could exist in an edited file), we create a single triangle and remove both vertices before attempting to

We've searched the entire polygon for available ears and there are still un-sliced nodes remaining

At this point, our polygon should be fully tesselated.

Definition at line 384 of file polygon_triangulation.h.

References SHAPE_POLY_SET::TRIANGULATED_POLYGON::AddTriangle(), PolygonTriangulation::Vertex::i, intersects(), isEar(), locallyInside(), PolygonTriangulation::Vertex::next, PolygonTriangulation::Vertex::prev, PolygonTriangulation::Vertex::remove(), removeNullTriangles(), and splitPolygon().

Referenced by splitPolygon(), and TesselatePolygon().

385  {
386  if( !aPoint )
387  return true;
388 
389  Vertex* stop = aPoint;
390  Vertex* prev;
391  Vertex* next;
392 
393  while( aPoint->prev != aPoint->next )
394  {
395  prev = aPoint->prev;
396  next = aPoint->next;
397 
398  if( isEar( aPoint ) )
399  {
400  m_result.AddTriangle( prev->i, aPoint->i, next->i );
401  aPoint->remove();
402 
403  // Skip one vertex as the triangle will account for the prev node
404  aPoint = next->next;
405  stop = next->next;
406 
407  continue;
408  }
409 
410  Vertex* nextNext = next->next;
411 
412  if( *prev != *nextNext && intersects( prev, aPoint, next, nextNext ) &&
413  locallyInside( prev, nextNext ) &&
414  locallyInside( nextNext, prev ) )
415  {
416  m_result.AddTriangle( prev->i, aPoint->i, nextNext->i );
417 
418  // remove two nodes involved
419  next->remove();
420  aPoint->remove();
421 
422  aPoint = nextNext;
423 
424  continue;
425  }
426 
427  aPoint = next;
428 
433  if( aPoint == stop )
434  {
435  // First, try to remove the remaining steiner points
436  if( removeNullTriangles( aPoint ) )
437  continue;
438 
439  // If we don't have any NULL triangles left, cut the polygon in two and try again
440  splitPolygon( aPoint );
441  break;
442  }
443  }
444 
448  return( aPoint->prev == aPoint->next );
449  }
bool intersects(const Vertex *p1, const Vertex *q1, const Vertex *p2, const Vertex *q2) const
Function intersects Checks for intersection between two segments, end points included.
CITER next(CITER it)
Definition: ptree.cpp:130
bool removeNullTriangles(Vertex *aStart)
Function removeNullTriangles Iterates through the list to remove NULL triangles if they exist...
SHAPE_POLY_SET::TRIANGULATED_POLYGON & m_result
bool locallyInside(const Vertex *a, const Vertex *b) const
Function locallyInside Checks whether the segment from vertex a -> vertex b is inside the polygon aro...
bool isEar(Vertex *aEar) const
Function isEar Checks whether the given vertex is in the middle of an ear.
void splitPolygon(Vertex *start)
Function splitPolygon If we cannot find an ear to slice in the current polygon list, we use this to split the polygon into two separate lists and slice them each independently.
bool PolygonTriangulation::goodSplit ( const Vertex a,
const Vertex b 
) const
inlineprivate

Check if a segment joining two vertices lies fully inside the polygon.

To do this, we first ensure that the line isn't along the polygon edge. Next, we know that if the line doesn't intersect the polygon, then it is either fully inside or fully outside the polygon. Finally, by checking whether the segment is enclosed by the local triangles, we distinguish between these two cases and no further checks are needed.

Definition at line 549 of file polygon_triangulation.h.

References PolygonTriangulation::Vertex::i, intersectsPolygon(), locallyInside(), PolygonTriangulation::Vertex::next, and PolygonTriangulation::Vertex::prev.

Referenced by splitPolygon().

550  {
551  return a->next->i != b->i &&
552  a->prev->i != b->i &&
553  !intersectsPolygon( a, b ) &&
554  locallyInside( a, b );
555  }
bool locallyInside(const Vertex *a, const Vertex *b) const
Function locallyInside Checks whether the segment from vertex a -> vertex b is inside the polygon aro...
bool intersectsPolygon(const Vertex *a, const Vertex *b) const
Function intersectsPolygon Checks whether the segment from vertex a -> vertex b crosses any of the se...
Vertex* PolygonTriangulation::insertVertex ( const VECTOR2I pt,
Vertex last 
)
inlineprivate

Function insertVertex Creates an entry in the vertices lookup and optionally inserts the newly created vertex into an existing linked list.

Returns a pointer to the newly created vertex

Definition at line 626 of file polygon_triangulation.h.

References SHAPE_POLY_SET::TRIANGULATED_POLYGON::AddVertex(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetVertexCount(), PolygonTriangulation::Vertex::next, PolygonTriangulation::Vertex::prev, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by createList().

627  {
628  m_result.AddVertex( pt );
629  m_vertices.emplace_back( m_result.GetVertexCount() - 1, pt.x, pt.y, this );
630 
631  Vertex* p = &m_vertices.back();
632  if( !last )
633  {
634  p->prev = p;
635  p->next = p;
636  }
637  else
638  {
639  p->next = last->next;
640  p->prev = last;
641  last->next->prev = p;
642  last->next = p;
643  }
644  return p;
645  }
SHAPE_POLY_SET::TRIANGULATED_POLYGON & m_result
void AddVertex(const VECTOR2I &aP)
std::deque< Vertex > m_vertices
bool PolygonTriangulation::intersects ( const Vertex p1,
const Vertex q1,
const Vertex p2,
const Vertex q2 
) const
inlineprivate

Function intersects Checks for intersection between two segments, end points included.

Returns true if p1-p2 intersects q1-q2

Definition at line 572 of file polygon_triangulation.h.

References area().

Referenced by earcutList(), and intersectsPolygon().

573  {
574  if( ( *p1 == *q1 && *p2 == *q2 ) || ( *p1 == *q2 && *p2 == *q1 ) )
575  return true;
576 
577  return ( area( p1, q1, p2 ) > 0 ) != ( area( p1, q1, q2 ) > 0 )
578  && ( area( p2, q2, p1 ) > 0 ) != ( area( p2, q2, q1 ) > 0 );
579  }
double area(const Vertex *p, const Vertex *q, const Vertex *r) const
Function area Returns the twice the signed area of the triangle formed by vertices p...
bool PolygonTriangulation::intersectsPolygon ( const Vertex a,
const Vertex b 
) const
inlineprivate

Function intersectsPolygon Checks whether the segment from vertex a -> vertex b crosses any of the segments of the polygon of which vertex a is a member.

Return true if the segment intersects the edge of the polygon

Definition at line 587 of file polygon_triangulation.h.

References PolygonTriangulation::Vertex::i, intersects(), and PolygonTriangulation::Vertex::next.

Referenced by goodSplit().

588  {
589  const Vertex* p = a->next;
590  do
591  {
592  if( p->i != a->i &&
593  p->next->i != a->i &&
594  p->i != b->i &&
595  p->next->i != b->i && intersects( p, p->next, a, b ) )
596  return true;
597 
598  p = p->next;
599  } while( p != a );
600 
601  return false;
602  }
bool intersects(const Vertex *p1, const Vertex *q1, const Vertex *p2, const Vertex *q2) const
Function intersects Checks for intersection between two segments, end points included.
bool PolygonTriangulation::isEar ( Vertex aEar) const
inlineprivate

Function isEar Checks whether the given vertex is in the middle of an ear.

This works by walking forward and backward in zOrder to the limits of the minimal bounding box formed around the triangle, checking whether any points are located inside the given triangle.

Returns true if aEar is the apex point of a ear in the polygon

Definition at line 460 of file polygon_triangulation.h.

References area(), PolygonTriangulation::Vertex::inTriangle(), max, min, PolygonTriangulation::Vertex::next, PolygonTriangulation::Vertex::nextZ, PolygonTriangulation::Vertex::prev, PolygonTriangulation::Vertex::prevZ, PolygonTriangulation::Vertex::x, PolygonTriangulation::Vertex::y, PolygonTriangulation::Vertex::z, and zOrder().

Referenced by earcutList().

461  {
462  const Vertex* a = aEar->prev;
463  const Vertex* b = aEar;
464  const Vertex* c = aEar->next;
465 
466  // If the area >=0, then the three points for a concave sequence
467  // with b as the reflex point
468  if( area( a, b, c ) >= 0 )
469  return false;
470 
471  // triangle bbox
472  const double minTX = std::min( a->x, std::min( b->x, c->x ) );
473  const double minTY = std::min( a->y, std::min( b->y, c->y ) );
474  const double maxTX = std::max( a->x, std::max( b->x, c->x ) );
475  const double maxTY = std::max( a->y, std::max( b->y, c->y ) );
476 
477  // z-order range for the current triangle bounding box
478  const int32_t minZ = zOrder( minTX, minTY );
479  const int32_t maxZ = zOrder( maxTX, maxTY );
480 
481  // first look for points inside the triangle in increasing z-order
482  Vertex* p = aEar->nextZ;
483 
484  while( p && p->z <= maxZ )
485  {
486  if( p != a && p != c
487  && p->inTriangle( *a, *b, *c )
488  && area( p->prev, p, p->next ) >= 0 )
489  return false;
490  p = p->nextZ;
491  }
492 
493  // then look for points in decreasing z-order
494  p = aEar->prevZ;
495 
496  while( p && p->z >= minZ )
497  {
498  if( p != a && p != c
499  && p->inTriangle( *a, *b, *c )
500  && area( p->prev, p, p->next ) >= 0 )
501  return false;
502  p = p->prevZ;
503  }
504 
505  return true;
506  }
double area(const Vertex *p, const Vertex *q, const Vertex *r) const
Function area Returns the twice the signed area of the triangle formed by vertices p...
#define max(a, b)
Definition: auxiliary.h:86
int32_t zOrder(const double aX, const double aY) const
Calculate the Morton code of the Vertex http://www.graphics.stanford.edu/~seander/bithacks.html#InterleaveBMN.
#define min(a, b)
Definition: auxiliary.h:85
bool PolygonTriangulation::locallyInside ( const Vertex a,
const Vertex b 
) const
inlineprivate

Function locallyInside Checks whether the segment from vertex a -> vertex b is inside the polygon around the immediate area of vertex a.

We don't define the exact area over which the segment is inside but it is guaranteed to be inside the polygon immediately adjacent to vertex a. Returns true if the segment from a->b is inside a's polygon next to vertex a

Definition at line 612 of file polygon_triangulation.h.

References area(), PolygonTriangulation::Vertex::next, and PolygonTriangulation::Vertex::prev.

Referenced by earcutList(), and goodSplit().

613  {
614  if( area( a->prev, a, a->next ) < 0 )
615  return area( a, b, a->next ) >= 0 && area( a, a->prev, b ) >= 0;
616  else
617  return area( a, b, a->prev ) < 0 || area( a, a->next, b ) < 0;
618  }
double area(const Vertex *p, const Vertex *q, const Vertex *r) const
Function area Returns the twice the signed area of the triangle formed by vertices p...
bool PolygonTriangulation::removeNullTriangles ( Vertex aStart)
inlineprivate

Function removeNullTriangles Iterates through the list to remove NULL triangles if they exist.

This should only be called as a last resort when tesselation fails as the NULL triangles are inserted as Steiner points to improve the triangulation regularity of polygons

Definition at line 266 of file polygon_triangulation.h.

References area(), PolygonTriangulation::Vertex::next, PolygonTriangulation::Vertex::prev, and PolygonTriangulation::Vertex::remove().

Referenced by earcutList().

267  {
268  bool retval = false;
269  Vertex* p = aStart->next;
270 
271  while( p != aStart )
272  {
273  if( area( p->prev, p, p->next ) == 0.0 )
274  {
275  p = p->prev;
276  p->next->remove();
277  retval = true;
278 
279  if( p == p->next )
280  break;
281  }
282  p = p->next;
283  };
284 
285  // We needed an end point above that wouldn't be removed, so
286  // here we do the final check for this as a Steiner point
287  if( area( aStart->prev, aStart, aStart->next ) == 0.0 )
288  {
289  p->remove();
290  retval = true;
291  }
292 
293  return retval;
294  }
double area(const Vertex *p, const Vertex *q, const Vertex *r) const
Function area Returns the twice the signed area of the triangle formed by vertices p...
void PolygonTriangulation::splitPolygon ( Vertex start)
inlineprivate

Function splitPolygon If we cannot find an ear to slice in the current polygon list, we use this to split the polygon into two separate lists and slice them each independently.

This is assured to generate at least one new ear if the split is successful

Definition at line 515 of file polygon_triangulation.h.

References earcutList(), goodSplit(), PolygonTriangulation::Vertex::i, PolygonTriangulation::Vertex::next, PolygonTriangulation::Vertex::prev, PolygonTriangulation::Vertex::split(), and PolygonTriangulation::Vertex::updateList().

Referenced by earcutList().

516  {
517  Vertex* origPoly = start;
518  do
519  {
520  Vertex* marker = origPoly->next->next;
521  while( marker != origPoly->prev )
522  {
523  // Find a diagonal line that is wholly enclosed by the polygon interior
524  if( origPoly->i != marker->i && goodSplit( origPoly, marker ) )
525  {
526  Vertex* newPoly = origPoly->split( marker );
527 
528  origPoly->updateList();
529  newPoly->updateList();
530 
531  earcutList( origPoly );
532  earcutList( newPoly );
533  return;
534  }
535  marker = marker->next;
536  }
537  origPoly = origPoly->next;
538  } while( origPoly != start );
539  }
bool goodSplit(const Vertex *a, const Vertex *b) const
Check if a segment joining two vertices lies fully inside the polygon.
bool earcutList(Vertex *aPoint, int pass=0)
Function: earcutList Walks through a circular linked list starting at aPoint.
bool PolygonTriangulation::TesselatePolygon ( const SHAPE_LINE_CHAIN aPoly)
inline

Place the polygon Vertices into a circular linked list and check for lists that have only 0, 1 or 2 elements and therefore cannot be polygons

Definition at line 650 of file polygon_triangulation.h.

References SHAPE_LINE_CHAIN::BBox(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::Clear(), createList(), earcutList(), BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), PolygonTriangulation::Vertex::next, PolygonTriangulation::Vertex::prev, and PolygonTriangulation::Vertex::updateList().

651  {
652  m_bbox = aPoly.BBox();
653  m_result.Clear();
654 
655  if( !m_bbox.GetWidth() || !m_bbox.GetHeight() )
656  return false;
657 
661  Vertex* firstVertex = createList( aPoly );
662  if( !firstVertex || firstVertex->prev == firstVertex->next )
663  return false;
664 
665  firstVertex->updateList();
666 
667  auto retval = earcutList( firstVertex );
668  m_vertices.clear();
669  return retval;
670  }
Vertex * createList(const ClipperLib::Path &aPath)
Function createList Takes a Clipper path and converts it into a circular, doubly-linked list for tria...
coord_type GetWidth() const
Definition: box2.h:195
bool earcutList(Vertex *aPoint, int pass=0)
Function: earcutList Walks through a circular linked list starting at aPoint.
const BOX2I BBox(int aClearance=0) const override
Function BBox()
SHAPE_POLY_SET::TRIANGULATED_POLYGON & m_result
coord_type GetHeight() const
Definition: box2.h:196
std::deque< Vertex > m_vertices
int32_t PolygonTriangulation::zOrder ( const double  aX,
const double  aY 
) const
inlineprivate

Calculate the Morton code of the Vertex http://www.graphics.stanford.edu/~seander/bithacks.html#InterleaveBMN.

Definition at line 241 of file polygon_triangulation.h.

References BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), BOX2< Vec >::GetX(), BOX2< Vec >::GetY(), PolygonTriangulation::Vertex::x, and PolygonTriangulation::Vertex::y.

Referenced by isEar(), and PolygonTriangulation::Vertex::updateOrder().

242  {
243  int32_t x = static_cast<int32_t>( 32767.0 * ( aX - m_bbox.GetX() ) / m_bbox.GetWidth() );
244  int32_t y = static_cast<int32_t>( 32767.0 * ( aY - m_bbox.GetY() ) / m_bbox.GetHeight() );
245 
246  x = ( x | ( x << 8 ) ) & 0x00FF00FF;
247  x = ( x | ( x << 4 ) ) & 0x0F0F0F0F;
248  x = ( x | ( x << 2 ) ) & 0x33333333;
249  x = ( x | ( x << 1 ) ) & 0x55555555;
250 
251  y = ( y | ( y << 8 ) ) & 0x00FF00FF;
252  y = ( y | ( y << 4 ) ) & 0x0F0F0F0F;
253  y = ( y | ( y << 2 ) ) & 0x33333333;
254  y = ( y | ( y << 1 ) ) & 0x55555555;
255 
256  return x | ( y << 1 );
257  }
coord_type GetY() const
Definition: box2.h:189
coord_type GetWidth() const
Definition: box2.h:195
coord_type GetHeight() const
Definition: box2.h:196
coord_type GetX() const
Definition: box2.h:188

Member Data Documentation

BOX2I PolygonTriangulation::m_bbox
private

Definition at line 232 of file polygon_triangulation.h.

SHAPE_POLY_SET::TRIANGULATED_POLYGON& PolygonTriangulation::m_result
private

Definition at line 234 of file polygon_triangulation.h.

std::deque<Vertex> PolygonTriangulation::m_vertices
private

Definition at line 233 of file polygon_triangulation.h.

Referenced by PolygonTriangulation::Vertex::split().


The documentation for this class was generated from the following file: