21 #include <navgraph/constraints/polygon_edge_constraint.h>
58 if (!polygons_.empty()) {
69 for (
auto p : polygons_) {
70 Point from_p(from.x(), from.y());
71 Point to_p(to.x(), to.y());
72 if (on_poly(from_p, to_p, p.second)) {
Constraint that can be queried to check if an edge is blocked.
Constraint that blocks nodes within and edges touching a polygon.
std::vector< Point > Polygon
A vector of points makes a polygon.
virtual bool blocks(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to) noexcept
Check if constraint blocks an edge.
virtual ~NavGraphPolygonEdgeConstraint()
Virtual empty destructor.
virtual bool compute(void) noexcept
Perform compuations before graph search and to indicate re-planning.
NavGraphPolygonEdgeConstraint(const std::string &name)
Constructor.
Fawkes library namespace.
Simple point representation for polygon.