00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_OP_BUFFER_RIGHTMOSTEDGEFINDER_H
00021 #define GEOS_OP_BUFFER_RIGHTMOSTEDGEFINDER_H
00022
00023 #include <geos/export.h>
00024
00025 #include <geos/geom/Coordinate.h>
00026
00027 #include <vector>
00028
00029
00030 namespace geos {
00031 namespace geom {
00032 }
00033 namespace geomgraph {
00034 class DirectedEdge;
00035 }
00036 }
00037
00038 namespace geos {
00039 namespace operation {
00040 namespace buffer {
00041
00048 class GEOS_DLL RightmostEdgeFinder {
00049
00050 private:
00051
00052 int minIndex;
00053
00054 geom::Coordinate minCoord;
00055
00056 geomgraph::DirectedEdge *minDe;
00057
00058 geomgraph::DirectedEdge *orientedDe;
00059
00060 void findRightmostEdgeAtNode();
00061
00062 void findRightmostEdgeAtVertex();
00063
00064 void checkForRightmostCoordinate(geomgraph::DirectedEdge *de);
00065
00066 int getRightmostSide(geomgraph::DirectedEdge *de, int index);
00067
00068 int getRightmostSideOfSegment(geomgraph::DirectedEdge *de, int i);
00069
00070 public:
00071
00079 RightmostEdgeFinder();
00080
00081 geomgraph::DirectedEdge* getEdge();
00082
00083 geom::Coordinate& getCoordinate();
00084
00086 void findEdge(std::vector<geomgraph::DirectedEdge*>* dirEdgeList);
00087 };
00088
00089
00090 inline geomgraph::DirectedEdge*
00091 RightmostEdgeFinder::getEdge()
00092 {
00093 return orientedDe;
00094 }
00095
00096
00097 inline geom::Coordinate&
00098 RightmostEdgeFinder::getCoordinate()
00099 {
00100 return minCoord;
00101 }
00102
00103
00104
00105
00106 }
00107 }
00108 }
00109
00110 #endif // ndef GEOS_OP_BUFFER_RIGHTMOSTEDGEFINDER_H
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125