Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

mapbox::detail::Earcut< N > Class Template Reference

#include <ogdf/lib/mapbox/mapbox_earcut.h>

Classes

struct  Node
 
class  ObjectPool
 

Public Member Functions

template<typename Polygon >
void operator() (const Polygon &points)
 

Public Attributes

std::vector< N > indices
 
std::size_t vertices = 0
 

Private Member Functions

double area (const Node *p, const Node *q, const Node *r) const
 
NodecureLocalIntersections (Node *start)
 
void earcutLinked (Node *ear, int pass=0)
 
void eliminateHole (Node *hole, Node *outerNode)
 
template<typename Polygon >
NodeeliminateHoles (const Polygon &points, Node *outerNode)
 
bool equals (const Node *p1, const Node *p2)
 
NodefilterPoints (Node *start, Node *end=nullptr)
 
NodefindHoleBridge (Node *hole, Node *outerNode)
 
NodegetLeftmost (Node *start)
 
void indexCurve (Node *start)
 
template<typename Point >
NodeinsertNode (std::size_t i, const Point &p, Node *last)
 
bool intersects (const Node *p1, const Node *q1, const Node *p2, const Node *q2)
 
bool intersectsPolygon (const Node *a, const Node *b)
 
bool isEar (Node *ear)
 
bool isEarHashed (Node *ear)
 
bool isValidDiagonal (Node *a, Node *b)
 
template<typename Ring >
NodelinkedList (const Ring &points, const bool clockwise)
 
bool locallyInside (const Node *a, const Node *b)
 
bool middleInside (const Node *a, const Node *b)
 
bool pointInTriangle (double ax, double ay, double bx, double by, double cx, double cy, double px, double py) const
 
void removeNode (Node *p)
 
NodesortLinked (Node *list)
 
void splitEarcut (Node *start)
 
NodesplitPolygon (Node *a, Node *b)
 
int32_t zOrder (const double x_, const double y_)
 

Private Attributes

bool hashing
 
double inv_size = 0
 
double maxX
 
double maxY
 
double minX
 
double minY
 
ObjectPool< Nodenodes
 

Detailed Description

template<typename N = uint32_t>
class mapbox::detail::Earcut< N >

Definition at line 41 of file mapbox_earcut.h.

Member Function Documentation

◆ area()

template<typename N >
double mapbox::detail::Earcut< N >::area ( const Node p,
const Node q,
const Node r 
) const
private

Definition at line 672 of file mapbox_earcut.h.

◆ cureLocalIntersections()

template<typename N >
Earcut< N >::Node * mapbox::detail::Earcut< N >::cureLocalIntersections ( Node start)
private

Definition at line 383 of file mapbox_earcut.h.

◆ earcutLinked()

template<typename N >
void mapbox::detail::Earcut< N >::earcutLinked ( Node ear,
int  pass = 0 
)
private

Definition at line 268 of file mapbox_earcut.h.

◆ eliminateHole()

template<typename N >
void mapbox::detail::Earcut< N >::eliminateHole ( Node hole,
Node outerNode 
)
private

Definition at line 463 of file mapbox_earcut.h.

◆ eliminateHoles()

template<typename N >
template<typename Polygon >
Earcut< N >::Node * mapbox::detail::Earcut< N >::eliminateHoles ( const Polygon &  points,
Node outerNode 
)
private

Definition at line 437 of file mapbox_earcut.h.

◆ equals()

template<typename N >
bool mapbox::detail::Earcut< N >::equals ( const Node p1,
const Node p2 
)
private

Definition at line 678 of file mapbox_earcut.h.

◆ filterPoints()

template<typename N >
Earcut< N >::Node * mapbox::detail::Earcut< N >::filterPoints ( Node start,
Node end = nullptr 
)
private

Definition at line 243 of file mapbox_earcut.h.

◆ findHoleBridge()

template<typename N >
Earcut< N >::Node * mapbox::detail::Earcut< N >::findHoleBridge ( Node hole,
Node outerNode 
)
private

Definition at line 474 of file mapbox_earcut.h.

◆ getLeftmost()

template<typename N >
Earcut< N >::Node * mapbox::detail::Earcut< N >::getLeftmost ( Node start)
private

Definition at line 643 of file mapbox_earcut.h.

◆ indexCurve()

template<typename N >
void mapbox::detail::Earcut< N >::indexCurve ( Node start)
private

Definition at line 534 of file mapbox_earcut.h.

◆ insertNode()

template<typename N >
template<typename Point >
Earcut< N >::Node * mapbox::detail::Earcut< N >::insertNode ( std::size_t  i,
const Point &  p,
Node last 
)
private

Definition at line 758 of file mapbox_earcut.h.

◆ intersects()

template<typename N >
bool mapbox::detail::Earcut< N >::intersects ( const Node p1,
const Node q1,
const Node p2,
const Node q2 
)
private

Definition at line 684 of file mapbox_earcut.h.

◆ intersectsPolygon()

template<typename N >
bool mapbox::detail::Earcut< N >::intersectsPolygon ( const Node a,
const Node b 
)
private

Definition at line 693 of file mapbox_earcut.h.

◆ isEar()

template<typename N >
bool mapbox::detail::Earcut< N >::isEar ( Node ear)
private

Definition at line 320 of file mapbox_earcut.h.

◆ isEarHashed()

template<typename N >
bool mapbox::detail::Earcut< N >::isEarHashed ( Node ear)
private

Definition at line 340 of file mapbox_earcut.h.

◆ isValidDiagonal()

template<typename N >
bool mapbox::detail::Earcut< N >::isValidDiagonal ( Node a,
Node b 
)
private

Definition at line 665 of file mapbox_earcut.h.

◆ linkedList()

template<typename N >
template<typename Ring >
Earcut< N >::Node * mapbox::detail::Earcut< N >::linkedList ( const Ring &  points,
const bool  clockwise 
)
private

Definition at line 205 of file mapbox_earcut.h.

◆ locallyInside()

template<typename N >
bool mapbox::detail::Earcut< N >::locallyInside ( const Node a,
const Node b 
)
private

Definition at line 706 of file mapbox_earcut.h.

◆ middleInside()

template<typename N >
bool mapbox::detail::Earcut< N >::middleInside ( const Node a,
const Node b 
)
private

Definition at line 714 of file mapbox_earcut.h.

◆ operator()()

template<typename N >
template<typename Polygon >
void mapbox::detail::Earcut< N >::operator() ( const Polygon &  points)

Definition at line 150 of file mapbox_earcut.h.

◆ pointInTriangle()

template<typename N >
bool mapbox::detail::Earcut< N >::pointInTriangle ( double  ax,
double  ay,
double  bx,
double  by,
double  cx,
double  cy,
double  px,
double  py 
) const
private

Definition at line 657 of file mapbox_earcut.h.

◆ removeNode()

template<typename N >
void mapbox::detail::Earcut< N >::removeNode ( Node p)
private

Definition at line 776 of file mapbox_earcut.h.

◆ sortLinked()

template<typename N >
Earcut< N >::Node * mapbox::detail::Earcut< N >::sortLinked ( Node list)
private

Definition at line 555 of file mapbox_earcut.h.

◆ splitEarcut()

template<typename N >
void mapbox::detail::Earcut< N >::splitEarcut ( Node start)
private

Definition at line 409 of file mapbox_earcut.h.

◆ splitPolygon()

template<typename N >
Earcut< N >::Node * mapbox::detail::Earcut< N >::splitPolygon ( Node a,
Node b 
)
private

Definition at line 734 of file mapbox_earcut.h.

◆ zOrder()

template<typename N >
int32_t mapbox::detail::Earcut< N >::zOrder ( const double  x_,
const double  y_ 
)
private

Definition at line 622 of file mapbox_earcut.h.

Member Data Documentation

◆ hashing

template<typename N = uint32_t>
bool mapbox::detail::Earcut< N >::hashing
private

Definition at line 102 of file mapbox_earcut.h.

◆ indices

template<typename N = uint32_t>
std::vector<N> mapbox::detail::Earcut< N >::indices

Definition at line 43 of file mapbox_earcut.h.

◆ inv_size

template<typename N = uint32_t>
double mapbox::detail::Earcut< N >::inv_size = 0
private

Definition at line 105 of file mapbox_earcut.h.

◆ maxX

template<typename N = uint32_t>
double mapbox::detail::Earcut< N >::maxX
private

Definition at line 103 of file mapbox_earcut.h.

◆ maxY

template<typename N = uint32_t>
double mapbox::detail::Earcut< N >::maxY
private

Definition at line 104 of file mapbox_earcut.h.

◆ minX

template<typename N = uint32_t>
double mapbox::detail::Earcut< N >::minX
private

Definition at line 103 of file mapbox_earcut.h.

◆ minY

template<typename N = uint32_t>
double mapbox::detail::Earcut< N >::minY
private

Definition at line 104 of file mapbox_earcut.h.

◆ nodes

template<typename N = uint32_t>
ObjectPool<Node> mapbox::detail::Earcut< N >::nodes
private

Definition at line 146 of file mapbox_earcut.h.

◆ vertices

template<typename N = uint32_t>
std::size_t mapbox::detail::Earcut< N >::vertices = 0

Definition at line 44 of file mapbox_earcut.h.


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