CARLA
RoadInfoLaneWidth.h
Go to the documentation of this file.
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 
11 
12 namespace carla {
13 namespace road {
14 namespace element {
15 
16  /// Lane Width RecordEach lane within a road’scross section can be provided
17  /// with severalwidth entries. At least one entry must be defined for each
18  /// lane, except for the center lane which is, per convention, of zero width.
19  /// Each entry is valid until a new entry is defined. If multiple entries are
20  /// defined for a lane, they must be listed in ascendingorder.
21  class RoadInfoLaneWidth final : public RoadInfo {
22  public:
23 
25  double s,
26  double a,
27  double b,
28  double c,
29  double d)
30  : RoadInfo(s),
31  _width(a, b, c, d, s) {}
32 
33  void AcceptVisitor(RoadInfoVisitor &v) final {
34  v.Visit(*this);
35  }
36 
38  return _width;
39  }
40 
41  private:
42 
44  };
45 
46 } // namespace element
47 } // namespace road
48 } // namespace carla
void AcceptVisitor(RoadInfoVisitor &v) final
RoadInfoLaneWidth(double s, double a, double b, double c, double d)
Describes a Cubic Polynomial so: f(x) = a + bx + cx^2 + dx^3.
const geom::CubicPolynomial & GetPolynomial() const
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
Lane Width RecordEach lane within a road’scross section can be provided with severalwidth entries...
const geom::CubicPolynomial _width