geometry/doc/generated/centroid.qbk
Barend Gehrels eb0bc69f56 Doc update
[SVN r69343]
2011-02-27 18:20:28 +00:00

162 lines
5.3 KiB
Plaintext

[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2009-2011 Barend Gehrels, Geodan, Amsterdam, the Netherlands.
Copyright (c) 2009-2011 Mateusz Loskot (mateusz@loskot.net)
Copyright (c) 2009-2011 Bruno Lalande, Paris, France.
Use, modification and distribution is subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]
[/ Generated by doxygen_xml2qbk, don't change, will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml/group__centroid.xml]
[section:centroid_2 centroid]
Calculates the centroid of a geometry.
[heading Description]
The free function centroid calculates the geometric center (or: center of mass) of a geometry
[heading Synopsis]
``template<typename Geometry, typename Point>
void centroid(Geometry const & geometry, Point & c)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
[[Point &] [Any type fulfilling a Point Concept ] [c] [the calculated centroid will be assigned to this point reference]]
]
[heading Header]
Either
`#include <boost/geometry/geometry.hpp>`
Or
`#include <boost/geometry/algorithms/centroid.hpp>`
[include reference/algorithms/centroid.qbk]
[endsect]
[section:centroid_3_with_strategy centroid (with strategy)]
Calculates the centroid of a geometry using the specified strategy.
[heading Description]
The free function centroid calculates the geometric center (or: center of mass) of a geometry. Reasons to specify a strategy include: use another coordinate system for calculations; construct the strategy beforehand (e.g. with the radius of the Earth); select a strategy when there are more than one available for a calculation.
[heading Synopsis]
``template<typename Geometry, typename Point, typename Strategy>
void centroid(Geometry const & geometry, Point & c, Strategy const & strategy)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
[[Point &] [Any type fulfilling a Point Concept ] [c] [A model of the specified Point Concept which is set to the centroid ]]
[[Strategy const &] [Any type fulfilling a Centroid Strategy Concept ] [strategy] [The strategy which will be used for centroid calculations]]
]
[heading Header]
Either
`#include <boost/geometry/geometry.hpp>`
Or
`#include <boost/geometry/algorithms/centroid.hpp>`
[include reference/algorithms/centroid.qbk]
[heading Available Strategies]
* [link geometry.reference.strategies.strategy_centroid_bashein_detmer Bashein Detmer (cartesian)]
[endsect]
[section:make_centroid_2_with_strategy make_centroid (with strategy)]
Calculates the centroid of a geometry using the specified strategy.
[heading Description]
The free function centroid calculates the geometric center (or: center of mass) of a geometry. This version with the make\u005f prefix returns the centroid, and a template parameter must therefore be specified in the call.. Reasons to specify a strategy include: use another coordinate system for calculations; construct the strategy beforehand (e.g. with the radius of the Earth); select a strategy when there are more than one available for a calculation.
[heading Synopsis]
``template<typename Point, typename Geometry, typename Strategy>
Point make_centroid(Geometry const & geometry, Strategy const & strategy)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Point] [Any type fulfilling a Point Concept ] [ - ] [Must be specified]]
[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
[[Strategy const &] [Any type fulfilling a centroid Strategy Concept ] [strategy] [The strategy which will be used for centroid calculations ]]
]
[heading Returns]
The calculated centroid
[heading Header]
Either
`#include <boost/geometry/geometry.hpp>`
Or
`#include <boost/geometry/algorithms/centroid.hpp>`
[include reference/algorithms/centroid.qbk]
[heading Available Strategies]
* [link geometry.reference.strategies.strategy_centroid_bashein_detmer Bashein Detmer (cartesian)]
[endsect]
[section:make_centroid_1 make_centroid]
Calculates the centroid of a geometry.
[heading Description]
The free function centroid calculates the geometric center (or: center of mass) of a geometry. This version with the make\u005f prefix returns the centroid, and a template parameter must therefore be specified in the call..
[heading Synopsis]
``template<typename Point, typename Geometry>
Point make_centroid(Geometry const & geometry)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Point] [Any type fulfilling a Point Concept ] [ - ] [Must be specified]]
[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
]
[heading Returns]
The calculated centroid [include reference/algorithms/centroid.qbk]
[heading Header]
Either
`#include <boost/geometry/geometry.hpp>`
Or
`#include <boost/geometry/algorithms/centroid.hpp>`
[endsect]