00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_GEOMGRAPH_INDEX_MONOTONECHAINEDGE_H
00017 #define GEOS_GEOMGRAPH_INDEX_MONOTONECHAINEDGE_H
00018
00019 #include <geos/export.h>
00020 #include <geos/geom/Envelope.h>
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 geom {
00030 class CoordinateSequence;
00031 }
00032 namespace geomgraph {
00033 class Edge;
00034 namespace index {
00035 class SegmentIntersector;
00036 }
00037 }
00038 }
00039
00040 namespace geos {
00041 namespace geomgraph {
00042 namespace index {
00043
00044 class GEOS_DLL MonotoneChainEdge {
00045 public:
00046
00047 ~MonotoneChainEdge();
00048 MonotoneChainEdge(Edge *newE);
00049 const geom::CoordinateSequence* getCoordinates();
00050 std::vector<int>& getStartIndexes();
00051 double getMinX(int chainIndex);
00052 double getMaxX(int chainIndex);
00053
00054 void computeIntersects(const MonotoneChainEdge &mce,
00055 SegmentIntersector &si);
00056
00057 void computeIntersectsForChain(int chainIndex0,
00058 const MonotoneChainEdge &mce, int chainIndex1,
00059 SegmentIntersector &si);
00060
00061 protected:
00062 Edge *e;
00063 const geom::CoordinateSequence* pts;
00064
00065
00066 std::vector<int> startIndex;
00067
00068 geom::Envelope env1;
00069 geom::Envelope env2;
00070 private:
00071 void computeIntersectsForChain(int start0, int end0,
00072 const MonotoneChainEdge &mce,
00073 int start1, int end1,
00074 SegmentIntersector &ei);
00075 };
00076
00077 }
00078 }
00079 }
00080
00081 #ifdef _MSC_VER
00082 #pragma warning(pop)
00083 #endif
00084
00085 #endif
00086