]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/include/boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / algorithms / detail / overlay / debug_turn_info.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
3// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4
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)
8
9#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TURN_INFO_HPP
10#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TURN_INFO_HPP
11
12#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
13#include <boost/geometry/algorithms/detail/overlay/visit_info.hpp>
14
15
16namespace boost { namespace geometry
17{
18
19inline char method_char(detail::overlay::method_type const& method)
20{
21 using namespace detail::overlay;
22 switch(method)
23 {
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 '!';
32 default : return '?';
33 }
34}
35
36inline char operation_char(detail::overlay::operation_type const& operation)
37{
38 using namespace detail::overlay;
39 switch(operation)
40 {
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';
47 default : return '?';
48 }
49}
50
51inline char visited_char(detail::overlay::visit_info const& v)
52{
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';
58 return '?';
59}
60
61
62
63}} // namespace boost::geometry
64
65
66#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TURN_INFO_HPP