]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/strategies/convex_hull/spherical.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / strategies / convex_hull / spherical.hpp
1 // Boost.Geometry
2
3 // Copyright (c) 2020-2021, Oracle and/or its affiliates.
4
5 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
6 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7
8 // Licensed under the Boost Software License version 1.0.
9 // http://www.boost.org/users/license.html
10
11 #ifndef BOOST_GEOMETRY_STRATEGIES_CONVEX_HULL_SPHERICAL_HPP
12 #define BOOST_GEOMETRY_STRATEGIES_CONVEX_HULL_SPHERICAL_HPP
13
14
15 #include <boost/geometry/strategies/convex_hull/services.hpp>
16 #include <boost/geometry/strategies/detail.hpp>
17 #include <boost/geometry/strategies/spherical/point_in_point.hpp>
18 #include <boost/geometry/strategies/spherical/ssf.hpp>
19 #include <boost/geometry/util/type_traits.hpp>
20
21
22 namespace boost { namespace geometry
23 {
24
25 namespace strategies { namespace convex_hull
26 {
27
28 template <typename CalculationType = void>
29 class spherical : public strategies::detail::spherical_base<void>
30 {
31 public:
32 template <typename Geometry1, typename Geometry2>
33 static auto relate(Geometry1 const&, Geometry2 const&,
34 std::enable_if_t
35 <
36 util::is_pointlike<Geometry1>::value
37 && util::is_pointlike<Geometry2>::value
38 > * = nullptr)
39 {
40 return strategy::within::spherical_point_point();
41 }
42
43 static auto side()
44 {
45 return strategy::side::spherical_side_formula<CalculationType>();
46 }
47 };
48
49 namespace services
50 {
51
52 template <typename Geometry>
53 struct default_strategy<Geometry, spherical_equatorial_tag>
54 {
55 using type = strategies::convex_hull::spherical<>;
56 };
57
58 } // namespace services
59
60 }} // namespace strategies::convex_hull
61
62 }} // namespace boost::geometry
63
64 #endif // BOOST_GEOMETRY_STRATEGIES_CONVEX_HULL_SPHERICAL_HPP