RightmostEdgeFinder.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/buffer/RightmostEdgeFinder.java r320 (JTS-1.12)
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/geom/Coordinate.h> // for composition
#include <vector>
// Forward declarations
namespace geos {
namespace geom {
}
namespace geomgraph {
class DirectedEdge;
}
}
namespace geos {
namespace operation { // geos.operation
namespace buffer { // geos.operation.buffer
class GEOS_DLL RightmostEdgeFinder {
private:
int minIndex;
geom::Coordinate minCoord;
geomgraph::DirectedEdge* minDe;
geomgraph::DirectedEdge* orientedDe;
void findRightmostEdgeAtNode();
void findRightmostEdgeAtVertex();
void checkForRightmostCoordinate(geomgraph::DirectedEdge* de);
int getRightmostSide(geomgraph::DirectedEdge* de, int index);
static int getRightmostSideOfSegment(geomgraph::DirectedEdge* de, int i);
public:
RightmostEdgeFinder();
geomgraph::DirectedEdge* getEdge();
geom::Coordinate& getCoordinate();
void findEdge(std::vector<geomgraph::DirectedEdge*>* dirEdgeList);
};
/*public*/
inline geomgraph::DirectedEdge*
RightmostEdgeFinder::getEdge()
{
return orientedDe;
}
/*public*/
inline geom::Coordinate&
RightmostEdgeFinder::getCoordinate()
{
return minCoord;
}
} // namespace geos::operation::buffer
} // namespace geos::operation
} // namespace geos
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::geomgraph::DirectedEdge
A directed EdgeEnd.
Definition geomgraph/DirectedEdge.h:42
geos::operation::buffer::RightmostEdgeFinder::findEdge
void findEdge(std::vector< geomgraph::DirectedEdge * > *dirEdgeList)
Note that only Forward DirectedEdges will be checked.
geos::operation::buffer::RightmostEdgeFinder::RightmostEdgeFinder
RightmostEdgeFinder()
A RightmostEdgeFinder finds the geomgraph::DirectedEdge with the rightmost coordinate.
geos::geom
Definition Angle.h:26
geos::geomgraph
Contains classes that implement topology graphs.
Definition Depth.h:31
geos::index
Provides classes for various kinds of spatial indexes.
Definition CleanCoverage.h:39
geos::operation::buffer
Provides classes for computing buffers of geometries.
Definition namespaces.h:182
geos::operation
Provides classes for implementing operations on geometries.
Definition CleanCoverage.h:34
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38