File indexing completed on 2025-01-18 09:35:06
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 #include <boost/geometry/policies/robustness/no_rescale_policy.hpp>
0032
0033 #include <boost/geometry/strategies/relate/services.hpp>
0034
0035
0036 namespace boost { namespace geometry
0037 {
0038
0039 #ifndef DOXYGEN_NO_DETAIL
0040 namespace detail { namespace intersects
0041 {
0042
0043 template <typename Geometry>
0044 struct self_intersects
0045 {
0046 static bool apply(Geometry const& geometry)
0047 {
0048 concepts::check<Geometry const>();
0049
0050 typedef typename geometry::point_type<Geometry>::type point_type;
0051 typedef typename strategies::relate::services::default_strategy
0052 <
0053 Geometry, Geometry
0054 >::type strategy_type;
0055
0056 typedef detail::overlay::turn_info<point_type> turn_info;
0057
0058 std::deque<turn_info> turns;
0059
0060 typedef detail::overlay::get_turn_info
0061 <
0062 detail::overlay::assign_null_policy
0063 > turn_policy;
0064
0065 strategy_type strategy;
0066
0067 detail::disjoint::disjoint_interrupt_policy policy;
0068
0069 detail::self_get_turn_points::get_turns
0070 <
0071 false, turn_policy
0072 >::apply(geometry, strategy, detail::no_rescale_policy(), turns, policy, 0, true);
0073 return policy.has_intersections;
0074 }
0075 };
0076
0077 }}
0078 #endif
0079
0080 }}
0081
0082 #endif