00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
00018 #define GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
00019
00020 #include <geos/export.h>
00021 #include <vector>
00022
00023 #include <geos/geomgraph/index/EdgeSetIntersector.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 class SegmentIntersector;
00036 class SweepLineEvent;
00037 }
00038 }
00039 }
00040
00041 namespace geos {
00042 namespace geomgraph {
00043 namespace index {
00044
00052 class GEOS_DLL SimpleSweepLineIntersector: public EdgeSetIntersector {
00053
00054 public:
00055
00056 SimpleSweepLineIntersector();
00057
00058 virtual ~SimpleSweepLineIntersector();
00059
00060 void computeIntersections(std::vector<Edge*> *edges,
00061 SegmentIntersector *si,
00062 bool testAllSegments);
00063
00064 void computeIntersections(std::vector<Edge*> *edges0,
00065 std::vector<Edge*> *edges1,
00066 SegmentIntersector *si);
00067
00068 private:
00069
00070 void add(std::vector<Edge*> *edges);
00071
00072 std::vector<SweepLineEvent*> events;
00073
00074
00075 int nOverlaps;
00076
00077 void add(std::vector<Edge*> *edges, void* edgeSet);
00078
00079 void add(Edge *edge,void* edgeSet);
00080
00081 void prepareEvents();
00082
00083 void computeIntersections(SegmentIntersector *si);
00084
00085 void processOverlaps(int start, int end, SweepLineEvent *ev0,
00086 SegmentIntersector *si);
00087 };
00088
00089 }
00090 }
00091 }
00092
00093 #ifdef _MSC_VER
00094 #pragma warning(pop)
00095 #endif
00096
00097 #endif // GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
00098
00099
00100
00101
00102
00103
00104
00105