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

#include <Geometry.h>

Inheritance diagram for carla::road::element::GeometryLine:

Public Member Functions

std::pair< float, float > DistanceTo (const geom::Location &p) const override
 Returns a pair containing:
 GeometryLine (double start_offset, double length, double heading, const geom::Location &start_pos)
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

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 100 of file carla/road/element/Geometry.h.

Constructor & Destructor Documentation

◆ GeometryLine()

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

Member Function Documentation

◆ DistanceTo()

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

Returns a pair containing:

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

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

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

References carla::road::element::Geometry::_length, carla::road::element::Geometry::_start_position, carla::geom::Math::DistanceSegmentToPoint(), and PosFromDist().

◆ PosFromDist()


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