|
Fawkes API
Fawkes Development Version
|
Constraint that blocks nodes within and edges touching a polygon. More...
#include <>>

Classes | |
| struct | Point_ |
| Simple point representation for polygon. More... | |
Public Types | |
| typedef struct fawkes::NavGraphPolygonConstraint::Point_ | Point |
| Simple point representation for polygon. More... | |
| typedef unsigned int | PolygonHandle |
| Handle for polygon for selective removal. More... | |
| typedef std::vector< Point > | Polygon |
| A vector of points makes a polygon. More... | |
| typedef std::map< PolygonHandle, Polygon > | PolygonMap |
| Map for accessing all polygons at once with their handles. More... | |
Public Member Functions | |
| virtual | ~NavGraphPolygonConstraint () |
| Virtual empty destructor. More... | |
| const PolygonMap & | polygons () const |
| Get reference to the map of polygons. More... | |
| PolygonHandle | add_polygon (const Polygon &polygon) |
| Add a polygon to constraint list. More... | |
| void | remove_polygon (const PolygonHandle &handle) |
| Remove a polygon from the constraint list. More... | |
| void | clear_polygons () |
| Remove all polygons. More... | |
Protected Member Functions | |
| NavGraphPolygonConstraint () | |
| Constructor. More... | |
| NavGraphPolygonConstraint (const Polygon &polygon) | |
| Constructor. More... | |
| bool | in_poly (const Point &point, const Polygon &polygon) |
| Check if given point lies inside the polygon. More... | |
| bool | on_poly (const Point &p1, const Point &p2, const Polygon &polygon) |
| Check if a line segments lies on a given polygon. More... | |
Protected Attributes | |
| PolygonMap | polygons_ |
| currently registered polygons More... | |
Constraint that blocks nodes within and edges touching a polygon.
Definition at line 33 of file polygon_constraint.h.
Simple point representation for polygon.
| typedef std::vector<Point> fawkes::NavGraphPolygonConstraint::Polygon |
A vector of points makes a polygon.
Definition at line 52 of file polygon_constraint.h.
| typedef unsigned int fawkes::NavGraphPolygonConstraint::PolygonHandle |
Handle for polygon for selective removal.
Definition at line 50 of file polygon_constraint.h.
| typedef std::map<PolygonHandle, Polygon> fawkes::NavGraphPolygonConstraint::PolygonMap |
Map for accessing all polygons at once with their handles.
Definition at line 54 of file polygon_constraint.h.
|
virtual |
Virtual empty destructor.
Definition at line 49 of file polygon_constraint.cpp.
|
protected |
Constructor.
Definition at line 34 of file polygon_constraint.cpp.
|
protected |
Constructor.
| polygon | polygon to add immediately |
Definition at line 42 of file polygon_constraint.cpp.
References add_polygon().
| NavGraphPolygonConstraint::PolygonHandle fawkes::NavGraphPolygonConstraint::add_polygon | ( | const Polygon & | polygon | ) |
Add a polygon to constraint list.
| polygon | Polygon to add to the list |
Definition at line 59 of file polygon_constraint.cpp.
References polygons_.
Referenced by NavGraphStaticConstraintsThread::init(), and NavGraphPolygonConstraint().
| void fawkes::NavGraphPolygonConstraint::clear_polygons | ( | ) |
|
protected |
Check if given point lies inside the polygon.
The point and polygon are assumed to be in the same X-Y plane. Code based on http://www.visibone.com/inpoly/inpoly.c.txt Copyright (c) 1995-1996 Galacticomm, Inc. Freeware source code. Bob Stein and Craig Yap Adapted from PCL pcl::isXYPointIn2DXYPolygon()
| point | point to check if it lies within the given polygon |
| polygon | polygon to check against |
Definition at line 106 of file polygon_constraint.cpp.
References fawkes::NavGraphPolygonConstraint::Point_::x, and fawkes::NavGraphPolygonConstraint::Point_::y.
|
protected |
Check if a line segments lies on a given polygon.
| p1 | first point of line segment |
| p2 | second point of line segment |
| polygon | polygon to check against |
Definition at line 167 of file polygon_constraint.cpp.
References fawkes::NavGraphPolygonConstraint::Point_::x, and fawkes::NavGraphPolygonConstraint::Point_::y.
| const NavGraphPolygonConstraint::PolygonMap & fawkes::NavGraphPolygonConstraint::polygons | ( | ) | const |
Get reference to the map of polygons.
Definition at line 81 of file polygon_constraint.cpp.
References polygons_.
| void fawkes::NavGraphPolygonConstraint::remove_polygon | ( | const PolygonHandle & | handle | ) |
Remove a polygon from the constraint list.
| handle | handle of polygon to remove |
Definition at line 70 of file polygon_constraint.cpp.
References polygons_.
|
protected |
currently registered polygons
Definition at line 71 of file polygon_constraint.h.
Referenced by add_polygon(), clear_polygons(), polygons(), and remove_polygon().