box_to_box.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2014, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Menelaos Karavelas, 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_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP
  7. #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP
  8. #include <boost/core/ignore_unused.hpp>
  9. #include <boost/geometry/core/point_type.hpp>
  10. #include <boost/geometry/core/tags.hpp>
  11. #include <boost/geometry/strategies/distance.hpp>
  12. #include <boost/geometry/strategies/tags.hpp>
  13. #include <boost/geometry/algorithms/dispatch/distance.hpp>
  14. namespace boost { namespace geometry
  15. {
  16. #ifndef DOXYGEN_NO_DISPATCH
  17. namespace dispatch
  18. {
  19. template <typename Box1, typename Box2, typename Strategy>
  20. struct distance
  21. <
  22. Box1, Box2, Strategy, box_tag, box_tag,
  23. strategy_tag_distance_box_box, false
  24. >
  25. {
  26. static inline typename strategy::distance::services::return_type
  27. <
  28. Strategy,
  29. typename point_type<Box1>::type,
  30. typename point_type<Box2>::type
  31. >::type
  32. apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
  33. {
  34. boost::ignore_unused(strategy);
  35. return strategy.apply(box1, box2);
  36. }
  37. };
  38. } // namespace dispatch
  39. #endif // DOXYGEN_NO_DISPATCH
  40. }} // namespace boost::geometry
  41. #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP