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 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_BOX_HPP
0021 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_BOX_HPP
0022
0023 #include <cstddef>
0024
0025 #include <boost/geometry/algorithms/dispatch/disjoint.hpp>
0026
0027 #include <boost/geometry/core/access.hpp>
0028 #include <boost/geometry/core/coordinate_dimension.hpp>
0029 #include <boost/geometry/core/tags.hpp>
0030
0031 #include <boost/geometry/strategies/detail.hpp>
0032
0033 namespace boost { namespace geometry
0034 {
0035
0036 #ifndef DOXYGEN_NO_DETAIL
0037 namespace detail { namespace disjoint
0038 {
0039
0040
0041
0042
0043
0044 template
0045 <
0046 typename Point, typename Box, typename Strategy,
0047 std::enable_if_t<strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
0048 >
0049 inline bool disjoint_point_box(Point const& point, Box const& box,
0050 Strategy const& strategy)
0051 {
0052 typedef decltype(strategy.covered_by(point, box)) strategy_type;
0053
0054 return ! strategy_type::apply(point, box);
0055 }
0056
0057 template
0058 <
0059 typename Point, typename Box, typename Strategy,
0060 std::enable_if_t<! strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
0061 >
0062 inline bool disjoint_point_box(Point const& point, Box const& box,
0063 Strategy const& )
0064 {
0065
0066 return ! Strategy::apply(point, box);
0067 }
0068
0069
0070 }}
0071 #endif
0072
0073
0074 #ifndef DOXYGEN_NO_DISPATCH
0075 namespace dispatch
0076 {
0077
0078
0079 template <typename Point, typename Box, std::size_t DimensionCount>
0080 struct disjoint<Point, Box, DimensionCount, point_tag, box_tag, false>
0081 {
0082 template <typename Strategy>
0083 static inline bool apply(Point const& point, Box const& box,
0084 Strategy const& strategy)
0085 {
0086 typedef decltype(strategy.covered_by(point, box)) strategy_type;
0087
0088 return ! strategy_type::apply(point, box);
0089 }
0090 };
0091
0092
0093 }
0094 #endif
0095
0096 }}
0097
0098 #endif