CARLA
Public Member Functions | Private Attributes | List of all members
carla::road::element::GeometryArc Class Referencefinal

#include <Geometry.h>

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

Public Member Functions

std::pair< float, float > DistanceTo (const geom::Location &p) const override
 Returns a pair containing: More...
 
 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::LocationGetStartPosition ()
 
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 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

Definition at line 130 of file Geometry.h.

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 Geometry.h.

References carla::geom::Math::DistanceArcToPoint().

+ Here is the call graph for this function:

◆ GetCurvature()

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

Definition at line 155 of file Geometry.h.

◆ PosFromDist()

DirectedPoint carla::road::element::GeometryArc::PosFromDist ( double  dist) const
overridevirtual

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

Definition at line 45 of file Geometry.cpp.

References carla::geom::Math::Clamp(), and DEBUG_ASSERT.

+ Here is the call graph for this function:

Member Data Documentation

◆ _curvature

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

Definition at line 161 of file Geometry.h.


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