A part of a PolygonEntity exterior ring, that may be share between to adjacent PolygonEntity. More...
#include <landr/PolygonEdge.hpp>
Public Member Functions | |
PolygonEdge (geos::geom::LineString &Line) | |
~PolygonEdge () | |
geos::geom::LineString * | getLine () |
Returns the geos::geom::LineString representing this PolygonEdge. | |
void | addFace (PolygonEntity &NewFace) |
Add a PolygonEntity as a Face to this PolygonEdge. | |
bool | isLineInFace (PolygonEntity &Face) |
Returns true if this PolygonEdge is in the boundary of the input PolygonEntity. | |
const std::vector < PolygonEntity * > | getFaces () |
Returns a vector of PolygonEntity which represent the Faces of this PolygonEdge. | |
void | removeFace (PolygonEntity *Face) |
Removes a Face from the Faces of this PolygonEdge. | |
bool | getAttributeValue (const std::string &AttributeName, core::Value &Value) const |
Gets the value of an attribute of this PolygonEdge. | |
bool | setAttributeValue (const std::string &AttributeName, const core::Value *Value) |
Sets the value of an attribute of this PolygonEdge. | |
void | removeAttribute (const std::string &AttributeName) |
Removes an attribute of this PolygonEdge. | |
bool | isCoincident (PolygonEdge *Edge) |
Returns true if this PolygonEdge is coincident with an other PolygonEdge. | |
Public Attributes | |
std::map< std::string, core::Value * > | m_EdgeAttributes |
Map of Attributes which are carried by this PolygonEdge. |
A part of a PolygonEntity exterior ring, that may be share between to adjacent PolygonEntity.
A PolygonEdge has one or two Faces. The Faces are the PolygonEntity that share this PolygonEdge.
openfluid::landr::PolygonEdge::PolygonEdge | ( | geos::geom::LineString & | Line | ) |
void openfluid::landr::PolygonEdge::addFace | ( | PolygonEntity & | NewFace | ) |
Add a PolygonEntity as a Face to this PolygonEdge.
NewFace | A PolygonEntity. |
base::OFException | if this PolygonEdge is not in the boundary of the input PolygonEntity, or if this PolygonEdge has already two Faces. |
bool openfluid::landr::PolygonEdge::getAttributeValue | ( | const std::string & | AttributeName, |
core::Value & | Value | ||
) | const |
Gets the value of an attribute of this PolygonEdge.
AttributeName | The name of the attribute to get. |
Value | The core::Value to assign the attribute value. |
const std::vector<PolygonEntity*> openfluid::landr::PolygonEdge::getFaces | ( | ) |
Returns a vector of PolygonEntity which represent the Faces of this PolygonEdge.
geos::geom::LineString* openfluid::landr::PolygonEdge::getLine | ( | ) |
Returns the geos::geom::LineString representing this PolygonEdge.
bool openfluid::landr::PolygonEdge::isCoincident | ( | PolygonEdge * | Edge | ) |
Returns true if this PolygonEdge is coincident with an other PolygonEdge.
Edge | The PolygonEdge to test the coincidence. |
bool openfluid::landr::PolygonEdge::isLineInFace | ( | PolygonEntity & | Face | ) |
Returns true if this PolygonEdge is in the boundary of the input PolygonEntity.
Face | A PolygonEntity. |
void openfluid::landr::PolygonEdge::removeAttribute | ( | const std::string & | AttributeName | ) |
Removes an attribute of this PolygonEdge.
AttributeName | The name of the attribute to set. |
void openfluid::landr::PolygonEdge::removeFace | ( | PolygonEntity * | Face | ) |
Removes a Face from the Faces of this PolygonEdge.
Does nothing if the input Face is not a part of this PolygonEdge Faces.
Face | A PolygonEntity. |
bool openfluid::landr::PolygonEdge::setAttributeValue | ( | const std::string & | AttributeName, |
const core::Value * | Value | ||
) |
Sets the value of an attribute of this PolygonEdge.
Takes the ownership of Value.
AttributeName | The name of the attribute to set. |
Value | The core::Value assign to the attribute value. |
std::map<std::string, core::Value*> openfluid::landr::PolygonEdge::m_EdgeAttributes |
Map of Attributes which are carried by this PolygonEdge.