...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Centroid calculation using algorithm Bashein / Detmer.
Calculates centroid using triangulation method published by Bashein / Detmer
template<typename Point, typename PointOfSegment, typename CalculationType> class strategy::centroid::bashein_detmer { // ... };
Parameter |
Default |
Description |
---|---|---|
typename Point |
point type of centroid to calculate |
|
typename PointOfSegment |
Point |
point type of segments, defaults to Point |
typename CalculationType |
void |
numeric type for calculation (e.g. high precision); if void then it is extracted automatically from the coordinate type and (if necessary) promoted to floating point |
Function |
Description |
Parameters |
Returns |
---|---|---|---|
void apply(PointOfSegment const & p1, PointOfSegment const & p2, sums & state)
|
PointOfSegment const &: p1: PointOfSegment const &: p2: sums &: state: |
||
bool result(sums const & state, Point & centroid)
|
sums const &: state: Point &: centroid: |
#include <boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp>