[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

and functors. |

## Namespaces

namespace | vigra::detail

## Functions

template<class PointArray>
void | convexHull (const PointArray &points, PointArray &convex_hull)
| Compute convex hull of a 2D polygon.

## Function Documentation

template<class PointArray>
template<class PointArray>
template<class PointArray>
template<class PointArray>
template<class PointArray>
template<class PointArray>
template<class PointArray>
template<class PointArray>
template<class PointArray>
template<class PointArray>
void vigra::convexHull | ( | const PointArray & | points,
|  | PointArray & | convex_hull |
| ) |  |  |

Compute convex hull of a 2D polygon.

The input array points contains a (not necessarily ordered) set of 2D points whose convex hull is to be computed. The array's `value_type` (i.e. the point type) must be compatible with std::vector (in particular, it must support indexing, copying, and have `size() == 2`). The points of the convex hull will be appended to the output array convex_hull (which must support `std::back_inserter(convex_hull)`). Since the convex hull is a closed polygon, the first and last point of the output will be the same (i.e. the first point will simply be inserted at the end again). The points of the convex hull will be ordered counter-clockwise, starting with the leftmost point of the imput.

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.7.1 (2 Dec 2010)