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

#include <Geometry.h>

Inheritance diagram for carla::road::element::GeometryArc:

Public Member Functions

std::pair< float, float > DistanceTo (const geom::Location &p) const override
 Returns a pair containing:
 GeometryArc (double start_offset, double length, double heading, const geom::Location &start_pos, double curv)
double GetCurvature () const
DirectedPoint PosFromDist (double dist) const override
Public Member Functions inherited from carla::road::element::Geometry
double GetHeading () const
double GetLength () const
double GetStartOffset () const
const geom::Location & GetStartPosition ()
GeometryType GetType () const
virtual ~Geometry ()=default

Private Attributes

double _curvature

Additional Inherited Members

Protected Member Functions inherited from carla::road::element::Geometry
 Geometry (GeometryType type, double start_offset, double length, double heading, const geom::Location &start_pos)
Protected Attributes inherited from carla::road::element::Geometry
double _heading
double _length
geom::Location _start_position
double _start_position_offset
GeometryType _type

Detailed Description

Definition at line 127 of file carla/road/element/Geometry.h.

Constructor & Destructor Documentation

◆ GeometryArc()

carla::road::element::GeometryArc::GeometryArc ( double start_offset,
double length,
double heading,
const geom::Location & start_pos,
double curv )
inline

Member Function Documentation

◆ DistanceTo()

std::pair< float, float > carla::road::element::GeometryArc::DistanceTo ( const geom::Location & p) const
inlineoverridevirtual

Returns a pair containing:

  • first: distance to the nearest point in this arc from the beginning of the shape.
  • second: Euclidean distance from the nearest point in this arc to p.
    Parameters
    ppoint to calculate the distance

Implements carla::road::element::Geometry.

Definition at line 146 of file carla/road/element/Geometry.h.

References _curvature, carla::road::element::Geometry::_heading, carla::road::element::Geometry::_length, carla::road::element::Geometry::_start_position, and carla::geom::Math::DistanceArcToPoint().

◆ GetCurvature()

double carla::road::element::GeometryArc::GetCurvature ( ) const
inline

Definition at line 155 of file carla/road/element/Geometry.h.

References _curvature.

◆ PosFromDist()

Member Data Documentation

◆ _curvature

double carla::road::element::GeometryArc::_curvature
private

Definition at line 161 of file carla/road/element/Geometry.h.

Referenced by DistanceTo(), GeometryArc(), GetCurvature(), and PosFromDist().


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