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

#include <triangulation.hpp>

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

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

Private Attributes

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

Member Function Documentation

◆ area()

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

◆ cureLocalIntersections()

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

◆ earcutLinked()

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

◆ eliminateHole()

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

◆ eliminateHoles()

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

◆ equals()

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

◆ filterPoints()

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

◆ findHoleBridge()

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

◆ getLeftmost()

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

◆ indexCurve()

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

◆ 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

◆ intersects()

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

◆ intersectsPolygon()

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

◆ isEar()

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

◆ isEarHashed()

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

◆ isValidDiagonal()

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

◆ linkedList()

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

◆ locallyInside()

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

◆ middleInside()

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

◆ onSegment()

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

◆ operator()()

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

◆ 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

◆ removeNode()

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

◆ sectorContainsSector()

template<typename N >
bool mapbox::detail::Earcut< N >::sectorContainsSector ( const Node m,
const Node p 
)
private

◆ sign()

template<typename N >
int mapbox::detail::Earcut< N >::sign ( double  val)
private

◆ sortLinked()

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

◆ splitEarcut()

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

◆ splitPolygon()

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

◆ zOrder()

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

Member Data Documentation

◆ hashing

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

◆ indices

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

◆ inv_size

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

◆ maxX

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

◆ maxY

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

◆ minX

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

◆ minY

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

◆ nodes

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

◆ vertices

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

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