spherical.hpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Boost.Geometry
  2. // Copyright (c) 2020-2021, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  4. // Licensed under the Boost Software License version 1.0.
  5. // http://www.boost.org/users/license.html
  6. #ifndef BOOST_GEOMETRY_STRATEGIES_SPHERICAL_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_SPHERICAL_HPP
  8. #include <boost/geometry/strategies/area/spherical.hpp>
  9. #include <boost/geometry/strategies/azimuth/spherical.hpp>
  10. #include <boost/geometry/strategies/buffer/spherical.hpp>
  11. #include <boost/geometry/strategies/convex_hull/spherical.hpp>
  12. #include <boost/geometry/strategies/distance/spherical.hpp>
  13. #include <boost/geometry/strategies/envelope/spherical.hpp>
  14. #include <boost/geometry/strategies/expand/spherical.hpp>
  15. #include <boost/geometry/strategies/io/spherical.hpp>
  16. #include <boost/geometry/strategies/index/spherical.hpp>
  17. #include <boost/geometry/strategies/is_convex/spherical.hpp>
  18. #include <boost/geometry/strategies/relate/spherical.hpp>
  19. #include <boost/geometry/strategies/simplify/spherical.hpp>
  20. namespace boost { namespace geometry
  21. {
  22. namespace strategies
  23. {
  24. template
  25. <
  26. typename RadiusTypeOrSphere = double,
  27. typename CalculationType = void
  28. >
  29. class spherical
  30. // derived from the umbrella strategy defining the most strategies
  31. : public strategies::index::detail::spherical<RadiusTypeOrSphere, CalculationType>
  32. {
  33. using base_t = strategies::index::detail::spherical<RadiusTypeOrSphere, CalculationType>;
  34. public:
  35. spherical() = default;
  36. template <typename RadiusOrSphere>
  37. explicit spherical(RadiusOrSphere const& radius_or_sphere)
  38. : base_t(radius_or_sphere)
  39. {}
  40. static auto azimuth()
  41. {
  42. return strategy::azimuth::spherical<CalculationType>();
  43. }
  44. static auto point_order()
  45. {
  46. return strategy::point_order::spherical<CalculationType>();
  47. }
  48. };
  49. } // namespace strategies
  50. }} // namespace boost::geometry
  51. #endif // BOOST_GEOMETRY_STRATEGIES_SPHERICAL_HPP