File indexing completed on 2024-11-15 09:10:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_POINT_HPP
0022 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_POINT_HPP
0023
0024 #include <cstddef>
0025 #include <type_traits>
0026
0027 #include <boost/geometry/core/tags.hpp>
0028
0029 #include <boost/geometry/algorithms/dispatch/disjoint.hpp>
0030
0031 #include <boost/geometry/strategies/detail.hpp>
0032
0033
0034 #include <boost/geometry/strategies/disjoint.hpp>
0035 #include <boost/geometry/strategies/cartesian/point_in_point.hpp>
0036 #include <boost/geometry/strategies/spherical/point_in_point.hpp>
0037
0038
0039 namespace boost { namespace geometry
0040 {
0041
0042
0043 #ifndef DOXYGEN_NO_DETAIL
0044 namespace detail { namespace disjoint
0045 {
0046
0047
0048
0049
0050
0051
0052 template
0053 <
0054 typename Point1, typename Point2, typename Strategy,
0055 std::enable_if_t<strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
0056 >
0057 inline bool disjoint_point_point(Point1 const& point1, Point2 const& point2,
0058 Strategy const& strategy)
0059 {
0060 typedef decltype(strategy.relate(point1, point2)) strategy_type;
0061
0062 return ! strategy_type::apply(point1, point2);
0063 }
0064
0065 template
0066 <
0067 typename Point1, typename Point2, typename Strategy,
0068 std::enable_if_t<! strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
0069 >
0070 inline bool disjoint_point_point(Point1 const& point1, Point2 const& point2,
0071 Strategy const& )
0072 {
0073
0074 return ! Strategy::apply(point1, point2);
0075 }
0076
0077
0078 }}
0079 #endif
0080
0081
0082 #ifndef DOXYGEN_NO_DISPATCH
0083 namespace dispatch
0084 {
0085
0086
0087 template <typename Point1, typename Point2, std::size_t DimensionCount>
0088 struct disjoint<Point1, Point2, DimensionCount, point_tag, point_tag, false>
0089 {
0090 template <typename Strategy>
0091 static inline bool apply(Point1 const& point1, Point2 const& point2,
0092 Strategy const& strategy)
0093 {
0094 typedef decltype(strategy.relate(point1, point2)) strategy_type;
0095
0096 return ! strategy_type::apply(point1, point2);
0097 }
0098 };
0099
0100
0101 }
0102 #endif
0103
0104 }}
0105
0106 #endif