I-Seed drone's onboard service
0.0.9
|
Mission polygon without self-intersections. More...
#include <mission_simple_polygon.h>
Public Types | |
using | polygon = utils::polygon |
using | point = utils::point |
Public Member Functions | |
mission_simple_polygon (const polygon &poly) | |
~mission_simple_polygon () | |
bool | visited () const |
Once the build_path is used the instance is marked as visited. More... | |
double | distance (const point &start) const |
The distance from point start to the closest polygon waypoint from where path can be constructed. More... | |
void | build_path (const point &start, std::vector< point > *result) |
Build mission path. More... | |
std::size_t | waypoint_count () const |
The minimum number of waypoints the polygon can be covered by. More... | |
Mission polygon without self-intersections.
For each edge of the polygon the mission_directed_polygon instance will be created. Each such instance will be checked for the number of waypoints, and only those with a minimal number of waypoints will be kept. When build_path is called we will use closest instance of mission_directed_polygon for path construction
E.g., the simple polygon {A0, A1, A2, A3, A4} will produce five instances of the directed polygons, shown below by the red arrows.
|
explicit |
|
default |
auto mission_simple_polygon::visited | ( | ) | const |
Once the build_path is used the instance is marked as visited.
auto mission_simple_polygon::distance | ( | const point & | start | ) | const |
The distance from point start
to the closest polygon waypoint from where path can be constructed.
Build mission path.
start | Starting point of the mission path |
result | vector where mission path will be saved |
auto mission_simple_polygon::waypoint_count | ( | ) | const |
The minimum number of waypoints the polygon can be covered by.