CARLA
 
载入中...
搜索中...
未找到
RoadInfoLaneVisibility.h
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
10
11namespace carla {
12namespace road {
13namespace element {
14
15 /// Each lane within a road cross section may be provided with several entries
16 /// defining the visibility in four directions relative to the lane’s
17 /// direction. Each entry is valid until a new entry is defined. If multiple
18 /// entries are defined, they must be listed in increasing order.
19 ///
20 /// For left lanes (positive ID), the forward direction is oriented opposite
21 /// to the track’s direction, for right lanes, the forward direction and the
22 /// track’s direction are identical.
23 class RoadInfoLaneVisibility final : public RoadInfo {
24 public:
25
27 double s, // start position relative to the position of the preceding
28 // lane section
29 double forward,
30 double back,
31 double left,
32 double right)
33 : RoadInfo(s),
34 _forward(forward),
35 _back(back),
36 _left(left),
37 _right(right) {}
38
40 v.Visit(*this);
41 }
42
43 double GetForward() const {
44 return _forward;
45 }
46
47 double GetBack() const {
48 return _back;
49 }
50
51 double GetLeft() const {
52 return _left;
53 }
54
55 double GetRight() const {
56 return _right;
57 }
58
59 private:
60
61 const double _forward;
62
63 const double _back;
64
65 const double _left;
66
67 const double _right;
68 };
69
70} // namespace element
71} // namespace road
72} // namespace carla
Each lane within a road cross section may be provided with several entries defining the visibility in...
RoadInfoLaneVisibility(double s, double forward, double back, double left, double right)
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133