cartesian.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Boost.Geometry
  2. // Copyright (c) 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_DENSIFY_CARTESIAN_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_DENSIFY_CARTESIAN_HPP
  8. #include <boost/geometry/strategies/cartesian/densify.hpp>
  9. #include <boost/geometry/strategies/detail.hpp>
  10. #include <boost/geometry/strategies/densify/services.hpp>
  11. #include <boost/geometry/util/type_traits.hpp>
  12. namespace boost { namespace geometry
  13. {
  14. namespace strategies { namespace densify
  15. {
  16. template <typename CalculationType = void>
  17. struct cartesian
  18. : public strategies::detail::cartesian_base
  19. {
  20. template <typename Geometry>
  21. static auto densify(Geometry const&)
  22. {
  23. return strategy::densify::cartesian<CalculationType>();
  24. }
  25. };
  26. namespace services
  27. {
  28. template <typename Geometry>
  29. struct default_strategy<Geometry, cartesian_tag>
  30. {
  31. using type = strategies::densify::cartesian<>;
  32. };
  33. template <typename CT>
  34. struct strategy_converter<strategy::densify::cartesian<CT> >
  35. {
  36. static auto get(strategy::densify::cartesian<CT> const&)
  37. {
  38. return strategies::densify::cartesian<CT>();
  39. }
  40. };
  41. } // namespace services
  42. }} // namespace strategies::densify
  43. }} // namespace boost::geometry
  44. #endif // BOOST_GEOMETRY_STRATEGIES_DENSIFY_CARTESIAN_HPP