Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
mapbox::detail::Earcut< N > Class Template Reference

#include <earcut.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

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 23 of file earcut.hpp.

Member Function Documentation

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

Definition at line 657 of file earcut.hpp.

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

Definition at line 368 of file earcut.hpp.

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

Definition at line 250 of file earcut.hpp.

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

Definition at line 448 of file earcut.hpp.

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

Definition at line 422 of file earcut.hpp.

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

Definition at line 663 of file earcut.hpp.

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

Definition at line 225 of file earcut.hpp.

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

Definition at line 459 of file earcut.hpp.

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

Definition at line 628 of file earcut.hpp.

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

Definition at line 519 of file earcut.hpp.

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 743 of file earcut.hpp.

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 669 of file earcut.hpp.

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

Definition at line 678 of file earcut.hpp.

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

Definition at line 305 of file earcut.hpp.

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

Definition at line 325 of file earcut.hpp.

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

Definition at line 650 of file earcut.hpp.

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

Definition at line 187 of file earcut.hpp.

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

Definition at line 691 of file earcut.hpp.

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

Definition at line 699 of file earcut.hpp.

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

Definition at line 132 of file earcut.hpp.

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 642 of file earcut.hpp.

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

Definition at line 761 of file earcut.hpp.

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

Definition at line 540 of file earcut.hpp.

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

Definition at line 394 of file earcut.hpp.

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

Definition at line 719 of file earcut.hpp.

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

Definition at line 607 of file earcut.hpp.

Member Data Documentation

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

Definition at line 84 of file earcut.hpp.

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

Definition at line 25 of file earcut.hpp.

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

Definition at line 87 of file earcut.hpp.

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

Definition at line 85 of file earcut.hpp.

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

Definition at line 86 of file earcut.hpp.

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

Definition at line 85 of file earcut.hpp.

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

Definition at line 86 of file earcut.hpp.

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

Definition at line 128 of file earcut.hpp.

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

Definition at line 26 of file earcut.hpp.


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


nav_2d_utils
Author(s):
autogenerated on Sun Jan 10 2021 04:08:32