Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

strategy::centroid::bashein_detmer

Centroid calculation using algorithm Bashein / Detmer.

Description

Calculates centroid using triangulation method published by Bashein / Detmer

Synopsis

template<typename Point, typename PointOfSegment, typename CalculationType>
class strategy::centroid::bashein_detmer
{
  // ...
};

Template parameter(s)

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

Member Function(s)

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:

Header

#include <boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp>

See also

centroid (with strategy)


PrevUpHomeNext