CARLA
 
载入中...
搜索中...
未找到
RoadInfoSpeed.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 class RoadInfoSpeed final : public RoadInfo {
16 public:
17
18 RoadInfoSpeed(double s, double speed)
19 : RoadInfo(s),
20 _speed(speed),
21 _type("Town") {}
22
23 RoadInfoSpeed(double s, double speed, std::string& type)
24 : RoadInfo(s),
25 _speed(speed),
26 _type(type) {}
28 v.Visit(*this);
29 }
30
31 double GetSpeed() const {
32 return _speed;
33 }
34
35 std::string GetType() const{
36 return _type;
37 }
38
39 private:
40
41 const double _speed;
42 const std::string _type;
43 };
44
45} // namespace element
46} // namespace road
47} // namespace carla
RoadInfoSpeed(double s, double speed, std::string &type)
RoadInfoSpeed(double s, double speed)
void AcceptVisitor(RoadInfoVisitor &v) final
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133