Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:29

0001 // Boost.Geometry Index
0002 //
0003 // boxes union/sum area/volume
0004 //
0005 // Copyright (c) 2008 Federico J. Fernandez.
0006 // Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
0007 //
0008 // Use, modification and distribution is subject to the Boost Software License,
0009 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 
0012 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_UNION_CONTENT_HPP
0013 #define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_UNION_CONTENT_HPP
0014 
0015 #include <boost/geometry/algorithms/expand.hpp>
0016 #include <boost/geometry/index/detail/algorithms/content.hpp>
0017 
0018 namespace boost { namespace geometry { namespace index { namespace detail {
0019 
0020 /**
0021  * \brief Compute the area of the union of b1 and b2
0022  */
0023 template <typename Box, typename Geometry>
0024 inline typename default_content_result<Box>::type union_content(Box const& b, Geometry const& g)
0025 {
0026     Box expanded_box(b);
0027     geometry::expand(expanded_box, g);
0028     return detail::content(expanded_box);
0029 }
0030 
0031 }}}} // namespace boost::geometry::index::detail
0032 
0033 #endif // BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_UNION_CONTENT_HPP