File indexing completed on 2025-12-16 09:50:02
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
0014 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
0015
0016
0017 #include <boost/geometry/core/coordinate_type.hpp>
0018 #include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
0019 #include <boost/geometry/algorithms/expand.hpp>
0020
0021
0022 namespace boost { namespace geometry
0023 {
0024
0025 #ifndef DOXYGEN_NO_DETAIL
0026 namespace detail { namespace section
0027 {
0028
0029 template <typename Strategy>
0030 struct get_section_box
0031 {
0032 get_section_box(Strategy const& strategy)
0033 : m_strategy(strategy)
0034 {}
0035
0036 template <typename Box, typename Section>
0037 inline void apply(Box& total, Section const& section) const
0038 {
0039 assert_coordinate_type_equal(total, section.bounding_box);
0040 geometry::expand(total, section.bounding_box, m_strategy);
0041 }
0042
0043 Strategy const& m_strategy;
0044 };
0045
0046 template <typename Strategy>
0047 struct overlaps_section_box
0048 {
0049 overlaps_section_box(Strategy const& strategy)
0050 : m_strategy(strategy)
0051 {}
0052
0053 template <typename Box, typename Section>
0054 inline bool apply(Box const& box, Section const& section) const
0055 {
0056 assert_coordinate_type_equal(box, section.bounding_box);
0057 return ! detail::disjoint::disjoint_box_box(box, section.bounding_box,
0058 m_strategy);
0059 }
0060
0061 Strategy const& m_strategy;
0062 };
0063
0064
0065 }}
0066 #endif
0067
0068
0069 }}
0070
0071 #endif