Boost.Geometry    Boost C++ Libraries
Classes | Public Types | Static Public Member Functions
boost::geometry::strategy::centroid::bashein_detmer< Point, PointOfSegment, CalculationType > Class Template Reference

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

List of all members.

Classes

class  sums

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
CalculationTypenumeric 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
Author:
Adapted from "Centroid of a Polygon" by Gerard Bashein and Paul R. Detmer, in "Graphics Gems IV", Academic Press, 1994

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 
) [static]
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 
) [static]

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
Copyright © 2008-2011 Bruno Lalande, Paris, France
Copyright © 2009-2010 Mateusz Loskot, London, UK
Documentation is generated by Doxygen