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, 2014, 2015, 2017, 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_POINT_POINT_HPP
22 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_POINT_HPP
23
24 #include <cstddef>
25
26 #include <boost/geometry/core/tags.hpp>
27
28 #include <boost/geometry/algorithms/dispatch/disjoint.hpp>
29
30 // For backward compatibility
31 #include <boost/geometry/strategies/disjoint.hpp>
32 #include <boost/geometry/strategies/cartesian/point_in_point.hpp>
33 #include <boost/geometry/strategies/spherical/point_in_point.hpp>
34
35
36 namespace boost { namespace geometry
37 {
38
39
40 #ifndef DOXYGEN_NO_DETAIL
41 namespace detail { namespace disjoint
42 {
43
44
45 /*!
46 \brief Internal utility function to detect of points are disjoint
47 \note To avoid circular references
48 */
49 template <typename Point1, typename Point2, typename Strategy>
disjoint_point_point(Point1 const & point1,Point2 const & point2,Strategy const &)50 inline bool disjoint_point_point(Point1 const& point1, Point2 const& point2,
51 Strategy const& )
52 {
53 return ! Strategy::apply(point1, point2);
54 }
55
56
57 }} // namespace detail::disjoint
58 #endif // DOXYGEN_NO_DETAIL
59
60
61 #ifndef DOXYGEN_NO_DISPATCH
62 namespace dispatch
63 {
64
65
66 template <typename Point1, typename Point2, std::size_t DimensionCount>
67 struct disjoint<Point1, Point2, DimensionCount, point_tag, point_tag, false>
68 {
69 template <typename Strategy>
applyboost::geometry::dispatch::disjoint70 static inline bool apply(Point1 const& point1, Point2 const& point2,
71 Strategy const& )
72 {
73 return ! Strategy::apply(point1, point2);
74 }
75 };
76
77
78 } // namespace dispatch
79 #endif // DOXYGEN_NO_DISPATCH
80
81 }} // namespace boost::geometry
82
83 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_POINT_HPP
84