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/geom/Coordinate.h>
00024
00025 #include <vector>
00026
00027
00028 namespace geos {
00029 namespace geom {
00030 }
00031 namespace geomgraph {
00032 class DirectedEdge;
00033 }
00034 }
00035
00036 namespace geos {
00037 namespace operation {
00038 namespace buffer {
00039
00046 class RightmostEdgeFinder {
00047
00048 private:
00049
00050 int minIndex;
00051
00052 geom::Coordinate minCoord;
00053
00054 geomgraph::DirectedEdge *minDe;
00055
00056 geomgraph::DirectedEdge *orientedDe;
00057
00058 void findRightmostEdgeAtNode();
00059
00060 void findRightmostEdgeAtVertex();
00061
00062 void checkForRightmostCoordinate(geomgraph::DirectedEdge *de);
00063
00064 int getRightmostSide(geomgraph::DirectedEdge *de, int index);
00065
00066 int getRightmostSideOfSegment(geomgraph::DirectedEdge *de, int i);
00067
00068 public:
00069
00077 RightmostEdgeFinder();
00078
00079 geomgraph::DirectedEdge* getEdge();
00080
00081 geom::Coordinate& getCoordinate();
00082
00084 void findEdge(std::vector<geomgraph::DirectedEdge*>* dirEdgeList);
00085 };
00086
00087
00088 inline geomgraph::DirectedEdge*
00089 RightmostEdgeFinder::getEdge()
00090 {
00091 return orientedDe;
00092 }
00093
00094
00095 inline geom::Coordinate&
00096 RightmostEdgeFinder::getCoordinate()
00097 {
00098 return minCoord;
00099 }
00100
00101
00102
00103
00104 }
00105 }
00106 }
00107
00108 #endif // ndef GEOS_OP_BUFFER_RIGHTMOSTEDGEFINDER_H
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123