Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::geometry::strategy::centroid::bashein_detmer< Point, PointOfSegment, CalculationType > Class Template Reference

Centroid calculation using algorithm Bashein / Detmer. More...

#include <centroid_bashein_detmer.hpp>

Public Types

typedef sums state_type
 

Static Public Member Functions

static void apply (PointOfSegment const &p1, PointOfSegment const &p2, sums &state)
 
static bool result (sums const &state, Point &centroid)
 

Detailed Description

template<typename Point, typename PointOfSegment = Point, typename CalculationType = void>
class boost::geometry::strategy::centroid::bashein_detmer< Point, PointOfSegment, CalculationType >

Centroid calculation using algorithm Bashein / Detmer.

Calculates centroid using triangulation method published by Bashein / Detmer

Template Parameters
Pointpoint type of centroid to calculate
PointOfSegmentpoint type of segments, defaults to Point
CalculationType
Author
Adapted from "Centroid of a Polygon" by Gerard Bashein and Paul R. Detmer, in "Graphics Gems IV", Academic Press, 1994

{ [heading See also] [link geometry.reference.algorithms.centroid.centroid_3_with_strategy centroid (with strategy)] }

Member Typedef Documentation

template<typename Point , typename PointOfSegment = Point, typename CalculationType = void>
typedef sums boost::geometry::strategy::centroid::bashein_detmer< Point, PointOfSegment, CalculationType >::state_type

Member Function Documentation

template<typename Point , typename PointOfSegment = Point, typename CalculationType = void>
static void boost::geometry::strategy::centroid::bashein_detmer< Point, PointOfSegment, CalculationType >::apply ( PointOfSegment const &  p1,
PointOfSegment const &  p2,
sums &  state 
)
inlinestatic

References boost::numeric_cast().

template<typename Point , typename PointOfSegment = Point, typename CalculationType = void>
static bool boost::geometry::strategy::centroid::bashein_detmer< Point, PointOfSegment, CalculationType >::result ( sums const &  state,
Point &  centroid 
)
inlinestatic

The documentation for this class was generated from the following file: