Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:47

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2019-2020, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0006 
0007 // Licensed under the Boost Software License version 1.0.
0008 // http://www.boost.org/users/license.html
0009 
0010 #ifndef BOOST_GEOMETRY_STRATEGIES_IO_CARTESIAN_HPP
0011 #define BOOST_GEOMETRY_STRATEGIES_IO_CARTESIAN_HPP
0012 
0013 
0014 #include <boost/geometry/strategies/detail.hpp>
0015 #include <boost/geometry/strategies/io/services.hpp>
0016 
0017 #include <boost/geometry/strategies/cartesian/point_order.hpp>
0018 #include <boost/geometry/strategies/cartesian/point_in_point.hpp>
0019 #include <boost/geometry/strategies/cartesian/point_in_poly_winding.hpp>
0020 
0021 
0022 namespace boost { namespace geometry
0023 {
0024 
0025 namespace strategies { namespace io
0026 {
0027 
0028 template <typename CalculationType = void>
0029 class cartesian
0030     : public strategies::detail::cartesian_base
0031 {
0032 public:
0033     static auto point_order()
0034     {
0035         return strategy::point_order::cartesian<CalculationType>();
0036     }
0037 
0038     template <typename Geometry1, typename Geometry2>
0039     static auto relate(Geometry1 const&, Geometry2 const&,
0040                        std::enable_if_t
0041                             <
0042                                 util::is_pointlike<Geometry1>::value
0043                              && util::is_pointlike<Geometry2>::value
0044                             > * = nullptr)
0045     {
0046         return strategy::within::cartesian_point_point();
0047     }
0048 
0049     template <typename Geometry1, typename Geometry2>
0050     static auto relate(Geometry1 const&, Geometry2 const&,
0051                        std::enable_if_t
0052                             <
0053                                 util::is_pointlike<Geometry1>::value
0054                              && ( util::is_linear<Geometry2>::value
0055                                || util::is_polygonal<Geometry2>::value )
0056                             > * = nullptr)
0057     {
0058         return strategy::within::cartesian_winding<void, void, CalculationType>();
0059     }
0060 };
0061 
0062 namespace services
0063 {
0064 
0065 template <typename Geometry>
0066 struct default_strategy<Geometry, cartesian_tag>
0067 {
0068     typedef cartesian<> type;
0069 };
0070 
0071 } // namespace services
0072 
0073 }} // namespace strategies::io
0074 
0075 }} // namespace boost::geometry
0076 
0077 #endif // BOOST_GEOMETRY_STRATEGIES_IO_CARTESIAN_HPP