File indexing completed on 2025-01-18 09:36:44
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_GEOMETRY_STRATEGIES_CONVEX_HULL_SPHERICAL_HPP
0012 #define BOOST_GEOMETRY_STRATEGIES_CONVEX_HULL_SPHERICAL_HPP
0013
0014
0015 #include <boost/geometry/strategies/convex_hull/services.hpp>
0016 #include <boost/geometry/strategies/compare.hpp>
0017 #include <boost/geometry/strategies/detail.hpp>
0018 #include <boost/geometry/strategies/spherical/point_in_point.hpp>
0019 #include <boost/geometry/strategies/spherical/ssf.hpp>
0020
0021 #include <boost/geometry/util/type_traits.hpp>
0022
0023
0024 namespace boost { namespace geometry
0025 {
0026
0027 namespace strategies { namespace convex_hull
0028 {
0029
0030 template <typename CalculationType = void>
0031 class spherical : public strategies::detail::spherical_base<void>
0032 {
0033 public:
0034 template <typename Geometry1, typename Geometry2>
0035 static auto relate(Geometry1 const&, Geometry2 const&,
0036 std::enable_if_t
0037 <
0038 util::is_pointlike<Geometry1>::value
0039 && util::is_pointlike<Geometry2>::value
0040 > * = nullptr)
0041 {
0042 return strategy::within::spherical_point_point();
0043 }
0044
0045 static auto side()
0046 {
0047 return strategy::side::spherical_side_formula<CalculationType>();
0048 }
0049
0050 template <typename ComparePolicy, typename EqualsPolicy>
0051 using compare_type = typename strategy::compare::spherical
0052 <
0053 ComparePolicy,
0054 EqualsPolicy,
0055 -1
0056 >;
0057 };
0058
0059 namespace services
0060 {
0061
0062 template <typename Geometry>
0063 struct default_strategy<Geometry, spherical_equatorial_tag>
0064 {
0065 using type = strategies::convex_hull::spherical<>;
0066 };
0067
0068 }
0069
0070 }}
0071
0072 }}
0073
0074 #endif