CARLA
 
载入中...
搜索中...
未找到
RoadInfo.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#include "carla/NonCopyable.h"
11
12#include <map>
13#include <string>
14#include <vector>
15
16namespace carla {
17namespace road {
18namespace element {
19
20 class RoadInfo : private NonCopyable {
21 public:
22
23 virtual ~RoadInfo() = default;
24
25 virtual void AcceptVisitor(RoadInfoVisitor &) = 0;
26
27 /// Distance from road's start location.
28 double GetDistance() const {
29 return _s;
30 }
31
32 protected:
33
34 RoadInfo(double distance = 0.0) : _s(distance) {}
35
36 private:
37
38 double _s;
39 };
40
41} // namespace element
42} // namespace road
43} // namespace carla
Inherit (privately) to suppress copy/move construction and assignment.
double GetDistance() const
Distance from road's start location.
Definition RoadInfo.h:28
virtual void AcceptVisitor(RoadInfoVisitor &)=0
RoadInfo(double distance=0.0)
Definition RoadInfo.h:34
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133