]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Geometry (aka GGL, Generic Geometry Library) |
2 | ||
3 | // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. | |
4 | ||
5 | // This file was modified by Oracle on 2016. | |
6 | // Modifications copyright (c) 2016, Oracle and/or its affiliates. | |
7 | // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle | |
8 | ||
9 | // Use, modification and distribution is subject to the Boost Software License, | |
10 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
11 | // http://www.boost.org/LICENSE_1_0.txt) | |
12 | ||
13 | #ifndef BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP | |
14 | #define BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP | |
15 | ||
16 | ||
17 | #include <boost/geometry/core/point_type.hpp> | |
18 | #include <boost/geometry/geometries/segment.hpp> | |
19 | ||
20 | #include <boost/geometry/policies/relate/intersection_points.hpp> | |
21 | #include <boost/geometry/policies/relate/direction.hpp> | |
22 | #include <boost/geometry/policies/relate/tupled.hpp> | |
23 | ||
24 | #include <boost/geometry/strategies/intersection.hpp> | |
25 | #include <boost/geometry/strategies/side.hpp> | |
26 | #include <boost/geometry/strategies/intersection_result.hpp> | |
27 | ||
28 | #include <boost/geometry/strategies/cartesian/cart_intersect.hpp> | |
29 | #include <boost/geometry/strategies/cartesian/side_by_triangle.hpp> | |
30 | #include <boost/geometry/strategies/spherical/intersection.hpp> | |
31 | #include <boost/geometry/strategies/spherical/ssf.hpp> | |
32 | ||
33 | #include <boost/geometry/policies/robustness/segment_ratio_type.hpp> | |
34 | ||
35 | ||
36 | namespace boost { namespace geometry | |
37 | { | |
38 | ||
39 | ||
40 | /*! | |
41 | \brief "compound strategy", containing a segment-intersection-strategy | |
42 | and a side-strategy | |
43 | */ | |
44 | template | |
45 | < | |
46 | typename Tag, | |
47 | typename Geometry1, | |
48 | typename Geometry2, | |
49 | typename IntersectionPoint, | |
50 | typename RobustPolicy, | |
51 | typename CalculationType = void | |
52 | > | |
53 | struct intersection_strategies | |
54 | { | |
55 | private : | |
56 | // for development BOOST_STATIC_ASSERT((! boost::is_same<RobustPolicy, void>::type::value)); | |
57 | ||
58 | typedef typename geometry::point_type<Geometry1>::type point1_type; | |
59 | typedef typename geometry::point_type<Geometry2>::type point2_type; | |
60 | typedef typename model::referring_segment<point1_type const> segment1_type; | |
61 | typedef typename model::referring_segment<point2_type const> segment2_type; | |
62 | ||
63 | typedef segment_intersection_points | |
64 | < | |
65 | IntersectionPoint, | |
66 | typename geometry::segment_ratio_type | |
67 | < | |
68 | IntersectionPoint, RobustPolicy | |
69 | >::type | |
70 | > ip_type; | |
71 | ||
72 | public: | |
73 | typedef typename strategy::intersection::services::default_strategy | |
74 | < | |
75 | Tag, | |
76 | policies::relate::segments_tupled | |
77 | < | |
78 | policies::relate::segments_intersection_points | |
79 | < | |
80 | ip_type | |
81 | > , | |
82 | policies::relate::segments_direction | |
83 | >, | |
84 | CalculationType | |
85 | >::type segment_intersection_strategy_type; | |
86 | ||
87 | typedef typename strategy::side::services::default_strategy | |
88 | < | |
89 | Tag, | |
90 | CalculationType | |
91 | >::type side_strategy_type; | |
92 | ||
93 | typedef RobustPolicy rescale_policy_type; | |
94 | }; | |
95 | ||
96 | ||
97 | }} // namespace boost::geometry | |
98 | ||
99 | ||
100 | #endif // BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP |