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