File indexing completed on 2025-09-13 08:36:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef BOOST_GEOMETRY_STRATEGY_AGNOSTIC_POINT_IN_POLY_WINDING_HPP
0018 #define BOOST_GEOMETRY_STRATEGY_AGNOSTIC_POINT_IN_POLY_WINDING_HPP
0019
0020
0021 #include <boost/geometry/core/cs.hpp>
0022 #include <boost/geometry/core/static_assert.hpp>
0023 #include <boost/geometry/core/tag_cast.hpp>
0024 #include <boost/geometry/core/tags.hpp>
0025
0026 #include <boost/geometry/strategies/cartesian/point_in_poly_winding.hpp>
0027 #include <boost/geometry/strategies/side.hpp>
0028 #include <boost/geometry/strategies/spherical/point_in_poly_winding.hpp>
0029
0030
0031 namespace boost { namespace geometry
0032 {
0033
0034 namespace strategy { namespace within
0035 {
0036
0037
0038 #ifndef DOXYGEN_NO_DETAIL
0039 namespace detail
0040 {
0041
0042
0043 template
0044 <
0045 typename Point,
0046 typename PointOfSegment,
0047 typename CalculationType,
0048 typename CSTag = tag_cast_t<cs_tag_t<Point>, spherical_tag>
0049 >
0050 struct winding_base_type
0051 {
0052 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
0053 "Not implemented for this coordinate system.",
0054 Point, PointOfSegment, CSTag);
0055 };
0056
0057 template <typename Point, typename PointOfSegment, typename CalculationType>
0058 struct winding_base_type<Point, PointOfSegment, CalculationType, cartesian_tag>
0059 {
0060 using type = within::detail::cartesian_winding_base
0061 <
0062 typename strategy::side::services::default_strategy
0063 <
0064 cs_tag_t<Point>
0065 >::type,
0066 CalculationType
0067 >;
0068 };
0069
0070 template <typename Point, typename PointOfSegment, typename CalculationType>
0071 struct winding_base_type<Point, PointOfSegment, CalculationType, spherical_tag>
0072 {
0073 using type = within::detail::spherical_winding_base
0074 <
0075 typename strategy::side::services::default_strategy<cs_tag_t<Point>>::type,
0076 CalculationType
0077 >;
0078 };
0079
0080
0081 }
0082 #endif
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098 template
0099 <
0100 typename Point,
0101 typename PointOfSegment = Point,
0102 typename CalculationType = void
0103 >
0104 class winding
0105 : public within::detail::winding_base_type
0106 <
0107 Point, PointOfSegment, CalculationType
0108 >::type
0109 {
0110 typedef typename within::detail::winding_base_type
0111 <
0112 Point, PointOfSegment, CalculationType
0113 >::type base_t;
0114
0115 public:
0116 winding() {}
0117
0118 template <typename Model>
0119 explicit winding(Model const& model)
0120 : base_t(model)
0121 {}
0122 };
0123
0124
0125 }}
0126
0127
0128 }}
0129
0130
0131 #endif