File indexing completed on 2025-01-18 09:36:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_GEOMETRY_STRATEGY_CARTESIAN_ENVELOPE_POINT_HPP
0019 #define BOOST_GEOMETRY_STRATEGY_CARTESIAN_ENVELOPE_POINT_HPP
0020
0021 #include <cstddef>
0022
0023 #include <boost/geometry/core/access.hpp>
0024 #include <boost/geometry/core/cs.hpp>
0025 #include <boost/geometry/core/coordinate_dimension.hpp>
0026 #include <boost/geometry/core/coordinate_system.hpp>
0027 #include <boost/geometry/core/tags.hpp>
0028
0029 #include <boost/geometry/views/detail/indexed_point_view.hpp>
0030
0031 #include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
0032
0033 #include <boost/geometry/strategy/envelope.hpp>
0034
0035
0036 namespace boost { namespace geometry
0037 {
0038
0039 #ifndef DOXYGEN_NO_DETAIL
0040 namespace detail { namespace envelope
0041 {
0042
0043 template <std::size_t Dimension, std::size_t DimensionCount>
0044 struct envelope_one_point
0045 {
0046 template <std::size_t Index, typename Point, typename Box>
0047 static inline void apply(Point const& point, Box& mbr)
0048 {
0049 detail::indexed_point_view<Box, Index> box_corner(mbr);
0050 detail::conversion::point_to_point
0051 <
0052 Point,
0053 detail::indexed_point_view<Box, Index>,
0054 Dimension,
0055 DimensionCount
0056 >::apply(point, box_corner);
0057 }
0058
0059 template <typename Point, typename Box>
0060 static inline void apply(Point const& point, Box& mbr)
0061 {
0062 apply<min_corner>(point, mbr);
0063 apply<max_corner>(point, mbr);
0064 }
0065 };
0066
0067
0068 }}
0069 #endif
0070
0071
0072 namespace strategy { namespace envelope
0073 {
0074
0075 struct cartesian_point
0076 {
0077 template <typename Point, typename Box>
0078 static inline void apply(Point const& point, Box& mbr)
0079 {
0080 geometry::detail::envelope::envelope_one_point
0081 <
0082 0, dimension<Point>::value
0083 >::apply(point, mbr);
0084 }
0085 };
0086
0087
0088 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
0089
0090 namespace services
0091 {
0092
0093 template <typename CalculationType>
0094 struct default_strategy<point_tag, cartesian_tag, CalculationType>
0095 {
0096 typedef strategy::envelope::cartesian_point type;
0097 };
0098
0099
0100 }
0101
0102 #endif
0103
0104
0105 }}
0106
0107
0108 }}
0109
0110
0111 #endif