00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00016 #define GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00017
00018 #include <geos/export.h>
00019
00020 #include <vector>
00021
00022 #ifdef _MSC_VER
00023 #pragma warning(push)
00024 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00025 #endif
00026
00027
00028 namespace geos {
00029 namespace index {
00030 namespace sweepline {
00031 class SweepLineInterval;
00032 class SweepLineEvent;
00033 class SweepLineOverlapAction;
00034 }
00035 }
00036 }
00037
00038 namespace geos {
00039 namespace index {
00040 namespace sweepline {
00041
00047 class GEOS_DLL SweepLineIndex {
00048
00049 public:
00050
00051 SweepLineIndex();
00052
00053 ~SweepLineIndex();
00054
00055 void add(SweepLineInterval *sweepInt);
00056
00057 void computeOverlaps(SweepLineOverlapAction *action);
00058
00059 private:
00060
00061
00062 std::vector<SweepLineEvent*> events;
00063
00064 bool indexBuilt;
00065
00066
00067 int nOverlaps;
00068
00074 void buildIndex();
00075
00076 void processOverlaps(int start, int end,
00077 SweepLineInterval *s0,
00078 SweepLineOverlapAction *action);
00079 };
00080
00081 }
00082 }
00083 }
00084
00085 #ifdef _MSC_VER
00086 #pragma warning(pop)
00087 #endif
00088
00089 #endif // GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H