1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_BOX_HPP
- #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISJOINT_POINT_BOX_HPP
- #include <cstddef>
- #include <boost/geometry/algorithms/dispatch/disjoint.hpp>
- #include <boost/geometry/core/access.hpp>
- #include <boost/geometry/core/coordinate_dimension.hpp>
- #include <boost/geometry/core/tags.hpp>
- #include <boost/geometry/strategies/detail.hpp>
- namespace boost { namespace geometry
- {
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail { namespace disjoint
- {
- template
- <
- typename Point, typename Box, typename Strategy,
- std::enable_if_t<strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
- >
- inline bool disjoint_point_box(Point const& point, Box const& box,
- Strategy const& strategy)
- {
- typedef decltype(strategy.covered_by(point, box)) strategy_type;
-
- return ! strategy_type::apply(point, box);
- }
- template
- <
- typename Point, typename Box, typename Strategy,
- std::enable_if_t<! strategies::detail::is_umbrella_strategy<Strategy>::value, int> = 0
- >
- inline bool disjoint_point_box(Point const& point, Box const& box,
- Strategy const& )
- {
-
- return ! Strategy::apply(point, box);
- }
- }}
- #endif
- #ifndef DOXYGEN_NO_DISPATCH
- namespace dispatch
- {
- template <typename Point, typename Box, std::size_t DimensionCount>
- struct disjoint<Point, Box, DimensionCount, point_tag, box_tag, false>
- {
- template <typename Strategy>
- static inline bool apply(Point const& point, Box const& box,
- Strategy const& strategy)
- {
- typedef decltype(strategy.covered_by(point, box)) strategy_type;
-
- return ! strategy_type::apply(point, box);
- }
- };
- }
- #endif
- }}
- #endif
|