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