1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
4 
5 // Use, modification and distribution is subject to the Boost Software License,
6 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 
9 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
10 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
11 
12 
13 #include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
14 #include <boost/geometry/algorithms/expand.hpp>
15 
16 
17 namespace boost { namespace geometry
18 {
19 
20 #ifndef DOXYGEN_NO_DETAIL
21 namespace detail { namespace section
22 {
23 
24 struct get_section_box
25 {
26     template <typename Box, typename Section>
applyboost::geometry::detail::section::get_section_box27     static inline void apply(Box& total, Section const& section)
28     {
29         geometry::expand(total, section.bounding_box);
30     }
31 };
32 
33 struct overlaps_section_box
34 {
35     template <typename Box, typename Section>
applyboost::geometry::detail::section::overlaps_section_box36     static inline bool apply(Box const& box, Section const& section)
37     {
38         return ! detail::disjoint::disjoint_box_box(box, section.bounding_box);
39     }
40 };
41 
42 
43 }} // namespace detail::section
44 #endif
45 
46 
47 }} // namespace boost::geometry
48 
49 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
50