CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
road
element
RoadInfoLaneWidth.h
Go to the documentation of this file.
1
// Copyright (c) 2026 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
#include "
carla/geom/CubicPolynomial.h
"
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
24
RoadInfoLaneWidth
(
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
37
const
geom::CubicPolynomial
&
GetPolynomial
()
const
{
38
return
_width
;
39
}
40
41
private
:
42
43
const
geom::CubicPolynomial
_width
;
44
};
45
46
}
// namespace element
47
}
// namespace road
48
}
// namespace carla
CubicPolynomial.h
RoadInfo.h
carla::geom::CubicPolynomial
Describes a Cubic Polynomial so: f(x) = a + bx + cx^2 + dx^3.
Definition
CubicPolynomial.h:18
carla::road::element::RoadInfoLaneWidth::GetPolynomial
const geom::CubicPolynomial & GetPolynomial() const
Definition
RoadInfoLaneWidth.h:37
carla::road::element::RoadInfoLaneWidth::_width
const geom::CubicPolynomial _width
Definition
RoadInfoLaneWidth.h:43
carla::road::element::RoadInfoLaneWidth::AcceptVisitor
void AcceptVisitor(RoadInfoVisitor &v) final
Definition
RoadInfoLaneWidth.h:33
carla::road::element::RoadInfoLaneWidth::RoadInfoLaneWidth
RoadInfoLaneWidth(double s, double a, double b, double c, double d)
Definition
RoadInfoLaneWidth.h:24
carla::road::element::RoadInfoVisitor
Definition
RoadInfoVisitor.h:33
carla::road::element::RoadInfo::RoadInfo
RoadInfo(double distance=0.0)
Definition
RoadInfo.h:34
carla::road::element
Definition
SignComponent.h:26
carla::road
Definition
SignComponent.h:23
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
Generated by
1.18.0