ConvexHull struct
A convex hull is a convex polygon. It can be constructed from a simple dip::Polygon
,
and is guaranteed clockwise.
Contents
Base classes
-
struct dip::
Polygon - A polygon with floating-point vertices.
Constructors, destructors, assignment and conversion operators
- ConvexHull() defaulted
- Default-constructed ConvexHull (without vertices).
- ConvexHull(dip::Polygon const& polygon)
- Constructs a convex hull of a polygon. The polygon must be simple (not self intersect).
Functions
- auto Polygon() const -> dip::Polygon const&
- Returns the polygon representing the convex hull.
- auto Polygon() -> dip::Polygon&
- Returns the polygon representing the convex hull.
- auto Feret() const -> dip::FeretValues
- Returns the Feret diameters of the convex hull.
Function documentation
dip::FeretValues Feret() const
Returns the Feret diameters of the convex hull.
The Feret diameters of the convex hull correspond to the Feret diameters of the original polygon. Feret diameters are the lengths of the projections. This function determines the longest and the shortest projections, as well as the length of the projection perpendicular to the shortest.
These values are obtained by enumerating anti-podal pairs using the “rotating calipers” algorithm by Preparata and Shamos (1985).