maliput
|
A Segment represents a bundle of adjacent Lanes which share a continuously traversable road surface.
Every LanePosition on a given Lane of a Segment has a corresponding LanePosition on each other Lane, all with the same height-above-surface h, that all map to the same GeoPoint in 3-space.
Segments are grouped by Junction.
#include <include/maliput/api/segment.h>
Public Member Functions | |
virtual | ~Segment ()=default |
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... | |
Protected Member Functions | |
Segment ()=default | |
|
protecteddefault |
SegmentId id | ( | ) | const |
Returns the persistent identifier.
const Lane* lane | ( | int | index | ) | const |
Returns the Lane indexed by index
.
The indexing order is meaningful; numerically adjacent indices correspond to geometrically adjacent Lanes. Indices increase "to the left", i.e., in the direction of increasing r
coordinate.
index
must be >= 0 and < num_lanes(). int num_lanes | ( | ) | const |
Returns the number of Lanes contained in this Segment.
Return value is non-negative.