1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
5 // Use, modification and distribution is subject to the Boost Software License,
6 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TURN_INFO_HPP
10 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TURN_INFO_HPP
12 #include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
13 #include <boost/geometry/algorithms/detail/overlay/visit_info.hpp>
16 namespace boost { namespace geometry
19 inline char method_char(detail::overlay::method_type const& method)
21 using namespace detail::overlay;
24 case method_none : return '-';
25 case method_disjoint : return 'd';
26 case method_crosses : return 'i';
27 case method_touch : return 't';
28 case method_touch_interior : return 'm';
29 case method_collinear : return 'c';
30 case method_equal : return 'e';
31 case method_error : return '!';
36 inline char operation_char(detail::overlay::operation_type const& operation)
38 using namespace detail::overlay;
41 case operation_none : return '-';
42 case operation_union : return 'u';
43 case operation_intersection : return 'i';
44 case operation_blocked : return 'x';
45 case operation_continue : return 'c';
46 case operation_opposite : return 'o';
51 inline char visited_char(detail::overlay::visit_info const& v)
53 if (v.rejected()) return 'R';
54 if (v.started()) return 's';
55 if (v.visited()) return 'v';
56 if (v.none()) return '-';
57 if (v.finished()) return 'f';
63 }} // namespace boost::geometry
66 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TURN_INFO_HPP