Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:50:18

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2017-2017 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
0005 
0006 // Use, modification and distribution is subject to the Boost Software License,
0007 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0008 // http://www.boost.org/LICENSE_1_0.txt)
0009 
0010 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_IS_SELF_TURN_HPP
0011 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_IS_SELF_TURN_HPP
0012 
0013 #include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
0014 
0015 namespace boost { namespace geometry
0016 {
0017 
0018 
0019 #ifndef DOXYGEN_NO_DETAIL
0020 namespace detail { namespace overlay
0021 {
0022 
0023 template <overlay_type OverlayType>
0024 struct is_self_turn_check
0025 {
0026     template <typename Turn>
0027     static inline bool apply(Turn const& turn)
0028     {
0029         return turn.is_self();
0030     }
0031 };
0032 
0033 template <>
0034 struct is_self_turn_check<overlay_buffer>
0035 {
0036     template <typename Turn>
0037     static inline bool apply(Turn const& /*turn*/)
0038     {
0039         return false;
0040     }
0041 };
0042 
0043 template <>
0044 struct is_self_turn_check<overlay_dissolve>
0045 {
0046     template <typename Turn>
0047     static inline bool apply(Turn const& /*turn*/)
0048     {
0049         return false;
0050     }
0051 };
0052 
0053 template <overlay_type OverlayType, typename Turn>
0054 bool is_self_turn(Turn const& turn)
0055 {
0056     return is_self_turn_check<OverlayType>::apply(turn);
0057 }
0058 
0059 
0060 }} // namespace detail::overlay
0061 #endif // DOXYGEN_NO_DETAIL
0062 
0063 
0064 }} // namespace boost::geometry
0065 
0066 
0067 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_IS_SELF_TURN_HPP