1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
6 // Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland.
7
8 // This file was modified by Oracle on 2013-2018.
9 // Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
10
11 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
12 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
13
14 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
15 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
16
17 // Use, modification and distribution is subject to the Boost Software License,
18 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
19 // http://www.boost.org/LICENSE_1_0.txt)
20
21 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_BOX_BOX_HPP
22 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_BOX_BOX_HPP
23
24 #include <cstddef>
25
26 #include <boost/geometry/algorithms/dispatch/disjoint.hpp>
27
28 // For backward compatibility
29 #include <boost/geometry/strategies/cartesian/disjoint_box_box.hpp>
30 #include <boost/geometry/strategies/spherical/disjoint_box_box.hpp>
31
32 namespace boost { namespace geometry
33 {
34
35
36 #ifndef DOXYGEN_NO_DETAIL
37 namespace detail { namespace disjoint
38 {
39
40
41 /*!
42 \brief Internal utility function to detect if boxes are disjoint
43 \note Is used from other algorithms, declared separately
44 to avoid circular references
45 */
46 template <typename Box1, typename Box2, typename Strategy>
disjoint_box_box(Box1 const & box1,Box2 const & box2,Strategy const &)47 inline bool disjoint_box_box(Box1 const& box1, Box2 const& box2, Strategy const&)
48 {
49 return Strategy::apply(box1, box2);
50 }
51
52
53 }} // namespace detail::disjoint
54 #endif // DOXYGEN_NO_DETAIL
55
56
57 #ifndef DOXYGEN_NO_DISPATCH
58 namespace dispatch
59 {
60
61
62 template <typename Box1, typename Box2, std::size_t DimensionCount>
63 struct disjoint<Box1, Box2, DimensionCount, box_tag, box_tag, false>
64 {
65 template <typename Strategy>
applyboost::geometry::dispatch::disjoint66 static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const&)
67 {
68 return Strategy::apply(box1, box2);
69 }
70 };
71
72
73 } // namespace dispatch
74 #endif // DOXYGEN_NO_DISPATCH
75
76
77 }} // namespace boost::geometry
78
79
80 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_BOX_BOX_HPP
81