Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-21 08:45:50

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2025 Barend Gehrels, Amsterdam, the Netherlands.
0004 
0005 // Use, modification and distribution is subject to the Boost Software License,
0006 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_ASSIGN_SIDE_COUNTS_HPP
0010 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_ASSIGN_SIDE_COUNTS_HPP
0011 
0012 #include <boost/geometry/algorithms/detail/overlay/graph/assign_counts.hpp>
0013 #include <boost/geometry/algorithms/detail/overlay/graph/assign_clustered_counts.hpp>
0014 #include <boost/geometry/algorithms/detail/overlay/handle_self_turns.hpp>
0015 
0016 namespace boost { namespace geometry
0017 {
0018 
0019 #ifndef DOXYGEN_NO_DETAIL
0020 namespace detail { namespace overlay
0021 {
0022 
0023 template
0024 <
0025     bool Reverse1,
0026     bool Reverse2,
0027     overlay_type OverlayType,
0028     typename Geometry1,
0029     typename Geometry2,
0030     typename Turns,
0031     typename Clusters,
0032     typename IntersectionStrategy,
0033     typename Visitor
0034 >
0035 void assign_side_counts(Geometry1 const& geometry1, Geometry2 const& geometry2,
0036         Turns& turns, Clusters& clusters,
0037         IntersectionStrategy const& intersection_strategy, Visitor& visitor)
0038 {
0039     clustered_count_handler
0040         <
0041             Reverse1, Reverse2, OverlayType,
0042             Geometry1, Geometry2,
0043             Turns, Clusters,
0044             IntersectionStrategy
0045         > processor(geometry1, geometry2, turns, clusters, intersection_strategy);
0046 
0047     processor.apply(visitor);
0048 
0049     if (OverlayType != overlay_buffer)
0050     {
0051         // Increase right-count for self-intersections. This should not be called for buffers
0052         // (for buffers, all is self-cluster)
0053         assign_clustered_self_counts(turns, clusters);
0054     }
0055     assign_unclustered_counts(turns);
0056 }
0057 
0058 }} // namespace detail::overlay
0059 #endif // DOXYGEN_NO_DETAIL
0060 
0061 }} // namespace boost::geometry
0062 
0063 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_ASSIGN_SIDE_COUNTS_HPP