Classes |
class | boost::geometry::centroid_exception |
| Centroid Exception. More...
|
class | boost::geometry::concept::CentroidStrategy< Strategy > |
| Checks strategy for centroid. More...
|
struct | boost::geometry::strategy::centroid::services::default_strategy< CsTag, GeometryTag, Dimension, Point, Geometry > |
| Traits class binding a centroid calculation strategy to a coordinate system. More...
|
Functions |
template<typename Geometry , typename Point , typename Strategy > |
void | boost::geometry::centroid (Geometry const &geometry, Point &c, Strategy const &strategy) |
| Calculates the centroid of a geometry using the specified strategy.
|
template<typename Geometry , typename Point > |
void | boost::geometry::centroid (Geometry const &geometry, Point &c) |
| Calculates the centroid of a geometry.
|
template<typename Point , typename Geometry > |
Point | boost::geometry::return_centroid (Geometry const &geometry) |
| Calculates the centroid of a geometry.
|
template<typename Point , typename Geometry , typename Strategy > |
Point | boost::geometry::return_centroid (Geometry const &geometry, Strategy const &strategy) |
| Calculates the centroid of a geometry using the specified strategy.
|
template<typename Point , typename Geometry , typename Strategy >
Calculates the centroid of a geometry using the specified strategy.
The free function centroid calculates the geometric center (or: center of mass) of a geometry. This version with the return_ 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.
- Template Parameters:
-
Point | Any type fulfilling a Point Concept |
Geometry | Any type fulfilling a Geometry Concept |
Strategy | Any type fulfilling a centroid Strategy Concept |
- Parameters:
-
geometry | A model of the specified concept |
strategy | The strategy which will be used for centroid calculations |
- Returns:
- The calculated \1