123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTS_INTERFACE_HPP
- #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTS_INTERFACE_HPP
- #include <boost/geometry/geometries/concepts/check.hpp>
- #include <boost/geometry/algorithms/detail/disjoint/interface.hpp>
- namespace boost { namespace geometry
- {
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail { namespace intersects
- {
- template <typename Geometry>
- struct self_intersects;
- }}
- #endif
- template <typename Geometry>
- inline bool intersects(Geometry const& geometry)
- {
- return detail::intersects::self_intersects<Geometry>::apply(geometry);
- }
- template <typename Geometry1, typename Geometry2, typename Strategy>
- inline bool intersects(Geometry1 const& geometry1,
- Geometry2 const& geometry2,
- Strategy const& strategy)
- {
- concepts::check<Geometry1 const>();
- concepts::check<Geometry2 const>();
- return ! geometry::disjoint(geometry1, geometry2, strategy);
- }
- template <typename Geometry1, typename Geometry2>
- inline bool intersects(Geometry1 const& geometry1, Geometry2 const& geometry2)
- {
- concepts::check<Geometry1 const>();
- concepts::check<Geometry2 const>();
- return ! geometry::disjoint(geometry1, geometry2);
- }
- }}
- #endif
|