16 #ifndef GEOS_GEOMGRAPH_INDEX_SEGMENTINTERSECTOR_H
17 #define GEOS_GEOMGRAPH_INDEX_SEGMENTINTERSECTOR_H
19 #include <geos/export.h>
22 #include <geos/geom/Coordinate.h>
26 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
32 class LineIntersector;
45 class GEOS_DLL SegmentIntersector{
53 bool hasIntersectionVar;
57 bool hasProperInterior;
60 geom::Coordinate properIntersectionPoint;
62 algorithm::LineIntersector *li;
75 std::vector<std::vector<Node*>*> bdyNodes;
77 bool isTrivialIntersection(Edge *e0,
int segIndex0,Edge *e1,
int segIndex1);
79 bool isBoundaryPoint(algorithm::LineIntersector *li,
80 std::vector<std::vector<Node*>*>& tstBdyNodes);
82 bool isBoundaryPoint(algorithm::LineIntersector *li,
83 std::vector<Node*> *tstBdyNodes);
87 static bool isAdjacentSegments(
int i1,
int i2);
94 virtual ~SegmentIntersector() {}
96 SegmentIntersector(algorithm::LineIntersector *newLi,
97 bool newIncludeProper,
bool newRecordIsolated)
99 hasIntersectionVar(false),
101 hasProperInterior(false),
103 includeProper(newIncludeProper),
104 recordIsolated(newRecordIsolated),
113 void setBoundaryNodes(std::vector<Node*> *bdyNodes0,
114 std::vector<Node*> *bdyNodes1);
116 geom::Coordinate& getProperIntersectionPoint();
118 bool hasIntersection();
120 bool hasProperIntersection();
122 bool hasProperInteriorIntersection();
124 void addIntersections(Edge *e0,
int segIndex0, Edge *e1,
int segIndex1);