1 // Boost.Geometry (aka GGL, Generic Geometry Library)
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
8 // This file was modified by Oracle on 2013-2018.
9 // Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
11 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
12 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
14 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
15 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
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)
21 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_BOX_HPP
22 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_BOX_HPP
26 #include <boost/geometry/core/access.hpp>
27 #include <boost/geometry/core/coordinate_dimension.hpp>
28 #include <boost/geometry/core/tags.hpp>
30 #include <boost/geometry/algorithms/dispatch/disjoint.hpp>
31 #include <boost/geometry/strategies/disjoint.hpp>
33 namespace boost { namespace geometry
36 #ifndef DOXYGEN_NO_DETAIL
37 namespace detail { namespace disjoint
42 \brief Internal utility function to detect if point/box are disjoint
44 template <typename Point, typename Box, typename Strategy>
45 inline bool disjoint_point_box(Point const& point, Box const& box, Strategy const& )
47 // ! covered_by(point, box)
48 return ! Strategy::apply(point, box);
52 }} // namespace detail::disjoint
53 #endif // DOXYGEN_NO_DETAIL
56 #ifndef DOXYGEN_NO_DISPATCH
61 template <typename Point, typename Box, std::size_t DimensionCount>
62 struct disjoint<Point, Box, DimensionCount, point_tag, box_tag, false>
64 template <typename Strategy>
65 static inline bool apply(Point const& point, Box const& box, Strategy const& )
67 // ! covered_by(point, box)
68 return ! Strategy::apply(point, box);
73 } // namespace dispatch
74 #endif // DOXYGEN_NO_DISPATCH
76 }} // namespace boost::geometry
78 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_BOX_HPP