30#ifndef RCSC_GEOM_CONVEX_HULL_H
31#define RCSC_GEOM_CONVEX_HULL_H
103 M_input_points.push_back( p );
112 M_input_points.insert( M_input_points.end(), v.begin(), v.end() );
132 return M_input_points;
158 void computeDirectMethod();
163 void computeWrappingMethod();
168 void computeGrahamScan();
195 size_t getMinPointIndex()
const;
197 void sortPointsByAngleFrom(
const size_t index );
Definition: convex_hull.h:42
std::ostream & printInputPoints(std::ostream &os) const
output input points to the stream in gnuplot format.
ConvexHull()
create empty convex hull
void clearResults()
clear result variables.
MethodType
algoritym type
Definition: convex_hull.h:52
ConvexHull(const PointCont &v)
create convex hull with given points
std::ostream & printEdges(std::ostream &os) const
output edges to the stream in gnuplot format.
std::vector< Vector2D > PointCont
input point container
Definition: convex_hull.h:44
Polygon2D toPolygon() const
get the convex hull polygon
void addPoint(const Vector2D &p)
add a new point to the set of input point
Definition: convex_hull.h:101
const PointCont & inputPoints() const
get the reference to the input point container
Definition: convex_hull.h:130
const VertexCont & vertices() const
get the reference to the vertex container ordered by counter clockwise
Definition: convex_hull.h:139
void clear()
clear all data.
std::vector< Vector2D > VertexCont
result vertex container
Definition: convex_hull.h:45
std::ostream & printVertices(std::ostream &os) const
output vertices to the stream in gnuplot format.
void addPoints(const PointCont &v)
add new points to the set of input pointc
Definition: convex_hull.h:110
void compute(const MethodType type=WrappingMethod)
generate convex hull by default method.
std::vector< Segment2D > EdgeCont
result edge container
Definition: convex_hull.h:46
const EdgeCont & edges() const
get the reference to the result edge container
Definition: convex_hull.h:148
2D polygon region class
Definition: polygon_2d.h:47
2D point vector class
Definition: vector_2d.h:46
2D polygon region Header File.
2D segment line Header File.
2d vector class Header File.