KiCad PCB EDA Suite
|
Public Member Functions | |
VERTEX_CONNECTOR (const BOX2I &aBBox, const SHAPE_POLY_SET &aPolys, int aDist) | |
VERTEX * | getPoint (VERTEX *aPt) const |
void | FindResults () |
std::set< RESULTS > | GetResults () const |
Protected Member Functions | |
void | SetBoundingBox (const BOX2I &aBBox) |
VERTEX * | insertVertex (int aIndex, const VECTOR2I &pt, VERTEX *last, void *aUserData=nullptr) |
Insert a vertex into the vertex set. | |
VERTEX * | createList (const SHAPE_LINE_CHAIN &points, VERTEX *aTail=nullptr, void *aUserData=nullptr) |
Create a list of vertices from a line chain. | |
VERTEX * | getNextOutlineVertex (const VERTEX *aPt) const |
Get the next vertex in the outline, avoiding steiner points and points that overlap with splits. | |
VERTEX * | getPrevOutlineVertex (const VERTEX *aPt) const |
Get the previous vertex in the outline, avoiding steiner points and points that overlap with splits. | |
bool | locallyInside (const VERTEX *a, const VERTEX *b) const |
Check whether the segment from vertex a -> vertex b is inside the polygon around the immediate area of vertex a. | |
bool | middleInside (const VERTEX *a, const VERTEX *b) const |
Check if the middle of the segment from a to b is inside the polygon. | |
bool | same_point (const VERTEX *aA, const VERTEX *aB) const |
Check if two vertices are at the same point. | |
uint32_t | zOrder (const double aX, const double aY) const |
Note that while the inputs are doubles, these are scaled by the size of the bounding box to fit into a 32-bit Morton code. | |
double | area (const VERTEX *p, const VERTEX *q, const VERTEX *r) const |
Return the twice the signed area of the triangle formed by vertices p, q, and r. | |
Protected Attributes | |
BOX2I | m_bbox |
std::deque< VERTEX > | m_vertices |
VECTOR2I::extended_type | m_simplificationLevel |
Private Attributes | |
std::set< RESULTS > | m_results |
int | m_dist |
Definition at line 81 of file zone_filler.cpp.
|
inline |
Definition at line 84 of file zone_filler.cpp.
References VERTEX_SET::createList(), m_dist, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), VERTEX_SET::SetBoundingBox(), and VERTEX::updateList().
|
protectedinherited |
Return the twice the signed area of the triangle formed by vertices p, q, and r.
Definition at line 86 of file vertex_set.cpp.
References VERTEX::x, and VERTEX::y.
Referenced by POLYGON_TRIANGULATION::earcutList(), POLYGON_TRIANGULATION::goodSplit(), POLYGON_TRIANGULATION::intersects(), VERTEX::isEar(), VERTEX_SET::locallyInside(), POLYGON_TRIANGULATION::removeNullTriangles(), and POLYGON_TRIANGULATION::splitPolygon().
|
inherited |
Create a list of vertices from a line chain.
Take a SHAPE_LINE_CHAIN and links each point into a circular, doubly-linked list.
points | the line chain to create the list from |
aTail | the optional vertex to which to append the list |
aUserData | user data to associate with the vertices |
Definition at line 9 of file vertex_set.cpp.
References SHAPE_LINE_CHAIN::CPoint(), VERTEX_SET::insertVertex(), VERTEX_SET::m_simplificationLevel, VERTEX::next, SHAPE_LINE_CHAIN::PointCount(), VERTEX::remove(), VECTOR2< T >::SquaredEuclideanNorm(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by POLYGON_TEST::FindPairs(), POLYGON_TRIANGULATION::TesselatePolygon(), and VERTEX_CONNECTOR().
|
inline |
Definition at line 139 of file zone_filler.cpp.
References getPoint(), VERTEX::GetUserData(), VERTEX::i, VERTEX::isEar(), m_results, VERTEX_SET::m_vertices, VERTEX::next, and VERTEX::prev.
Referenced by ZONE_FILLER::connect_nearby_polys().
Get the next vertex in the outline, avoiding steiner points and points that overlap with splits.
aPt | the current vertex |
Definition at line 97 of file vertex_set.cpp.
References VERTEX::next, VERTEX::nextZ, VERTEX::prev, VERTEX::prevZ, VERTEX_SET::same_point(), and VERTEX::y.
Referenced by POLYGON_TEST::isSubstantial(), and VERTEX_SET::locallyInside().
Definition at line 97 of file zone_filler.cpp.
References m_dist, VERTEX::nextZ, VERTEX::prevZ, SEG::Square(), VECTOR2< T >::SquaredEuclideanNorm(), VERTEX::x, VERTEX::y, VERTEX::z, and VERTEX_SET::zOrder().
Referenced by FindResults().
Get the previous vertex in the outline, avoiding steiner points and points that overlap with splits.
aPt | the current vertex |
Definition at line 124 of file vertex_set.cpp.
References VERTEX::nextZ, VERTEX::prev, VERTEX::prevZ, VERTEX_SET::same_point(), and VERTEX::y.
Referenced by POLYGON_TEST::isSubstantial(), and VERTEX_SET::locallyInside().
|
inline |
Definition at line 186 of file zone_filler.cpp.
References m_results.
Referenced by ZONE_FILLER::connect_nearby_polys().
|
inherited |
Insert a vertex into the vertex set.
Create an entry in the vertices lookup and optionally inserts the newly created vertex into an existing linked list.
aIndex | the index of the vertex |
pt | the point to insert |
last | the last vertex in the list |
aUserData | user data to associate with the vertex |
Definition at line 190 of file vertex_set.cpp.
References VERTEX_SET::m_vertices, VERTEX::next, VERTEX::prev, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by VERTEX_SET::createList(), POLYGON_TRIANGULATION::insertTriVertex(), and VERTEX::split().
Check 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.
Definition at line 153 of file vertex_set.cpp.
References VERTEX_SET::area(), VERTEX_SET::getNextOutlineVertex(), and VERTEX_SET::getPrevOutlineVertex().
Referenced by POLYGON_TRIANGULATION::earcutList(), POLYGON_TEST::getKink(), and POLYGON_TRIANGULATION::goodSplit().
Check if the middle of the segment from a to b is inside the polygon.
a | the first vertex |
b | the second vertex |
Definition at line 165 of file vertex_set.cpp.
References VERTEX::next, VERTEX::x, and VERTEX::y.
Referenced by POLYGON_TRIANGULATION::goodSplit().
Check if two vertices are at the same point.
aA | the first vertex |
aB | the second vertex |
Definition at line 92 of file vertex_set.cpp.
References VERTEX::x, and VERTEX::y.
Referenced by VERTEX_SET::getNextOutlineVertex(), VERTEX_SET::getPrevOutlineVertex(), and POLYGON_TEST::isSubstantial().
|
inherited |
Definition at line 3 of file vertex_set.cpp.
References VERTEX_SET::m_bbox.
Referenced by VERTEX_CONNECTOR().
|
protectedinherited |
Note that while the inputs are doubles, these are scaled by the size of the bounding box to fit into a 32-bit Morton code.
Calculate the Morton code of the VERTEX http://www.graphics.stanford.edu/~seander/bithacks.html#InterleaveBMN.
Definition at line 61 of file vertex_set.cpp.
References BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), BOX2< Vec >::GetX(), BOX2< Vec >::GetY(), and VERTEX_SET::m_bbox.
Referenced by POLYGON_TEST::getKink(), getPoint(), VERTEX::isEar(), and VERTEX::updateOrder().
|
protectedinherited |
Definition at line 342 of file vertex_set.h.
Referenced by POLYGON_TEST::FindPairs(), VERTEX_SET::SetBoundingBox(), POLYGON_TRIANGULATION::TesselatePolygon(), and VERTEX_SET::zOrder().
|
private |
Definition at line 193 of file zone_filler.cpp.
Referenced by getPoint(), and VERTEX_CONNECTOR().
|
private |
Definition at line 192 of file zone_filler.cpp.
Referenced by FindResults(), and GetResults().
|
protectedinherited |
Definition at line 344 of file vertex_set.h.
Referenced by VERTEX_SET::createList(), and VERTEX_SET::VERTEX_SET().
|
protectedinherited |
Definition at line 343 of file vertex_set.h.
Referenced by POLYGON_TEST::FindPairs(), FindResults(), VERTEX_SET::insertVertex(), POLYGON_TRIANGULATION::intersectsPolygon(), POLYGON_TEST::isSubstantial(), POLYGON_TRIANGULATION::logRemaining(), VERTEX::split(), and POLYGON_TRIANGULATION::TesselatePolygon().