CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
road
element
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
9
#include "
carla/road/element/RoadInfo.h
"
10
11
namespace
carla
{
12
namespace
road {
13
namespace
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) {}
27
void
AcceptVisitor
(
RoadInfoVisitor
&v)
final
{
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
RoadInfo.h
carla::road::element::RoadInfoSpeed
Definition
RoadInfoSpeed.h:15
carla::road::element::RoadInfoSpeed::_type
const std::string _type
Definition
RoadInfoSpeed.h:42
carla::road::element::RoadInfoSpeed::GetType
std::string GetType() const
Definition
RoadInfoSpeed.h:35
carla::road::element::RoadInfoSpeed::_speed
const double _speed
Definition
RoadInfoSpeed.h:41
carla::road::element::RoadInfoSpeed::RoadInfoSpeed
RoadInfoSpeed(double s, double speed, std::string &type)
Definition
RoadInfoSpeed.h:23
carla::road::element::RoadInfoSpeed::RoadInfoSpeed
RoadInfoSpeed(double s, double speed)
Definition
RoadInfoSpeed.h:18
carla::road::element::RoadInfoSpeed::AcceptVisitor
void AcceptVisitor(RoadInfoVisitor &v) final
Definition
RoadInfoSpeed.h:27
carla::road::element::RoadInfoSpeed::GetSpeed
double GetSpeed() const
Definition
RoadInfoSpeed.h:31
carla::road::element::RoadInfoVisitor
Definition
RoadInfoVisitor.h:31
carla::road::element::RoadInfo
Definition
RoadInfo.h:20
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
制作者
1.10.0