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
00026 namespace geos {
00027 namespace geomgraph {
00028 class Edge;
00029 namespace index {
00030 class SegmentIntersector;
00031 class SweepLineEvent;
00032 }
00033 }
00034 }
00035
00036 namespace geos {
00037 namespace geomgraph {
00038 namespace index {
00039
00047 class GEOS_DLL SimpleSweepLineIntersector: public EdgeSetIntersector {
00048
00049 public:
00050
00051 SimpleSweepLineIntersector();
00052
00053 virtual ~SimpleSweepLineIntersector();
00054
00055 void computeIntersections(std::vector<Edge*> *edges,
00056 SegmentIntersector *si,
00057 bool testAllSegments);
00058
00059 void computeIntersections(std::vector<Edge*> *edges0,
00060 std::vector<Edge*> *edges1,
00061 SegmentIntersector *si);
00062
00063 private:
00064
00065 void add(std::vector<Edge*> *edges);
00066
00067 std::vector<SweepLineEvent*> events;
00068
00069
00070 int nOverlaps;
00071
00072 void add(std::vector<Edge*> *edges, void* edgeSet);
00073
00074 void add(Edge *edge,void* edgeSet);
00075
00076 void prepareEvents();
00077
00078 void computeIntersections(SegmentIntersector *si);
00079
00080 void processOverlaps(int start, int end, SweepLineEvent *ev0,
00081 SegmentIntersector *si);
00082 };
00083
00084
00085
00086
00087 }
00088 }
00089 }
00090
00091 #endif // GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
00092
00093
00094
00095
00096
00097
00098
00099