1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
5 // Use, modification and distribution is subject to the Boost Software License,
6 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #ifndef BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
10 #define BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
12 #include <boost/geometry/core/point_type.hpp>
13 #include <boost/geometry/geometries/segment.hpp>
15 #include <boost/geometry/policies/relate/intersection_points.hpp>
16 #include <boost/geometry/policies/relate/direction.hpp>
17 #include <boost/geometry/policies/relate/tupled.hpp>
19 #include <boost/geometry/strategies/side.hpp>
20 #include <boost/geometry/strategies/intersection.hpp>
21 #include <boost/geometry/strategies/intersection_result.hpp>
23 #include <boost/geometry/strategies/cartesian/cart_intersect.hpp>
26 namespace boost { namespace geometry
30 // The intersection strategy is a "compound strategy",
31 // it contains a segment-intersection-strategy
32 // and a side-strategy
34 \tparam CalculationType \tparam_calculation
41 typename IntersectionPoint,
42 typename CalculationType = void
44 struct strategy_intersection
47 typedef typename geometry::point_type<Geometry1>::type point1_type;
48 typedef typename geometry::point_type<Geometry2>::type point2_type;
49 typedef typename model::referring_segment<point1_type const> segment1_type;
50 typedef typename model::referring_segment<point2_type const> segment2_type;
52 typedef segment_intersection_points
58 typedef strategy::intersection::relate_cartesian_segments
60 policies::relate::segments_tupled
62 policies::relate::segments_intersection_points
69 policies::relate::segments_direction
78 > segment_intersection_strategy_type;
80 typedef typename strategy::side::services::default_strategy
84 >::type side_strategy_type;
90 }} // namespace boost::geometry
93 #endif // BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP