GEOS
3.9.1dev
|
Finds all intersections in one or two sets of edges, using a simple x-axis sweepline algorithm. More...
#include <SimpleSweepLineIntersector.h>
Public Member Functions | |
SimpleSweepLineIntersector () | |
~SimpleSweepLineIntersector () override | |
void | computeIntersections (std::vector< Edge * > *edges, SegmentIntersector *si, bool testAllSegments) override |
Computes all self-intersections between edges in a set of edges, allowing client to choose whether self-intersections are computed. More... | |
void | computeIntersections (std::vector< Edge * > *edges0, std::vector< Edge * > *edges1, SegmentIntersector *si) override |
Computes all mutual intersections between two sets of edges. More... | |
![]() | |
virtual | ~EdgeSetIntersector () |
Private Member Functions | |
void | add (std::vector< Edge * > *edges) |
void | add (std::vector< Edge * > *edges, void *edgeSet) |
void | add (Edge *edge, void *edgeSet) |
void | prepareEvents () |
void | computeIntersections (SegmentIntersector *si) |
void | processOverlaps (size_t start, size_t end, SweepLineEvent *ev0, SegmentIntersector *si) |
Private Attributes | |
std::vector< SweepLineEvent * > | events |
int | nOverlaps |
Finds all intersections in one or two sets of edges, using a simple x-axis sweepline algorithm.
While still O(n^2) in the worst case, this algorithm drastically improves the average-case time.
Definition at line 51 of file SimpleSweepLineIntersector.h.
geos::geomgraph::index::SimpleSweepLineIntersector::SimpleSweepLineIntersector | ( | ) |
|
override |
|
private |
|
private |
|
private |
|
overridevirtual |
Computes all self-intersections between edges in a set of edges, allowing client to choose whether self-intersections are computed.
edges | a list of edges to test for intersections |
si | the SegmentIntersector to use |
testAllSegments | true if self-intersections are to be tested as well |
Implements geos::geomgraph::index::EdgeSetIntersector.
|
overridevirtual |
Computes all mutual intersections between two sets of edges.
Implements geos::geomgraph::index::EdgeSetIntersector.
|
private |
|
private |
|
private |
|
private |
Definition at line 71 of file SimpleSweepLineIntersector.h.
|
private |
Definition at line 74 of file SimpleSweepLineIntersector.h.