1 // Boost.Geometry Index
3 // boxes union/sum area/volume
5 // Copyright (c) 2008 Federico J. Fernandez.
6 // Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
8 // Use, modification and distribution is subject to the Boost Software License,
9 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_UNION_CONTENT_HPP
13 #define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_UNION_CONTENT_HPP
15 #include <boost/geometry/algorithms/expand.hpp>
16 #include <boost/geometry/index/detail/algorithms/content.hpp>
18 namespace boost { namespace geometry { namespace index { namespace detail {
21 * \brief Compute the area of the union of b1 and b2
23 template <typename Box, typename Geometry>
24 inline typename default_content_result<Box>::type union_content(Box const& b, Geometry const& g)
27 geometry::expand(expanded_box, g);
28 return detail::content(expanded_box);
31 }}}} // namespace boost::geometry::index::detail
33 #endif // BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_UNION_CONTENT_HPP