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