Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:51

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
0005 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
0006 
0007 // This file was modified by Oracle on 2015, 2016, 2017, 2018.
0008 // Modifications copyright (c) 2015-2018, Oracle and/or its affiliates.
0009 
0010 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0011 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
0012 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0013 
0014 // Distributed under the Boost Software License, Version 1.0.
0015 // (See accompanying file LICENSE_1_0.txt or copy at
0016 // http://www.boost.org/LICENSE_1_0.txt)
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 }} // namespace detail::envelope
0069 #endif // DOXYGEN_NO_DETAIL
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 // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
0103 
0104 
0105 }} // namespace strategy::envelope
0106 
0107 
0108 }} // namespace boost::geometry
0109 
0110 
0111 #endif // BOOST_GEOMETRY_STRATEGY_CARTESIAN_ENVELOPE_POINT_HPP