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

Utility for path creation inside the cell. More...

#include <polygon_slicer.h>

Public Types

using kernel = CGAL::Cartesian< double >
 
using polygon = CGAL::Polygon_2< kernel >
 
using point = kernel::Point_2
 
using traits = CGAL::Arr_segment_traits_2< kernel >
 
using segment = traits::Segment_2
 

Public Member Functions

 polygon_slicer (const utils::polygon &poly)
 
 ~polygon_slicer ()
 
std::pair< int, int > slice (double x_slice) const
 

Detailed Description

Utility for path creation inside the cell.

Member Typedef Documentation

◆ kernel

using polygon_slicer::kernel = CGAL::Cartesian<double>

◆ polygon

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

◆ point

using polygon_slicer::point = kernel::Point_2

◆ traits

using polygon_slicer::traits = CGAL::Arr_segment_traits_2<kernel>

◆ segment

using polygon_slicer::segment = traits::Segment_2

Constructor & Destructor Documentation

◆ polygon_slicer()

polygon_slicer::polygon_slicer ( const utils::polygon poly)
explicit

◆ ~polygon_slicer()

polygon_slicer::~polygon_slicer ( )
default

Member Function Documentation

◆ slice()

auto polygon_slicer::slice ( double  x_slice) const

Assuming drone will fly vertically on the X = x_slice line (parallel to Y-axis), return the start and stop index of the waypoint that will cover given X = x_slice line

Returns
the start and stop indices of waypoints
Note
On the image below you can see the work of the method applied to three X = x_slice_(1|2|3) vertical lines

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