File indexing completed on 2025-01-18 09:36:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_GEOMETRY_STRATEGIES_LINE_INTERPOLATE_CARTESIAN_HPP
0011 #define BOOST_GEOMETRY_STRATEGIES_LINE_INTERPOLATE_CARTESIAN_HPP
0012
0013
0014 #include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
0015 #include <boost/geometry/strategies/cartesian/line_interpolate.hpp>
0016
0017 #include <boost/geometry/strategies/detail.hpp>
0018 #include <boost/geometry/strategies/distance/detail.hpp>
0019 #include <boost/geometry/strategies/line_interpolate/services.hpp>
0020
0021 #include <boost/geometry/util/type_traits.hpp>
0022
0023
0024 namespace boost { namespace geometry
0025 {
0026
0027 namespace strategies { namespace line_interpolate
0028 {
0029
0030 template <typename CalculationType = void>
0031 struct cartesian
0032 : public strategies::detail::cartesian_base
0033 {
0034 template <typename Geometry1, typename Geometry2>
0035 static auto distance(Geometry1 const&, Geometry2 const&,
0036 distance::detail::enable_if_pp_t<Geometry1, Geometry2> * = nullptr)
0037 {
0038 return strategy::distance::pythagoras<CalculationType>();
0039 }
0040
0041 template <typename Geometry>
0042 static auto line_interpolate(Geometry const&)
0043 {
0044 return strategy::line_interpolate::cartesian<CalculationType>();
0045 }
0046 };
0047
0048
0049 namespace services
0050 {
0051
0052 template <typename Geometry>
0053 struct default_strategy<Geometry, cartesian_tag>
0054 {
0055 using type = strategies::line_interpolate::cartesian<>;
0056 };
0057
0058
0059 template <typename CT, typename DS>
0060 struct strategy_converter<strategy::line_interpolate::cartesian<CT, DS> >
0061 {
0062 static auto get(strategy::line_interpolate::cartesian<CT, DS> const&)
0063 {
0064 return strategies::line_interpolate::cartesian<CT>();
0065 }
0066 };
0067
0068
0069 }
0070
0071 }}
0072
0073 }}
0074
0075 #endif