forked from pageldev/libOpenDRIVE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJunction.h
More file actions
61 lines (49 loc) · 1.06 KB
/
Junction.h
File metadata and controls
61 lines (49 loc) · 1.06 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#include "XmlNode.h"
#include <map>
#include <string>
#include <vector>
namespace odr
{
struct JunctionLaneLink
{
int from = 0;
int to = 0;
};
struct JunctionConnection
{
enum class ContactPoint
{
None,
Start,
End
};
std::string id = "";
std::string incoming_road = "";
std::string connecting_road = "";
ContactPoint contact_point = ContactPoint::None;
std::vector<JunctionLaneLink> lane_links;
};
struct JunctionPriority
{
std::string high = "";
std::string low = "";
};
struct JunctionController
{
std::string id = "";
std::string type = "";
uint32_t sequence = 0;
};
class Junction : public XmlNode, public std::enable_shared_from_this<Junction>
{
public:
Junction() = default;
virtual ~Junction() = default;
std::string name = "";
std::string id = "";
std::map<std::string, JunctionConnection> connections;
std::map<std::string, JunctionController> controllers;
std::vector<JunctionPriority> priorities;
};
} // namespace odr