forked from pageldev/libOpenDRIVE
-
Notifications
You must be signed in to change notification settings - Fork 1
/
RoadNetworkMesh.h
71 lines (51 loc) · 1.7 KB
/
RoadNetworkMesh.h
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
62
63
64
65
66
67
68
69
70
71
#pragma once
#include "Mesh.h"
#include "Utils.hpp"
#include <map>
#include <string>
#include <vector>
namespace odr
{
struct RoadsMesh : public Mesh3D
{
RoadsMesh() = default;
virtual ~RoadsMesh() = default;
std::string get_road_id(size_t vert_idx) const;
std::array<size_t, 2> get_idx_interval_road(size_t vert_idx) const;
std::map<size_t, std::string> road_start_indices;
};
struct LanesMesh : public RoadsMesh
{
LanesMesh() = default;
virtual ~LanesMesh() = default;
double get_lanesec_s0(size_t vert_idx) const;
int get_lane_id(size_t vert_idx) const;
std::array<size_t, 2> get_idx_interval_lanesec(size_t vert_idx) const;
std::array<size_t, 2> get_idx_interval_lane(size_t vert_idx) const;
std::vector<size_t> get_lane_outline_indices() const;
std::map<size_t, double> lanesec_start_indices;
std::map<size_t, int> lane_start_indices;
};
struct RoadmarksMesh : public LanesMesh
{
RoadmarksMesh() = default;
virtual ~RoadmarksMesh() = default;
std::string get_roadmark_type(size_t vert_idx) const;
std::array<size_t, 2> get_idx_interval_roadmark(size_t vert_idx) const;
std::vector<size_t> get_roadmark_outline_indices() const;
std::map<size_t, std::string> roadmark_type_start_indices;
};
struct RoadObjectsMesh : public RoadsMesh
{
std::string get_road_object_id(size_t vert_idx) const;
std::array<size_t, 2> get_idx_interval_road_object(size_t vert_idx) const;
std::map<size_t, std::string> road_object_start_indices;
};
struct RoadNetworkMesh
{
Mesh3D get_mesh() const;
LanesMesh lanes_mesh;
RoadmarksMesh roadmarks_mesh;
RoadObjectsMesh road_objects_mesh;
};
} // namespace odr