CARLA
Loading...
Searching...
No Matches
carla::road::Lane Class Reference

#include <Lane.h>

Inheritance diagram for carla::road::Lane:

Public Types

enum class  LaneType : int32_t {
  None = 0x1 , Driving = 0x1 << 1 , Stop = 0x1 << 2 , Shoulder = 0x1 << 3 ,
  Biking = 0x1 << 4 , Sidewalk = 0x1 << 5 , Border = 0x1 << 6 , Restricted = 0x1 << 7 ,
  Parking = 0x1 << 8 , Bidirectional = 0x1 << 9 , Median = 0x1 << 10 , Special1 = 0x1 << 11 ,
  Special2 = 0x1 << 12 , Special3 = 0x1 << 13 , RoadWorks = 0x1 << 14 , Tram = 0x1 << 15 ,
  Rail = 0x1 << 16 , Entry = 0x1 << 17 , Exit = 0x1 << 18 , OffRamp = 0x1 << 19 ,
  OnRamp = 0x1 << 20 , Any = -2
}
 Can be used as flags. More...

Public Member Functions

geom::Transform ComputeTransform (const double s) const
std::pair< geom::Vector3D, geom::Vector3D > GetCornerPositions (const double s, const float extra_width=0.f) const
 Computes the location of the edges given a s.
double GetDistance () const
LaneId GetId () const
template<typename T>
const T * GetInfo (const double s) const
template<typename T>
std::vector< const T * > GetInfos () const
const LaneSection * GetLaneSection () const
double GetLength () const
bool GetLevel () const
const std::vector< Lane * > & GetNextLanes () const
LaneId GetPredecessor () const
const std::vector< Lane * > & GetPreviousLanes () const
Road * GetRoad () const
LaneId GetSuccessor () const
LaneType GetType () const
double GetWidth (const double s) const
 Returns the total lane width given a s.
bool IsPositiveDirection () const
bool IsStraight () const
 Checks whether the geometry is straight or not.
 Lane ()=default
 Lane (LaneSection *lane_section, LaneId id, std::vector< std::unique_ptr< element::RoadInfo > > &&info)

Private Attributes

LaneId _id = 0
InformationSet _info
LaneSection * _lane_section = nullptr
bool _level = false
std::vector< Lane * > _next_lanes
LaneId _predecessor = 0
std::vector< Lane * > _prev_lanes
LaneId _successor = 0
LaneType _type = LaneType::None
friend MapBuilder

Additional Inherited Members

Private Member Functions inherited from carla::MovableNonCopyable
 MovableNonCopyable ()=default
 MovableNonCopyable (const MovableNonCopyable &)=delete
 MovableNonCopyable (MovableNonCopyable &&)=default
MovableNonCopyable & operator= (const MovableNonCopyable &)=delete
MovableNonCopyable & operator= (MovableNonCopyable &&)=default

Detailed Description

Definition at line 25 of file road/Lane.h.

Member Enumeration Documentation

◆ LaneType

enum class carla::road::Lane::LaneType : int32_t
strong

Can be used as flags.

Enumerator
None 
Driving 
Stop 
Shoulder 
Biking 
Sidewalk 
Border 
Restricted 
Parking 
Bidirectional 
Median 
Special1 
Special2 
Special3 
RoadWorks 
Tram 
Rail 
Entry 
Exit 
OffRamp 
OnRamp 
Any 

Definition at line 29 of file road/Lane.h.

Constructor & Destructor Documentation

◆ Lane() [1/2]

carla::road::Lane::Lane ( )
default

◆ Lane() [2/2]

carla::road::Lane::Lane ( LaneSection * lane_section,
LaneId id,
std::vector< std::unique_ptr< element::RoadInfo > > && info )
inline

Definition at line 58 of file road/Lane.h.

References _id, _info, _lane_section, and DEBUG_ASSERT.

Member Function Documentation

◆ ComputeTransform()

◆ GetCornerPositions()

◆ GetDistance()

◆ GetId()

◆ GetInfo()

◆ GetInfos()

template<typename T>
std::vector< const T * > carla::road::Lane::GetInfos ( ) const
inline

Definition at line 85 of file road/Lane.h.

References _info, _lane_section, DEBUG_ASSERT, and carla::road::InformationSet::GetInfos().

Referenced by IsStraight().

◆ GetLaneSection()

const LaneSection * carla::road::Lane::GetLaneSection ( ) const

Definition at line 25 of file road/Lane.cpp.

References _lane_section.

Referenced by ComputeTransform(), and GetCornerPositions().

◆ GetLength()

◆ GetLevel()

bool carla::road::Lane::GetLevel ( ) const

Definition at line 42 of file road/Lane.cpp.

References _level.

Referenced by carla::client::Lane::GetLevel().

◆ GetNextLanes()

const std::vector< Lane * > & carla::road::Lane::GetNextLanes ( ) const
inline

Definition at line 90 of file road/Lane.h.

References _next_lanes.

Referenced by carla::road::Map::GetSuccessors().

◆ GetPredecessor()

LaneId carla::road::Lane::GetPredecessor ( ) const
inline

Definition at line 102 of file road/Lane.h.

References _predecessor.

Referenced by carla::road::MapBuilder::GetLaneNext().

◆ GetPreviousLanes()

const std::vector< Lane * > & carla::road::Lane::GetPreviousLanes ( ) const
inline

Definition at line 94 of file road/Lane.h.

References _prev_lanes.

Referenced by carla::road::Map::GetPredecessors().

◆ GetRoad()

◆ GetSuccessor()

LaneId carla::road::Lane::GetSuccessor ( ) const
inline

Definition at line 98 of file road/Lane.h.

References _successor.

Referenced by carla::road::MapBuilder::GetLaneNext().

◆ GetType()

◆ GetWidth()

double carla::road::Lane::GetWidth ( const double s) const

Returns the total lane width given a s.

Definition at line 58 of file road/Lane.cpp.

References GetInfo(), GetLength(), GetRoad(), and RELEASE_ASSERT.

Referenced by GetCornerPositions(), carla::road::Map::GetTreesTransform(), and carla::client::Lane::GetWidth().

◆ IsPositiveDirection()

◆ IsStraight()

Member Data Documentation

◆ _id

LaneId carla::road::Lane::_id = 0
private

Definition at line 130 of file road/Lane.h.

Referenced by GetId(), and Lane().

◆ _info

InformationSet carla::road::Lane::_info
private

Definition at line 132 of file road/Lane.h.

Referenced by GetInfo(), GetInfos(), and Lane().

◆ _lane_section

LaneSection* carla::road::Lane::_lane_section = nullptr
private

Definition at line 128 of file road/Lane.h.

Referenced by GetDistance(), GetInfo(), GetInfos(), GetLaneSection(), GetRoad(), and Lane().

◆ _level

bool carla::road::Lane::_level = false
private

Definition at line 136 of file road/Lane.h.

Referenced by GetLevel().

◆ _next_lanes

std::vector<Lane *> carla::road::Lane::_next_lanes
private

Definition at line 142 of file road/Lane.h.

Referenced by GetNextLanes().

◆ _predecessor

LaneId carla::road::Lane::_predecessor = 0
private

Definition at line 140 of file road/Lane.h.

Referenced by GetPredecessor().

◆ _prev_lanes

std::vector<Lane *> carla::road::Lane::_prev_lanes
private

Definition at line 144 of file road/Lane.h.

Referenced by GetPreviousLanes().

◆ _successor

LaneId carla::road::Lane::_successor = 0
private

Definition at line 138 of file road/Lane.h.

Referenced by GetSuccessor().

◆ _type

LaneType carla::road::Lane::_type = LaneType::None
private

Definition at line 134 of file road/Lane.h.

Referenced by GetType().

◆ MapBuilder

friend carla::road::Lane::MapBuilder
private

Definition at line 126 of file road/Lane.h.


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