• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2014, Oracle and/or its affiliates.
4 
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
6 
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
9 
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP
12 
13 #include <boost/core/ignore_unused.hpp>
14 
15 #include <boost/geometry/core/point_type.hpp>
16 #include <boost/geometry/core/tags.hpp>
17 
18 #include <boost/geometry/strategies/distance.hpp>
19 #include <boost/geometry/strategies/tags.hpp>
20 
21 #include <boost/geometry/algorithms/dispatch/distance.hpp>
22 
23 
24 namespace boost { namespace geometry
25 {
26 
27 #ifndef DOXYGEN_NO_DISPATCH
28 namespace dispatch
29 {
30 
31 
32 template <typename Box1, typename Box2, typename Strategy>
33 struct distance
34     <
35         Box1, Box2, Strategy, box_tag, box_tag,
36         strategy_tag_distance_box_box, false
37     >
38 {
39     static inline typename strategy::distance::services::return_type
40         <
41             Strategy,
42             typename point_type<Box1>::type,
43             typename point_type<Box2>::type
44         >::type
applyboost::geometry::dispatch::distance45     apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy)
46     {
47         boost::ignore_unused(strategy);
48         return strategy.apply(box1, box2);
49     }
50 };
51 
52 
53 } // namespace dispatch
54 #endif // DOXYGEN_NO_DISPATCH
55 
56 
57 }} // namespace boost::geometry
58 
59 
60 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_BOX_TO_BOX_HPP
61