00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
00018 #define GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
00019
00020 #include <vector>
00021
00022 #include <geos/geomgraph/index/EdgeSetIntersector.h>
00023
00024
00025 namespace geos {
00026 namespace geomgraph {
00027 class Edge;
00028 namespace index {
00029 class SegmentIntersector;
00030 class SweepLineEvent;
00031 }
00032 }
00033 }
00034
00035 namespace geos {
00036 namespace geomgraph {
00037 namespace index {
00038
00048 class SimpleMCSweepLineIntersector: public EdgeSetIntersector {
00049
00050 public:
00051
00052 SimpleMCSweepLineIntersector();
00053
00054 virtual ~SimpleMCSweepLineIntersector();
00055
00056 void computeIntersections(std::vector<Edge*> *edges,
00057 SegmentIntersector *si, bool testAllSegments);
00058
00059 void computeIntersections(std::vector<Edge*> *edges0,
00060 std::vector<Edge*> *edges1,
00061 SegmentIntersector *si);
00062
00063 protected:
00064
00065 std::vector<SweepLineEvent*> events;
00066
00067
00068 int nOverlaps;
00069
00070 private:
00071 void add(std::vector<Edge*> *edges);
00072
00073 void add(std::vector<Edge*> *edges,void* edgeSet);
00074
00075 void add(Edge *edge,void* edgeSet);
00076
00077 void prepareEvents();
00078
00079 void computeIntersections(SegmentIntersector *si);
00080
00081 void processOverlaps(int start, int end,
00082 SweepLineEvent *ev0,
00083 SegmentIntersector *si);
00084 };
00085
00086
00087
00088 }
00089 }
00090 }
00091
00092 #endif // GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
00093
00094
00095
00096
00097
00098
00099
00100