1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2017-2018 Oracle and/or its affiliates.
4 // Contributed and/or modified by Vissarion Fisikopoulos, on behalf of Oracle
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7 // Use, modification and distribution is subject to the Boost Software License,
8 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_GEOMETRY_STRATEGY_CARTESIAN_ENVELOPE_SEGMENT_HPP
12 #define BOOST_GEOMETRY_STRATEGY_CARTESIAN_ENVELOPE_SEGMENT_HPP
16 #include <boost/geometry/core/coordinate_dimension.hpp>
17 #include <boost/geometry/core/tags.hpp>
19 #include <boost/geometry/strategy/cartesian/envelope_point.hpp>
20 #include <boost/geometry/strategy/cartesian/expand_point.hpp>
21 #include <boost/geometry/strategy/envelope.hpp>
23 namespace boost { namespace geometry { namespace strategy { namespace envelope
26 #ifndef DOXYGEN_NO_DETAIL
30 template <std::size_t Dimension, std::size_t DimensionCount>
31 struct envelope_one_segment
33 template<typename Point, typename Box>
34 static inline void apply(Point const& p1,
38 geometry::detail::envelope::envelope_one_point
40 Dimension, DimensionCount
43 strategy::expand::detail::point_loop
45 Dimension, DimensionCount
51 #endif // DOXYGEN_NO_DETAIL
56 typename CalculationType = void
58 class cartesian_segment
61 template <typename Point, typename Box>
62 static inline void apply(Point const& point1, Point const& point2, Box& box)
64 strategy::envelope::detail::envelope_one_segment
67 dimension<Point>::value
68 >::apply(point1, point2, box);
73 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
78 template <typename CalculationType>
79 struct default_strategy<segment_tag, cartesian_tag, CalculationType>
81 typedef strategy::envelope::cartesian_segment<CalculationType> type;
86 #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
89 }} // namespace strategy::envelope
91 }} //namepsace boost::geometry
93 #endif // BOOST_GEOMETRY_STRATEGY_CARTESIAN_ENVELOPE_SEGMENT_HPP