3 // Copyright (c) 2021, Oracle and/or its affiliates.
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
10 #ifndef BOOST_GEOMETRY_STRATEGY_SPHERICAL_ENVELOPE_BOXES_HPP
11 #define BOOST_GEOMETRY_STRATEGY_SPHERICAL_ENVELOPE_BOXES_HPP
15 #include <boost/geometry/algorithms/detail/envelope/initialize.hpp>
16 #include <boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp>
18 namespace boost { namespace geometry
21 namespace strategy { namespace envelope
27 template <typename Box>
30 friend spherical_boxes;
32 std::vector<Box> m_boxes;
35 template <typename Box>
36 static void apply(state<Box> & st, Box const& box)
38 st.m_boxes.push_back(box);
41 template <typename Box>
42 static void result(state<Box> const& st, Box & box)
44 if (! st.m_boxes.empty())
46 geometry::detail::envelope::envelope_range_of_boxes::apply(st.m_boxes, box);
50 geometry::detail::envelope::initialize<Box, 0, dimension<Box>::value>::apply(box);
55 }} // namespace strategy::envelope
57 }} //namepsace boost::geometry
59 #endif // BOOST_GEOMETRY_STRATEGY_SPHERICAL_ENVELOPE_BOXES_HPP