File indexing completed on 2025-01-18 09:36:41
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 = typename tag_cast
0049 <
0050 typename cs_tag<Point>::type,
0051 spherical_tag
0052 >::type
0053 >
0054 struct winding_base_type
0055 {
0056 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
0057 "Not implemented for this coordinate system.",
0058 Point, PointOfSegment, CSTag);
0059 };
0060
0061 template <typename Point, typename PointOfSegment, typename CalculationType>
0062 struct winding_base_type<Point, PointOfSegment, CalculationType, cartesian_tag>
0063 {
0064 using type = within::detail::cartesian_winding_base
0065 <
0066 typename strategy::side::services::default_strategy
0067 <
0068 typename cs_tag<Point>::type
0069 >::type,
0070 CalculationType
0071 >;
0072 };
0073
0074 template <typename Point, typename PointOfSegment, typename CalculationType>
0075 struct winding_base_type<Point, PointOfSegment, CalculationType, spherical_tag>
0076 {
0077 using type = within::detail::spherical_winding_base
0078 <
0079 typename strategy::side::services::default_strategy
0080 <
0081 typename cs_tag<Point>::type
0082 >::type,
0083 CalculationType
0084 >;
0085 };
0086
0087
0088 }
0089 #endif
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105 template
0106 <
0107 typename Point,
0108 typename PointOfSegment = Point,
0109 typename CalculationType = void
0110 >
0111 class winding
0112 : public within::detail::winding_base_type
0113 <
0114 Point, PointOfSegment, CalculationType
0115 >::type
0116 {
0117 typedef typename within::detail::winding_base_type
0118 <
0119 Point, PointOfSegment, CalculationType
0120 >::type base_t;
0121
0122 public:
0123 winding() {}
0124
0125 template <typename Model>
0126 explicit winding(Model const& model)
0127 : base_t(model)
0128 {}
0129 };
0130
0131
0132 }}
0133
0134
0135 }}
0136
0137
0138 #endif