21 #ifndef __NAVGRAPH_CONSTRAINTS_POLYGON_CONSTRAINT_H_ 22 #define __NAVGRAPH_CONSTRAINTS_POLYGON_CONSTRAINT_H_ 24 #include <navgraph/constraints/static_list_node_constraint.h> 25 #include <navgraph/constraints/static_list_edge_constraint.h> 30 #include <navgraph/navgraph.h> 68 bool in_poly(
const Point &point,
const Polygon &polygon);
75 unsigned int cur_polygon_handle_;
PolygonMap polygons_
currently registered polygons
PolygonHandle add_polygon(const Polygon &polygon)
Add a polygon to constraint list.
virtual ~NavGraphPolygonConstraint()
Virtual empty destructor.
float x
X coordinate of point.
Simple point representation for polygon.
Fawkes library namespace.
struct fawkes::NavGraphPolygonConstraint::Point_ Point
Simple point representation for polygon.
void remove_polygon(const PolygonHandle &handle)
Remove a polygon from the constraint list.
std::map< PolygonHandle, Polygon > PolygonMap
Map for accessing all polygons at once with their handles.
float y
Y coordinate of point.
NavGraphPolygonConstraint()
Constructor.
Constraint that blocks nodes within and edges touching a polygon.
bool on_poly(const Point &p1, const Point &p2, const Polygon &polygon)
Check if a line segments lies on a given polygon.
unsigned int PolygonHandle
Handle for polygon for selective removal.
std::vector< Point > Polygon
A vector of points makes a polygon.
void clear_polygons()
Remove all polygons.
bool in_poly(const Point &point, const Polygon &polygon)
Check if given point lies inside the polygon.
const PolygonMap & polygons() const
Get reference to the map of polygons.
Point_(float x, float y)
Constructor.