]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Geometry (aka GGL, Generic Geometry Library) |
2 | ||
3 | // Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands. | |
4 | ||
92f5a8d4 TL |
5 | // This file was modified by Oracle on 2018. |
6 | // Modifications copyright (c) 2018, Oracle and/or its affiliates. | |
7 | // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle | |
8 | ||
7c673cae FG |
9 | // Use, modification and distribution is subject to the Boost Software License, |
10 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
11 | // http://www.boost.org/LICENSE_1_0.txt) | |
12 | ||
13 | #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP | |
14 | #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP | |
15 | ||
16 | ||
17 | #include <boost/geometry/algorithms/detail/disjoint/box_box.hpp> | |
18 | #include <boost/geometry/algorithms/expand.hpp> | |
19 | ||
20 | ||
21 | namespace boost { namespace geometry | |
22 | { | |
23 | ||
24 | #ifndef DOXYGEN_NO_DETAIL | |
25 | namespace detail { namespace section | |
26 | { | |
27 | ||
92f5a8d4 | 28 | template <typename ExpandBoxStrategy> |
7c673cae FG |
29 | struct get_section_box |
30 | { | |
31 | template <typename Box, typename Section> | |
32 | static inline void apply(Box& total, Section const& section) | |
33 | { | |
92f5a8d4 TL |
34 | geometry::expand(total, section.bounding_box, |
35 | ExpandBoxStrategy()); | |
7c673cae FG |
36 | } |
37 | }; | |
38 | ||
92f5a8d4 | 39 | template <typename DisjointBoxBoxStrategy> |
7c673cae FG |
40 | struct overlaps_section_box |
41 | { | |
42 | template <typename Box, typename Section> | |
43 | static inline bool apply(Box const& box, Section const& section) | |
44 | { | |
92f5a8d4 TL |
45 | return ! detail::disjoint::disjoint_box_box(box, section.bounding_box, |
46 | DisjointBoxBoxStrategy()); | |
7c673cae FG |
47 | } |
48 | }; | |
49 | ||
50 | ||
51 | }} // namespace detail::section | |
52 | #endif | |
53 | ||
54 | ||
55 | }} // namespace boost::geometry | |
56 | ||
57 | #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP |