cartesian.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_AZIMUTH_CARTESIAN_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_AZIMUTH_CARTESIAN_HPP
  8. // TODO: move this file to boost/geometry/strategy
  9. #include <boost/geometry/strategies/cartesian/azimuth.hpp>
  10. #include <boost/geometry/strategies/azimuth/services.hpp>
  11. #include <boost/geometry/strategies/detail.hpp>
  12. namespace boost { namespace geometry
  13. {
  14. namespace strategies { namespace azimuth
  15. {
  16. template <typename CalculationType = void>
  17. struct cartesian : strategies::detail::cartesian_base
  18. {
  19. static auto azimuth()
  20. {
  21. return strategy::azimuth::cartesian<CalculationType>();
  22. }
  23. };
  24. namespace services
  25. {
  26. template <typename Point1, typename Point2>
  27. struct default_strategy<Point1, Point2, cartesian_tag, cartesian_tag>
  28. {
  29. using type = strategies::azimuth::cartesian<>;
  30. };
  31. template <typename CT>
  32. struct strategy_converter<strategy::azimuth::cartesian<CT> >
  33. {
  34. static auto get(strategy::azimuth::cartesian<CT> const&)
  35. {
  36. return strategies::azimuth::cartesian<CT>();
  37. }
  38. };
  39. } // namespace services
  40. }} // namespace strategies::azimuth
  41. }} // namespace boost::geometry
  42. #endif // BOOST_GEOMETRY_STRATEGIES_AZIMUTH_CARTESIAN_HPP