geometry/doc/reference/centroid.qbk

155 lines
4.5 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, it 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 ref/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
[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 ref/algorithms/centroid.qbk]
[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_ prefix returns the centroid, and a template parameter must therefore be specified in the call..
[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 ref/algorithms/centroid.qbk]
[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_ 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
[heading Header]
Either
`#include <boost/geometry/geometry.hpp>`
Or
`#include <boost/geometry/algorithms/centroid.hpp>`
[endsect]