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