centroid.qbk 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. [/============================================================================
  2. Boost.Geometry (aka GGL, Generic Geometry Library)
  3. Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
  4. Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
  5. Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
  6. Use, modification and distribution is subject to the Boost Software License,
  7. Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  8. http://www.boost.org/LICENSE_1_0.txt)
  9. =============================================================================/]
  10. [/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
  11. [/ Generated from doxy/doxygen_output/xml/group__centroid.xml]
  12. [section:centroid_3_with_strategy centroid (with strategy)]
  13. '''<indexterm><primary>centroid</primary></indexterm>'''
  14. Calculates the centroid of a geometry using the specified strategy.
  15. [heading Description]
  16. 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.
  17. [heading Synopsis]
  18. ``template<typename Geometry, typename Point, typename Strategy>
  19. void centroid(Geometry const & geometry, Point & c, Strategy const & strategy)``
  20. [heading Parameters]
  21. [table
  22. [[Type] [Concept] [Name] [Description] ]
  23. [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
  24. [[Point &] [Any type fulfilling a Point Concept ] [c] [A model of the specified Point Concept which is set to the centroid ]]
  25. [[Strategy const &] [Any type fulfilling a Centroid Strategy Concept ] [strategy] [The strategy which will be used for centroid calculations]]
  26. ]
  27. [heading Header]
  28. Either
  29. `#include <boost/geometry.hpp>`
  30. Or
  31. `#include <boost/geometry/algorithms/centroid.hpp>`
  32. [include reference/algorithms/centroid.qbk]
  33. [include reference/algorithms/centroid_strategies.qbk]
  34. [endsect]
  35. [section:centroid_2 centroid]
  36. '''<indexterm><primary>centroid</primary></indexterm>'''
  37. Calculates the centroid of a geometry.
  38. [heading Description]
  39. The free function centroid calculates the geometric center (or: center of mass) of a geometry. It uses the default strategy, based on the coordinate system of the geometry.
  40. [heading Synopsis]
  41. ``template<typename Geometry, typename Point>
  42. void centroid(Geometry const & geometry, Point & c)``
  43. [heading Parameters]
  44. [table
  45. [[Type] [Concept] [Name] [Description] ]
  46. [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
  47. [[Point &] [Any type fulfilling a Point Concept ] [c] [The calculated centroid will be assigned to this point reference]]
  48. ]
  49. [heading Header]
  50. Either
  51. `#include <boost/geometry.hpp>`
  52. Or
  53. `#include <boost/geometry/algorithms/centroid.hpp>`
  54. [include reference/algorithms/centroid.qbk]
  55. [heading Example]
  56. [centroid]
  57. [centroid_output]
  58. [endsect]
  59. [section:return_centroid_1 return_centroid]
  60. '''<indexterm><primary>return_centroid</primary></indexterm>'''
  61. Calculates the centroid of a geometry.
  62. [heading Description]
  63. The free function centroid calculates the geometric center (or: center of mass) of a geometry. This version with the return\u005f prefix returns the centroid, and a template parameter must therefore be specified in the call..
  64. [heading Synopsis]
  65. ``template<typename Point, typename Geometry>
  66. Point return_centroid(Geometry const & geometry)``
  67. [heading Parameters]
  68. [table
  69. [[Type] [Concept] [Name] [Description] ]
  70. [[Point] [Any type fulfilling a Point Concept ] [ - ] [Must be specified]]
  71. [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
  72. ]
  73. [heading Returns]
  74. The calculated centroid
  75. [heading Header]
  76. Either
  77. `#include <boost/geometry.hpp>`
  78. Or
  79. `#include <boost/geometry/algorithms/centroid.hpp>`
  80. [include reference/algorithms/centroid.qbk]
  81. [endsect]
  82. [section:return_centroid_2_with_strategy return_centroid (with strategy)]
  83. '''<indexterm><primary>return_centroid</primary></indexterm>'''
  84. Calculates the centroid of a geometry using the specified strategy.
  85. [heading Description]
  86. The free function centroid calculates the geometric center (or: center of mass) of a geometry. This version with the return\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.
  87. [heading Synopsis]
  88. ``template<typename Point, typename Geometry, typename Strategy>
  89. Point return_centroid(Geometry const & geometry, Strategy const & strategy)``
  90. [heading Parameters]
  91. [table
  92. [[Type] [Concept] [Name] [Description] ]
  93. [[Point] [Any type fulfilling a Point Concept ] [ - ] [Must be specified]]
  94. [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
  95. [[Strategy const &] [Any type fulfilling a centroid Strategy Concept ] [strategy] [The strategy which will be used for centroid calculations ]]
  96. ]
  97. [heading Returns]
  98. The calculated centroid
  99. [heading Header]
  100. Either
  101. `#include <boost/geometry.hpp>`
  102. Or
  103. `#include <boost/geometry/algorithms/centroid.hpp>`
  104. [include reference/algorithms/centroid.qbk]
  105. [include reference/algorithms/centroid_strategies.qbk]
  106. [endsect]