|
CARLA
|
A stretch of road over which the lane layout does not change. More...
#include <LaneSection.h>
Inheritance diagram for carla::client::LaneSection:Public Member Functions | |
| bool | ContainsLane (road::LaneId lane_id) const |
| double | GetDistance () const |
| The s coordinate, along the road, at which this section begins. | |
| road::SectionId | GetId () const |
| SharedPtr< Lane > | GetLane (road::LaneId lane_id) const |
| The lane with this id, or nullptr when the section has no such lane. | |
| std::vector< SharedPtr< Lane > > | GetLanes (road::Lane::LaneType type=road::Lane::LaneType::Driving) const |
| Every lane in this section of the given type. | |
| double | GetLength () const |
| Length of the section, in metres. | |
| SharedPtr< LaneSection > | GetNextSection () const |
| The next section along the road, or nullptr at the end. | |
| SharedPtr< LaneSection > | GetPreviousSection () const |
| The previous section along the road, or nullptr at the start. | |
| SharedPtr< Road > | GetRoad () const |
| road::RoadId | GetRoadId () const |
| uint64_t | GetUniqueId () const |
| Unique id of this section within its map, for use as a dictionary key. | |
| bool | operator!= (const LaneSection &rhs) const |
| bool | operator== (const LaneSection &rhs) const |
Private Member Functions | |
| LaneSection (SharedPtr< const Map > parent, road::RoadId road_id, road::SectionId section_id) | |
Private Member Functions inherited from carla::NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable (NonCopyable &&)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| NonCopyable & | operator= (NonCopyable &&)=delete |
Private Attributes | |
| SharedPtr< const Map > | _parent |
| road::RoadId | _road_id |
| road::SectionId | _section_id |
Friends | |
| class | Lane |
| class | Map |
| class | Road |
A stretch of road over which the lane layout does not change.
An OpenDRIVE road is divided along s into lane sections; lanes are added or dropped only at a section boundary. This is why a lane's identity carries a section id, and why Lane::GetNextLanes() can step into a different section.
Definition at line 29 of file client/LaneSection.h.
|
inlineprivate |
Definition at line 83 of file client/LaneSection.h.
| bool carla::client::LaneSection::ContainsLane | ( | road::LaneId | lane_id | ) | const |
Definition at line 75 of file client/LaneSection.cpp.
References _parent, _road_id, _section_id, carla::road::LaneSection::ContainsLane(), carla::road::Road::GetLaneSectionById(), and carla::road::Lane::GetRoad().
| double carla::client::LaneSection::GetDistance | ( | ) | const |
The s coordinate, along the road, at which this section begins.
Definition at line 43 of file client/LaneSection.cpp.
References _parent, _road_id, and _section_id.
|
inline |
Definition at line 34 of file client/LaneSection.h.
References _section_id.
Referenced by GetNextSection(), and GetPreviousSection().
| SharedPtr< Lane > carla::client::LaneSection::GetLane | ( | road::LaneId | lane_id | ) | const |
The lane with this id, or nullptr when the section has no such lane.
Definition at line 71 of file client/LaneSection.cpp.
References _parent, _road_id, and _section_id.
| std::vector< SharedPtr< Lane > > carla::client::LaneSection::GetLanes | ( | road::Lane::LaneType | type = road::Lane::LaneType::Driving | ) | const |
Every lane in this section of the given type.
The centre lane (id 0) carries no width and is never returned.
Definition at line 53 of file client/LaneSection.cpp.
References _parent, _road_id, _section_id, carla::road::Lane::GetId(), carla::road::LaneSection::GetLanes(), carla::road::Road::GetLaneSectionById(), carla::road::LaneSection::GetRoad(), and carla::road::Lane::GetType().
| double carla::client::LaneSection::GetLength | ( | ) | const |
Length of the section, in metres.
Definition at line 48 of file client/LaneSection.cpp.
References _parent, _road_id, and _section_id.
| SharedPtr< LaneSection > carla::client::LaneSection::GetNextSection | ( | ) | const |
The next section along the road, or nullptr at the end.
Definition at line 80 of file client/LaneSection.cpp.
References _parent, _road_id, _section_id, GetId(), road, and carla::client::SectionsByDistance().
| SharedPtr< LaneSection > carla::client::LaneSection::GetPreviousSection | ( | ) | const |
The previous section along the road, or nullptr at the start.
Definition at line 94 of file client/LaneSection.cpp.
References _parent, _road_id, _section_id, GetId(), road, and carla::client::SectionsByDistance().
Definition at line 39 of file client/LaneSection.cpp.
|
inline |
Definition at line 38 of file client/LaneSection.h.
References _road_id.
| uint64_t carla::client::LaneSection::GetUniqueId | ( | ) | const |
Unique id of this section within its map, for use as a dictionary key.
Definition at line 35 of file client/LaneSection.cpp.
References _road_id, and _section_id.
|
inline |
Definition at line 73 of file client/LaneSection.h.
|
inline |
Definition at line 69 of file client/LaneSection.h.
References _road_id, and _section_id.
|
friend |
Definition at line 81 of file client/LaneSection.h.
|
friend |
Definition at line 79 of file client/LaneSection.h.
|
friend |
Definition at line 80 of file client/LaneSection.h.
Definition at line 88 of file client/LaneSection.h.
Referenced by ContainsLane(), GetDistance(), GetLane(), GetLanes(), GetLength(), GetNextSection(), GetPreviousSection(), and GetRoad().
|
private |
Definition at line 90 of file client/LaneSection.h.
Referenced by ContainsLane(), GetDistance(), GetLane(), GetLanes(), GetLength(), GetNextSection(), GetPreviousSection(), GetRoad(), GetRoadId(), GetUniqueId(), and operator==().
|
private |
Definition at line 92 of file client/LaneSection.h.
Referenced by ContainsLane(), GetDistance(), GetId(), GetLane(), GetLanes(), GetLength(), GetNextSection(), GetPreviousSection(), GetUniqueId(), and operator==().