1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
- #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
- #include <boost/geometry/core/coordinate_type.hpp>
- #include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
- #include <boost/geometry/algorithms/expand.hpp>
- namespace boost { namespace geometry
- {
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail { namespace section
- {
- template <typename Strategy>
- struct get_section_box
- {
- get_section_box(Strategy const& strategy)
- : m_strategy(strategy)
- {}
- template <typename Box, typename Section>
- inline void apply(Box& total, Section const& section) const
- {
- assert_coordinate_type_equal(total, section.bounding_box);
- geometry::expand(total, section.bounding_box, m_strategy);
- }
- Strategy const& m_strategy;
- };
- template <typename Strategy>
- struct overlaps_section_box
- {
- overlaps_section_box(Strategy const& strategy)
- : m_strategy(strategy)
- {}
- template <typename Box, typename Section>
- inline bool apply(Box const& box, Section const& section) const
- {
- assert_coordinate_type_equal(box, section.bounding_box);
- return ! detail::disjoint::disjoint_box_box(box, section.bounding_box,
- m_strategy);
- }
- Strategy const& m_strategy;
- };
- }}
- #endif
- }}
- #endif
|