CARLA
Loading...
Searching...
No Matches
carla::road::element::RoadInfoLateralShape Class Referencefinal

One <lateralProfile><shape> record: at station s, the road surface height relative to the elevation profile is a cubic polynomial in (t - t_record), valid from t_record until the next record at the same station. More...

#include <RoadInfoLateralShape.h>

Inheritance diagram for carla::road::element::RoadInfoLateralShape:

Public Member Functions

void AcceptVisitor (RoadInfoVisitor &v) final
double Evaluate (const double t) const
 Evaluate the surface height offset at lateral position t (the polynomial is defined over t - t_record).
const geom::CubicPolynomial & GetPolynomial () const
double GetT () const
 RoadInfoLateralShape (double s, double t, double a, double b, double c, double d)
Public Member Functions inherited from carla::road::element::RoadInfo
double GetDistance () const
 Distance from road's start location.
virtual ~RoadInfo ()=default

Private Attributes

const geom::CubicPolynomial _shape
const double _t

Additional Inherited Members

Protected Member Functions inherited from carla::road::element::RoadInfo
 RoadInfo (double distance=0.0)

Detailed Description

One <lateralProfile><shape> record: at station s, the road surface height relative to the elevation profile is a cubic polynomial in (t - t_record), valid from t_record until the next record at the same station.

Together the records describe the road cross-section (crown, banking); reconstructed real-world maps rely on them for crossing roads to agree on surface height inside junctions.

Definition at line 22 of file RoadInfoLateralShape.h.

Constructor & Destructor Documentation

◆ RoadInfoLateralShape()

carla::road::element::RoadInfoLateralShape::RoadInfoLateralShape ( double s,
double t,
double a,
double b,
double c,
double d )
inline

Definition at line 25 of file RoadInfoLateralShape.h.

References _shape, _t, and carla::road::element::RoadInfo::RoadInfo().

Member Function Documentation

◆ AcceptVisitor()

void carla::road::element::RoadInfoLateralShape::AcceptVisitor ( RoadInfoVisitor & v)
inlinefinalvirtual

Implements carla::road::element::RoadInfo.

Definition at line 36 of file RoadInfoLateralShape.h.

◆ Evaluate()

double carla::road::element::RoadInfoLateralShape::Evaluate ( const double t) const
inline

Evaluate the surface height offset at lateral position t (the polynomial is defined over t - t_record).

Definition at line 46 of file RoadInfoLateralShape.h.

References _shape, and carla::geom::CubicPolynomial::Evaluate().

Referenced by carla::road::Road::GetLateralShapeZ().

◆ GetPolynomial()

const geom::CubicPolynomial & carla::road::element::RoadInfoLateralShape::GetPolynomial ( ) const
inline

Definition at line 50 of file RoadInfoLateralShape.h.

References _shape.

◆ GetT()

double carla::road::element::RoadInfoLateralShape::GetT ( ) const
inline

Definition at line 40 of file RoadInfoLateralShape.h.

References _t.

Member Data Documentation

◆ _shape

const geom::CubicPolynomial carla::road::element::RoadInfoLateralShape::_shape
private

Definition at line 58 of file RoadInfoLateralShape.h.

Referenced by Evaluate(), GetPolynomial(), and RoadInfoLateralShape().

◆ _t

const double carla::road::element::RoadInfoLateralShape::_t
private

Definition at line 56 of file RoadInfoLateralShape.h.

Referenced by GetT(), and RoadInfoLateralShape().


The documentation for this class was generated from the following file: