]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / 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';
20effc67 31 case method_start : return 's';
7c673cae
FG
32 case method_error : return '!';
33 default : return '?';
34 }
35}
36
37inline char operation_char(detail::overlay::operation_type const& operation)
38{
39 using namespace detail::overlay;
40 switch(operation)
41 {
42 case operation_none : return '-';
43 case operation_union : return 'u';
44 case operation_intersection : return 'i';
45 case operation_blocked : return 'x';
46 case operation_continue : return 'c';
47 case operation_opposite : return 'o';
48 default : return '?';
49 }
50}
51
52inline char visited_char(detail::overlay::visit_info const& v)
53{
54 if (v.rejected()) return 'R';
55 if (v.started()) return 's';
56 if (v.visited()) return 'v';
57 if (v.none()) return '-';
58 if (v.finished()) return 'f';
59 return '?';
60}
61
62
63
64}} // namespace boost::geometry
65
66
67#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_DEBUG_TURN_INFO_HPP