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 <geos/export.h>
00020
00021 #include <vector>
00022
00023 #ifdef _MSC_VER
00024 #pragma warning(push)
00025 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00026 #endif
00027
00028
00029 namespace geos {
00030 namespace index {
00031 namespace sweepline {
00032 class SweepLineInterval;
00033 class SweepLineEvent;
00034 class SweepLineOverlapAction;
00035 }
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace index {
00041 namespace sweepline {
00042
00048 class GEOS_DLL SweepLineIndex {
00049
00050 public:
00051
00052 SweepLineIndex();
00053
00054 ~SweepLineIndex();
00055
00056 void add(SweepLineInterval *sweepInt);
00057
00058 void computeOverlaps(SweepLineOverlapAction *action);
00059
00060 private:
00061
00062
00063 std::vector<SweepLineEvent*> events;
00064
00065 bool indexBuilt;
00066
00067
00068 int nOverlaps;
00069
00075 void buildIndex();
00076
00077 void processOverlaps(int start, int end,
00078 SweepLineInterval *s0,
00079 SweepLineOverlapAction *action);
00080 };
00081
00082 }
00083 }
00084 }
00085
00086 #ifdef _MSC_VER
00087 #pragma warning(pop)
00088 #endif
00089
00090 #endif // GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00091
00092
00093
00094
00095
00096
00097
00098