-
Notifications
You must be signed in to change notification settings - Fork 0
/
shortcut.hpp
46 lines (38 loc) · 1.03 KB
/
shortcut.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef SHORTCUT_HPP
#define SHORTCUT_HPP
#include <limits>
constexpr unsigned NO_EDGE_ID = std::numeric_limits<unsigned>::max();
/**
* A shortcut connects the vertices with index frist and last.
*/
struct shortcut
{
enum class type : char
{
UNDEFINED,
NO_TANGENT,
MINIMAL_TANGENT,
MAXIMAL_TANGENT,
DEGENERATED_TANGENT
};
shortcut() : first(NO_EDGE_ID),
last(NO_EDGE_ID),
split_edge(NO_EDGE_ID),
classification(type::UNDEFINED)
{}
shortcut(unsigned first, unsigned last) :
first(first),
last(last),
split_edge(NO_EDGE_ID),
classification(type::UNDEFINED)
{}
shortcut(unsigned first, unsigned last, unsigned split_edge, shortcut::type classification)
: first(first), last(last), split_edge(split_edge), classification(classification)
{}
unsigned first;
unsigned last;
/// number of the edge along the path
unsigned split_edge;
type classification;
};
#endif