blob: cf06700306cd23c11ca8a4b49367600ad7c4200a [file] [log] [blame]
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_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
{
struct get_section_box
{
template <typename Box, typename Section>
static inline void apply(Box& total, Section const& section)
{
geometry::expand(total, section.bounding_box);
}
};
struct overlaps_section_box
{
template <typename Box, typename Section>
static inline bool apply(Box const& box, Section const& section)
{
return ! detail::disjoint::disjoint_box_box(box, section.bounding_box);
}
};
}} // namespace detail::section
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP