12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTS_IMPLEMENTATION_HPP
- #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTS_IMPLEMENTATION_HPP
- #include <deque>
- #include <boost/geometry/algorithms/detail/intersects/interface.hpp>
- #include <boost/geometry/algorithms/detail/disjoint/implementation.hpp>
- #include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
- #include <boost/geometry/policies/disjoint_interrupt_policy.hpp>
- #include <boost/geometry/policies/robustness/no_rescale_policy.hpp>
- #include <boost/geometry/strategies/relate/services.hpp>
- namespace boost { namespace geometry
- {
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail { namespace intersects
- {
- template <typename Geometry>
- struct self_intersects
- {
- static bool apply(Geometry const& geometry)
- {
- concepts::check<Geometry const>();
- typedef typename geometry::point_type<Geometry>::type point_type;
- typedef typename strategies::relate::services::default_strategy
- <
- Geometry, Geometry
- >::type strategy_type;
- typedef detail::overlay::turn_info<point_type> turn_info;
- std::deque<turn_info> turns;
- typedef detail::overlay::get_turn_info
- <
- detail::overlay::assign_null_policy
- > turn_policy;
- strategy_type strategy;
- detail::disjoint::disjoint_interrupt_policy policy;
-
- detail::self_get_turn_points::get_turns
- <
- false, turn_policy
- >::apply(geometry, strategy, detail::no_rescale_policy(), turns, policy, 0, true);
- return policy.has_intersections;
- }
- };
- }}
- #endif
- }}
- #endif
|