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