cartesian.hpp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Boost.Geometry
  2. // Copyright (c) 2021, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Vissarion Fysikopoulos, 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_CLOSEST_POINTS_CARTESIAN_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_CARTESIAN_HPP
  8. //#include <boost/geometry/strategies/cartesian/azimuth.hpp>
  9. //#include <boost/geometry/strategies/cartesian/distance_projected_point.hpp>
  10. //#include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
  11. #include <boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp>
  12. #include <boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp>
  13. #include <boost/geometry/strategies/cartesian/distance_segment_box.hpp>
  14. #include <boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp>
  15. #include <boost/geometry/strategies/detail.hpp>
  16. #include <boost/geometry/strategies/distance/detail.hpp>
  17. #include <boost/geometry/strategies/closest_points/services.hpp>
  18. //#include <boost/geometry/strategies/normalize.hpp>
  19. #include <boost/geometry/strategies/distance/cartesian.hpp>
  20. #include <boost/geometry/util/type_traits.hpp>
  21. namespace boost { namespace geometry
  22. {
  23. namespace strategies { namespace closest_points
  24. {
  25. template <typename CalculationType = void>
  26. struct cartesian
  27. : public strategies::distance::cartesian<CalculationType>
  28. {
  29. template <typename Geometry1, typename Geometry2>
  30. static auto closest_points(Geometry1 const&, Geometry2 const&,
  31. distance::detail::enable_if_ps_t<Geometry1, Geometry2> * = nullptr)
  32. {
  33. return strategy::closest_points::projected_point<CalculationType>();
  34. }
  35. };
  36. namespace services
  37. {
  38. template <typename Geometry1, typename Geometry2>
  39. struct default_strategy<Geometry1, Geometry2, cartesian_tag, cartesian_tag>
  40. {
  41. using type = strategies::closest_points::cartesian<>;
  42. };
  43. } // namespace services
  44. }} // namespace strategies::closest_points
  45. }} // namespace boost::geometry
  46. #endif // BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_CARTESIAN_HPP