• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
4 
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 
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 
28 template <typename ExpandBoxStrategy>
29 struct get_section_box
30 {
31     template <typename Box, typename Section>
applyboost::geometry::detail::section::get_section_box32     static inline void apply(Box& total, Section const& section)
33     {
34         geometry::expand(total, section.bounding_box,
35                          ExpandBoxStrategy());
36     }
37 };
38 
39 template <typename DisjointBoxBoxStrategy>
40 struct overlaps_section_box
41 {
42     template <typename Box, typename Section>
applyboost::geometry::detail::section::overlaps_section_box43     static inline bool apply(Box const& box, Section const& section)
44     {
45         return ! detail::disjoint::disjoint_box_box(box, section.bounding_box,
46                                                     DisjointBoxBoxStrategy());
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
58