]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/algorithms/detail/sections/section_box_policies.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / sections / section_box_policies.hpp
CommitLineData
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
20effc67 17#include <boost/geometry/core/coordinate_type.hpp>
7c673cae
FG
18#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
19#include <boost/geometry/algorithms/expand.hpp>
20
21
22namespace boost { namespace geometry
23{
24
25#ifndef DOXYGEN_NO_DETAIL
26namespace detail { namespace section
27{
28
92f5a8d4 29template <typename ExpandBoxStrategy>
7c673cae
FG
30struct get_section_box
31{
32 template <typename Box, typename Section>
33 static inline void apply(Box& total, Section const& section)
34 {
20effc67 35 assert_coordinate_type_equal(total, section.bounding_box);
92f5a8d4
TL
36 geometry::expand(total, section.bounding_box,
37 ExpandBoxStrategy());
7c673cae
FG
38 }
39};
40
92f5a8d4 41template <typename DisjointBoxBoxStrategy>
7c673cae
FG
42struct overlaps_section_box
43{
44 template <typename Box, typename Section>
45 static inline bool apply(Box const& box, Section const& section)
46 {
20effc67 47 assert_coordinate_type_equal(box, section.bounding_box);
92f5a8d4
TL
48 return ! detail::disjoint::disjoint_box_box(box, section.bounding_box,
49 DisjointBoxBoxStrategy());
7c673cae
FG
50 }
51};
52
53
54}} // namespace detail::section
55#endif
56
57
58}} // namespace boost::geometry
59
60#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP