Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:49:55

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2012 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_ENRICHMENT_INFO_HPP
0010 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_ENRICHMENT_INFO_HPP
0011 
0012 #include <boost/geometry/algorithms/detail/signed_size_type.hpp>
0013 
0014 
0015 namespace boost { namespace geometry
0016 {
0017 
0018 
0019 #ifndef DOXYGEN_NO_DETAIL
0020 namespace detail { namespace overlay
0021 {
0022 
0023 
0024 /*!
0025 \brief Keeps info to enrich intersection info (per source)
0026 \details Class to keep information necessary for traversal phase (a phase
0027     of the overlay process). The information is gathered during the
0028     enrichment phase
0029  */
0030 template<typename Point>
0031 struct enrichment_info
0032 {
0033     inline enrichment_info()
0034         : travels_to_vertex_index(-1)
0035         , travels_to_ip_index(-1)
0036         , next_ip_index(-1)
0037         , startable(true)
0038         , prefer_start(true)
0039         , count_left(0)
0040         , count_right(0)
0041         , rank(-1)
0042         , zone(-1)
0043         , region_id(-1)
0044         , isolated(false)
0045     {}
0046 
0047     inline signed_size_type get_next_turn_index() const
0048     {
0049         return next_ip_index == -1 ? travels_to_ip_index : next_ip_index;
0050     }
0051 
0052     // vertex to which is free travel after this IP,
0053     // so from "segment_index+1" to "travels_to_vertex_index", without IP-s,
0054     // can be -1
0055     signed_size_type travels_to_vertex_index;
0056 
0057     // same but now IP index, so "next IP index" but not on THIS segment
0058     signed_size_type travels_to_ip_index;
0059 
0060     // index of next IP on this segment, -1 if there is no one
0061     signed_size_type next_ip_index;
0062 
0063     bool startable; // Can be used to start in traverse
0064     bool prefer_start; // Is preferred as starting point (if true)
0065 
0066     // Counts if polygons left/right of this operation
0067     std::size_t count_left;
0068     std::size_t count_right;
0069     signed_size_type rank; // in cluster
0070     signed_size_type zone; // open zone, in cluster
0071     signed_size_type region_id;
0072     bool isolated;
0073 };
0074 
0075 
0076 }} // namespace detail::overlay
0077 #endif //DOXYGEN_NO_DETAIL
0078 
0079 
0080 
0081 }} // namespace boost::geometry
0082 
0083 
0084 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_ENRICHMENT_INFO_HPP