CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
road
element
RoadInfoLaneOffset.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
/// The lane offset record defines a lateral shift of the lane reference
17
/// line(which is usually identical to the road reference line). This may be
18
/// used for an easy implementation of a (local)lateralshift of the lanes
19
/// relative to the road’s referenceline. Especially the modeling of
20
/// inner-city layouts or "2+1" cross-country road layouts can be facilitated
21
/// considerably by this feature.
22
class
RoadInfoLaneOffset
final :
public
RoadInfo
{
23
public
:
24
25
RoadInfoLaneOffset
(
26
double
s,
27
double
a,
28
double
b,
29
double
c,
30
double
d)
31
:
RoadInfo
(s),
32
_offset
(a, b, c, d, s) {}
33
34
void
AcceptVisitor
(
RoadInfoVisitor
&v)
final
{
35
v.Visit(*
this
);
36
}
37
38
const
geom::CubicPolynomial
&
GetPolynomial
()
const
{
39
return
_offset
;
40
}
41
42
private
:
43
44
const
geom::CubicPolynomial
_offset
;
45
};
46
47
}
// namespace element
48
}
// namespace road
49
}
// 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::RoadInfoLaneOffset::RoadInfoLaneOffset
RoadInfoLaneOffset(double s, double a, double b, double c, double d)
Definition
RoadInfoLaneOffset.h:25
carla::road::element::RoadInfoLaneOffset::GetPolynomial
const geom::CubicPolynomial & GetPolynomial() const
Definition
RoadInfoLaneOffset.h:38
carla::road::element::RoadInfoLaneOffset::AcceptVisitor
void AcceptVisitor(RoadInfoVisitor &v) final
Definition
RoadInfoLaneOffset.h:34
carla::road::element::RoadInfoLaneOffset::_offset
const geom::CubicPolynomial _offset
Definition
RoadInfoLaneOffset.h:44
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