intersection_strategies.hpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  3. // This file was modified by Oracle on 2016-2024.
  4. // Modifications copyright (c) 2016-2024, Oracle and/or its affiliates.
  5. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
  6. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  7. // Use, modification and distribution is subject to the Boost Software License,
  8. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
  11. #define BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
  12. //#include <type_traits>
  13. #include <boost/geometry/policies/relate/intersection_policy.hpp>
  14. #include <boost/geometry/strategies/intersection.hpp>
  15. #include <boost/geometry/strategies/intersection_result.hpp>
  16. #include <boost/geometry/strategies/side.hpp>
  17. #include <boost/geometry/strategies/cartesian/intersection.hpp>
  18. #include <boost/geometry/strategies/spherical/intersection.hpp>
  19. #include <boost/geometry/strategies/spherical/ssf.hpp>
  20. namespace boost { namespace geometry
  21. {
  22. /*!
  23. \brief "compound strategy", containing a segment-intersection-strategy
  24. and a side-strategy
  25. */
  26. template
  27. <
  28. typename Tag,
  29. typename Geometry1,
  30. typename Geometry2,
  31. typename IntersectionPoint,
  32. typename CalculationType = void
  33. >
  34. struct intersection_strategies
  35. {
  36. private :
  37. typedef segment_intersection_points
  38. <
  39. IntersectionPoint,
  40. typename segment_ratio_type<IntersectionPoint>::type
  41. > ip_type;
  42. public:
  43. typedef policies::relate::segments_intersection_policy
  44. <
  45. ip_type
  46. > intersection_policy_type;
  47. typedef typename strategy::intersection::services::default_strategy
  48. <
  49. Tag,
  50. CalculationType
  51. >::type segment_intersection_strategy_type;
  52. };
  53. }} // namespace boost::geometry
  54. #endif // BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP