00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00017 #define GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00018
00019 #include <vector>
00020
00021
00022 namespace geos {
00023 namespace index {
00024 namespace sweepline {
00025 class SweepLineInterval;
00026 class SweepLineEvent;
00027 class SweepLineOverlapAction;
00028 }
00029 }
00030 }
00031
00032 namespace geos {
00033 namespace index {
00034 namespace sweepline {
00035
00041 class SweepLineIndex {
00042
00043 public:
00044
00045 SweepLineIndex();
00046
00047 ~SweepLineIndex();
00048
00049 void add(SweepLineInterval *sweepInt);
00050
00051 void computeOverlaps(SweepLineOverlapAction *action);
00052
00053 private:
00054
00055
00056 std::vector<SweepLineEvent*> events;
00057
00058 bool indexBuilt;
00059
00060
00061 int nOverlaps;
00062
00068 void buildIndex();
00069
00070 void processOverlaps(int start, int end,
00071 SweepLineInterval *s0,
00072 SweepLineOverlapAction *action);
00073 };
00074
00075
00076 }
00077 }
00078 }
00079
00080 #endif // GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00081
00082
00083
00084
00085
00086
00087
00088