File indexing completed on 2025-09-17 08:30:32
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTS_IMPLEMENTATION_HPP
0021 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTS_IMPLEMENTATION_HPP
0022
0023
0024 #include <deque>
0025
0026 #include <boost/geometry/algorithms/detail/intersects/interface.hpp>
0027 #include <boost/geometry/algorithms/detail/disjoint/implementation.hpp>
0028
0029 #include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
0030 #include <boost/geometry/policies/disjoint_interrupt_policy.hpp>
0031
0032 #include <boost/geometry/strategies/relate/services.hpp>
0033
0034
0035 namespace boost { namespace geometry
0036 {
0037
0038 #ifndef DOXYGEN_NO_DETAIL
0039 namespace detail { namespace intersects
0040 {
0041
0042 template <typename Geometry>
0043 struct self_intersects
0044 {
0045 static bool apply(Geometry const& geometry)
0046 {
0047 concepts::check<Geometry const>();
0048
0049 using point_type = geometry::point_type_t<Geometry>;
0050 using strategy_type = typename strategies::relate::services::default_strategy
0051 <
0052 Geometry, Geometry
0053 >::type;
0054
0055 using turn_info = detail::overlay::turn_info<point_type>;
0056
0057 std::deque<turn_info> turns;
0058
0059 using turn_policy = detail::overlay::get_turn_info
0060 <
0061 detail::overlay::assign_null_policy
0062 >;
0063
0064 strategy_type strategy;
0065
0066 detail::disjoint::disjoint_interrupt_policy policy;
0067
0068 detail::self_get_turn_points::get_turns
0069 <
0070 false, turn_policy
0071 >::apply(geometry, strategy, turns, policy, 0, true);
0072 return policy.has_intersections;
0073 }
0074 };
0075
0076 }}
0077 #endif
0078
0079 }}
0080
0081 #endif