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