17 #ifndef GEOS_GEOMGRAPH_INDEX_SEGMENTINTERSECTOR_H
18 #define GEOS_GEOMGRAPH_INDEX_SEGMENTINTERSECTOR_H
20 #include <geos/export.h>
23 #include <geos/geom/Coordinate.h>
27 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
33 class LineIntersector;
46 class GEOS_DLL SegmentIntersector{
54 bool hasIntersectionVar;
58 bool hasProperInterior;
61 geom::Coordinate properIntersectionPoint;
63 algorithm::LineIntersector *li;
76 std::vector<std::vector<Node*>*> bdyNodes;
78 bool isTrivialIntersection(Edge *e0,
int segIndex0,Edge *e1,
int segIndex1);
80 bool isBoundaryPoint(algorithm::LineIntersector *li,
81 std::vector<std::vector<Node*>*>& tstBdyNodes);
83 bool isBoundaryPoint(algorithm::LineIntersector *li,
84 std::vector<Node*> *tstBdyNodes);
88 static bool isAdjacentSegments(
int i1,
int i2);
95 virtual ~SegmentIntersector() {}
97 SegmentIntersector(algorithm::LineIntersector *newLi,
98 bool newIncludeProper,
bool newRecordIsolated)
100 hasIntersectionVar(false),
102 hasProperInterior(false),
104 includeProper(newIncludeProper),
105 recordIsolated(newRecordIsolated),
114 void setBoundaryNodes(std::vector<Node*> *bdyNodes0,
115 std::vector<Node*> *bdyNodes1);
117 geom::Coordinate& getProperIntersectionPoint();
119 bool hasIntersection();
121 bool hasProperIntersection();
123 bool hasProperInteriorIntersection();
125 void addIntersections(Edge *e0,
int segIndex0, Edge *e1,
int segIndex1);