|
| enum | MethodType { DirectMethod
, WrappingMethod
, GrahamScan
} |
| | algoritym type
|
|
typedef std::vector< Vector2D > | PointCont |
| | input point container
|
|
typedef std::vector< Vector2D > | VertexCont |
| | result vertex container
|
|
typedef std::vector< Segment2D > | EdgeCont |
| | result edge container
|
|
|
| ConvexHull () |
| | create empty convex hull
|
| | ConvexHull (const PointCont &v) |
| | create convex hull with given points
|
|
void | clear () |
| | clear all data.
|
|
void | clearResults () |
| | clear result variables.
|
| void | addPoint (const Vector2D &p) |
| | add a new point to the set of input point
|
| void | addPoints (const PointCont &v) |
| | add new points to the set of input pointc
|
| void | compute (const MethodType type=WrappingMethod) |
| | generate convex hull by default method.
|
| const PointCont & | inputPoints () const |
| | get the reference to the input point container
|
| const VertexCont & | vertices () const |
| | get the reference to the vertex container ordered by counter clockwise
|
| const EdgeCont & | edges () const |
| | get the reference to the result edge container
|
| Polygon2D | toPolygon () const |
| | get the convex hull polygon
|
| std::ostream & | printInputPoints (std::ostream &os) const |
| | output input points to the stream in gnuplot format.
|
| std::ostream & | printVertices (std::ostream &os) const |
| | output vertices to the stream in gnuplot format.
|
| std::ostream & | printEdges (std::ostream &os) const |
| | output edges to the stream in gnuplot format.
|
◆ ConvexHull()
| rcsc::ConvexHull::ConvexHull |
( |
const PointCont & | v | ) |
|
create convex hull with given points
- Parameters
-
◆ addPoint()
| void rcsc::ConvexHull::addPoint |
( |
const Vector2D & | p | ) |
|
|
inline |
add a new point to the set of input point
- Parameters
-
◆ addPoints()
| void rcsc::ConvexHull::addPoints |
( |
const PointCont & | v | ) |
|
|
inline |
add new points to the set of input pointc
- Parameters
-
◆ compute()
| void rcsc::ConvexHull::compute |
( |
const MethodType | type = WrappingMethod | ) |
|
generate convex hull by default method.
generate convex hull by specified method
- Parameters
-
◆ edges()
| const EdgeCont & rcsc::ConvexHull::edges |
( |
| ) |
const |
|
inline |
get the reference to the result edge container
- Returns
- const reference to the result edge container
◆ inputPoints()
| const PointCont & rcsc::ConvexHull::inputPoints |
( |
| ) |
const |
|
inline |
get the reference to the input point container
- Returns
- const reference to the input point container
◆ printEdges()
| std::ostream & rcsc::ConvexHull::printEdges |
( |
std::ostream & | os | ) |
const |
output edges to the stream in gnuplot format.
- Parameters
-
| os | reference to the output stream |
- Returns
- reference to the output stream
◆ printInputPoints()
| std::ostream & rcsc::ConvexHull::printInputPoints |
( |
std::ostream & | os | ) |
const |
output input points to the stream in gnuplot format.
- Parameters
-
| os | reference to the output stream |
- Returns
- reference to the output stream
◆ printVertices()
| std::ostream & rcsc::ConvexHull::printVertices |
( |
std::ostream & | os | ) |
const |
output vertices to the stream in gnuplot format.
- Parameters
-
| os | reference to the output stream |
- Returns
- reference to the output stream
◆ toPolygon()
| Polygon2D rcsc::ConvexHull::toPolygon |
( |
| ) |
const |
get the convex hull polygon
- Returns
- new 2d polygon object
◆ vertices()
| const VertexCont & rcsc::ConvexHull::vertices |
( |
| ) |
const |
|
inline |
get the reference to the vertex container ordered by counter clockwise
- Returns
- const reference to the ordered vertex container
The documentation for this class was generated from the following files: