box_to_box.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2014-2021, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  4. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  5. // Licensed under the Boost Software License version 1.0.
  6. // http://www.boost.org/users/license.html
  7. #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP
  8. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP
  9. #include <boost/core/ignore_unused.hpp>
  10. #include <boost/geometry/core/point_type.hpp>
  11. #include <boost/geometry/core/tags.hpp>
  12. #include <boost/geometry/strategies/distance.hpp>
  13. #include <boost/geometry/strategies/tags.hpp>
  14. #include <boost/geometry/algorithms/dispatch/distance.hpp>
  15. namespace boost { namespace geometry
  16. {
  17. #ifndef DOXYGEN_NO_DISPATCH
  18. namespace dispatch
  19. {
  20. template <typename Box1, typename Box2, typename Strategies>
  21. struct distance
  22. <
  23. Box1, Box2, Strategies, box_tag, box_tag,
  24. strategy_tag_distance_box_box, false
  25. >
  26. {
  27. static inline auto apply(Box1 const& box1, Box2 const& box2, Strategies const& strategies)
  28. {
  29. boost::ignore_unused(strategies);
  30. return strategies.distance(box1, box2).apply(box1, box2);
  31. }
  32. };
  33. } // namespace dispatch
  34. #endif // DOXYGEN_NO_DISPATCH
  35. }} // namespace boost::geometry
  36. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP