-
Notifications
You must be signed in to change notification settings - Fork 0
/
LaneSection.h
38 lines (26 loc) · 889 Bytes
/
LaneSection.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
#pragma once
#include "Lanes.h"
#include "Math.hpp"
#include "Utils.hpp"
#include <map>
#include <memory>
#include <set>
#include <string>
namespace odr
{
class Road;
struct LaneSection : public std::enable_shared_from_this<LaneSection>
{
LaneSection(double s0);
double get_end() const;
ConstLaneSet get_lanes() const;
LaneSet get_lanes();
std::shared_ptr<const Lane> get_lane(double s, double t) const;
std::shared_ptr<Lane> get_lane(double s, double t);
double s0 = 0;
std::weak_ptr<Road> road;
std::map<int, std::shared_ptr<Lane>> id_to_lane;
};
using ConstLaneSectionSet = std::set<std::shared_ptr<const LaneSection>, SharedPtrCmp<const LaneSection, double, &LaneSection::s0>>;
using LaneSectionSet = std::set<std::shared_ptr<LaneSection>, SharedPtrCmp<LaneSection, double, &LaneSection::s0>>;
} // namespace odr