CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
road
element
RoadInfoLaneBorder.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
/// Instead of describing lanes by their width entries and, thus, invariably
17
/// depending on influences of inner lanes on outer lanes, it might be more
18
/// convenient to just describe the outer border of each lane independent of
19
/// any inner lanes’ parameters. Especially in cases where road data is
20
/// derived from measurements, this type of definition will provide a more
21
/// convenient method without the need to tesselate road sections into too
22
/// many parts. Note. Lane borders and widths are mutually exclusive.
23
class
RoadInfoLaneBorder
final :
public
RoadInfo
{
24
public
:
25
26
RoadInfoLaneBorder
(
27
double
s,
28
double
a,
29
double
b,
30
double
c,
31
double
d)
32
:
RoadInfo
(s),
33
_border
(a, b, c, d, s) {}
34
35
void
AcceptVisitor
(
RoadInfoVisitor
&v)
final
{
36
v.Visit(*
this
);
37
}
38
39
const
geom::CubicPolynomial
&
GetPolynomial
()
const
{
40
return
_border
;
41
}
42
43
private
:
44
45
const
geom::CubicPolynomial
_border
;
46
};
47
48
}
// namespace element
49
}
// namespace road
50
}
// 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::RoadInfoLaneBorder::GetPolynomial
const geom::CubicPolynomial & GetPolynomial() const
Definition
RoadInfoLaneBorder.h:39
carla::road::element::RoadInfoLaneBorder::_border
const geom::CubicPolynomial _border
Definition
RoadInfoLaneBorder.h:45
carla::road::element::RoadInfoLaneBorder::RoadInfoLaneBorder
RoadInfoLaneBorder(double s, double a, double b, double c, double d)
Definition
RoadInfoLaneBorder.h:26
carla::road::element::RoadInfoLaneBorder::AcceptVisitor
void AcceptVisitor(RoadInfoVisitor &v) final
Definition
RoadInfoLaneBorder.h:35
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