I-Seed drone's onboard service  0.0.9
Public Types | Public Member Functions | List of all members
mission_directed_polygon Class Reference

Mission polygon with a particular direction attached to it. More...

#include <mission_directed_polygon.h>

Public Types

using kernel = CGAL::Exact_predicates_exact_constructions_kernel
 
using polygon = CGAL::Polygon_2< kernel >
 

Public Member Functions

 mission_directed_polygon (const utils::direction &dir, const utils::polygon &polygon)
 
 ~mission_directed_polygon ()
 
std::size_t waypoint_count () const
 
double distance (const utils::point &start) const
 Distance from start to the closest cell. More...
 
void build_path (const utils::point &start, std::vector< utils::point > *result)
 Build mission path. More...
 

Detailed Description

Mission polygon with a particular direction attached to it.

Polygon will be transformed in a way that attached direction became vertical. Then vertical decomposition algorithm will be applied to split polygon into trapezoids and rectangles, collectively called mission_cell

Considering the direct polygon above: {A0, A1, A2, A3, A4} and vector {A4, A0}, it can be decomposed into cells: {A0, A3', A3, A4}, {A1, A1', A3, A3'} and {A1, A1', A2}

Member Typedef Documentation

◆ kernel

using mission_directed_polygon::kernel = CGAL::Exact_predicates_exact_constructions_kernel

◆ polygon

using mission_directed_polygon::polygon = CGAL::Polygon_2<kernel>

Constructor & Destructor Documentation

◆ mission_directed_polygon()

mission_directed_polygon::mission_directed_polygon ( const utils::direction dir,
const utils::polygon polygon 
)
explicit
Here is the call graph for this function:

◆ ~mission_directed_polygon()

mission_directed_polygon::~mission_directed_polygon ( )
default

Member Function Documentation

◆ waypoint_count()

auto mission_directed_polygon::waypoint_count ( ) const
Returns
Total number of waypoints in all the cells

◆ distance()

auto mission_directed_polygon::distance ( const utils::point start) const

Distance from start to the closest cell.

◆ build_path()

void mission_directed_polygon::build_path ( const utils::point start,
std::vector< utils::point > *  result 
)

Build mission path.

Parameters
startStarting point of the mission path
resultvector where mission path will be saved
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: