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
00021 #include <geos/export.h>
00022 #include <geos/geom/Envelope.h>
00023
00024
00025 namespace geos {
00026 namespace geom {
00027 class CoordinateSequence;
00028 }
00029 namespace geomgraph {
00030 class Edge;
00031 namespace index {
00032 class SegmentIntersector;
00033 }
00034 }
00035 }
00036
00037 namespace geos {
00038 namespace geomgraph {
00039 namespace index {
00040
00041 class GEOS_DLL MonotoneChainEdge {
00042 public:
00043
00044 ~MonotoneChainEdge();
00045 MonotoneChainEdge(Edge *newE);
00046 const geom::CoordinateSequence* getCoordinates();
00047 std::vector<int>& getStartIndexes();
00048 double getMinX(int chainIndex);
00049 double getMaxX(int chainIndex);
00050
00051 void computeIntersects(const MonotoneChainEdge &mce,
00052 SegmentIntersector &si);
00053
00054 void computeIntersectsForChain(int chainIndex0,
00055 const MonotoneChainEdge &mce, int chainIndex1,
00056 SegmentIntersector &si);
00057
00058 protected:
00059 Edge *e;
00060 const geom::CoordinateSequence* pts;
00061
00062
00063 std::vector<int> startIndex;
00064
00065 geom::Envelope env1;
00066 geom::Envelope env2;
00067 private:
00068 void computeIntersectsForChain(int start0, int end0,
00069 const MonotoneChainEdge &mce,
00070 int start1, int end1,
00071 SegmentIntersector &ei);
00072 };
00073
00074
00075
00076 }
00077 }
00078 }
00079
00080 #endif
00081
00082
00083
00084
00085
00086
00087
00088