18#include <geos/export.h>
22#include <geos/geom/Coordinate.h>
26#pragma warning(disable: 4251)
46class GEOS_DLL SegmentIntersector {
54 bool hasIntersectionVar;
58 bool hasProperInterior;
72 std::array<std::vector<Node*>*, 2> bdyNodes;
74 bool isTrivialIntersection(
Edge* e0, std::size_t segIndex0,
Edge* e1, std::size_t segIndex1);
77 std::array<std::vector<Node*>*, 2>& tstBdyNodes)
79 return isBoundaryPoint(p_li, tstBdyNodes[0]) || isBoundaryPoint(p_li, tstBdyNodes[1]);
83 std::vector<Node*>* tstBdyNodes);
87 static bool isAdjacentSegments(std::size_t i1,
size_t i2)
89 return (i1 > i2 ? i1 - i2 : i2 - i1) == 1;
98 ~SegmentIntersector() {}
101 bool newIncludeProper,
bool newRecordIsolated)
103 hasIntersectionVar(
false),
105 hasProperInterior(
false),
107 includeProper(newIncludeProper),
108 recordIsolated(newRecordIsolated),
110 bdyNodes{{
nullptr,
nullptr}},
118 std::vector<Node*>* bdyNodes1)
120 bdyNodes[0] = bdyNodes0;
121 bdyNodes[1] = bdyNodes1;
130 return properIntersectionPoint;
133 bool hasIntersection()
const
135 return hasIntersectionVar;
156 return hasProperInterior;
159 void addIntersections(
Edge* e0, std::size_t segIndex0,
Edge* e1, std::size_t segIndex1);
161 bool getIsDone()
const
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:53
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
Definition geomgraph/Edge.h:63
The node component of a geometry graph.
Definition geomgraph/Node.h:59
bool hasProperInteriorIntersection() const
Definition geomgraph/index/SegmentIntersector.h:154
bool hasProperIntersection() const
Definition geomgraph/index/SegmentIntersector.h:145
void setBoundaryNodes(std::vector< Node * > *bdyNodes0, std::vector< Node * > *bdyNodes1)
Parameters are externally owned. Make sure they live for the whole lifetime of this object.
Definition geomgraph/index/SegmentIntersector.h:117
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:32
Contains classes that implement indexes for performing noding on geometry graph edges.
Definition geomgraph/Edge.h:53
Contains classes that implement topology graphs.
Definition Depth.h:31
Basic namespace for all GEOS functionalities.
Definition geos.h:39