|
maliput
|
geometry_base's implementation of api::Segment.
#include <include/maliput/geometry_base/segment.h>
Public Member Functions | |
| MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (Segment) | |
| Segment (const api::SegmentId &id) | |
| Constructs a new Segment. More... | |
| template<class T > | |
| T * | AddLane (std::unique_ptr< T > lane) |
Adds lane to this Segment. More... | |
| template<class T > | |
| T * | AddBoundary (std::unique_ptr< T > boundary) |
Adds boundary to this Segment. More... | |
| void | AttachToJunction (common::Passkey< Junction >, const api::Junction *junction) |
| void | SetLaneIndexingCallback (common::Passkey< Junction >, const std::function< void(const api::Lane *)> &callback) |
| void | SetLaneBoundaryIndexingCallback (common::Passkey< Junction >, const std::function< void(const api::LaneBoundary *)> &callback) |
| ~Segment () override=default | |
Public Member Functions inherited from Segment | |
| SegmentId | id () const |
| Returns the persistent identifier. More... | |
| const Junction * | junction () const |
| Returns the Junction to which this Segment belongs. More... | |
| int | num_lanes () const |
| Returns the number of Lanes contained in this Segment. More... | |
| const Lane * | lane (int index) const |
Returns the Lane indexed by index. More... | |
| int | num_boundaries () const |
| Returns the number of LaneBoundaries contained in this Segment. More... | |
| const LaneBoundary * | boundary (int index) const |
Returns the LaneBoundary indexed by index. More... | |
| std::optional< bool > | is_intersection () const |
| Returns whether this segment is an intersection. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Segment | |
| Segment ()=default | |
|
explicit |
| T* AddBoundary | ( | std::unique_ptr< T > | boundary | ) |
Adds boundary to this Segment.
This Segment will take ownership of boundary and will be assigned as its parent. The index of boundary will also be assigned, in order of addition. (The first LaneBoundary added to this Segment, by the first call to AddBoundary(), will be assigned index 0.)
Note that the maliput API requires that lanes are indexed in a Segment in right-to-left order, thus AddBoundary() should be called on boundaries in right-to-left order.
boundary's raw pointer.| T | must be derived from geometry_base::LaneBoundary. |
| std::exception | if boundary is empty. |
| T* AddLane | ( | std::unique_ptr< T > | lane | ) |
Adds lane to this Segment.
This Segment will take ownership of lane and will be assigned as its parent. The index of lane will also be assigned, in order of addition. (The first Lane added to this Segment, by the first call to AddLane(), will be assigned index 0.)
Note that the maliput API requires that lanes are indexed in a Segment in right-to-left order, thus AddLane() should be called on lanes in right-to-left order.
lane's raw pointer.| T | must be derived from geometry_base::Lane. |
| std::exception | if lane is empty. |
| void AttachToJunction | ( | common::Passkey< Junction > | , |
| const api::Junction * | junction | ||
| ) |
| MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN | ( | Segment | ) |
| void SetLaneBoundaryIndexingCallback | ( | common::Passkey< Junction > | , |
| const std::function< void(const api::LaneBoundary *)> & | callback | ||
| ) |
| void SetLaneIndexingCallback | ( | common::Passkey< Junction > | , |
| const std::function< void(const api::Lane *)> & | callback | ||
| ) |