Drake
Segment Class Referenceabstract

A Segment represents a bundle of adjacent Lanes which share a continuously traversable road surface. More...

#include <drake/automotive/maliput/api/segment.h>

Public Member Functions

virtual ~Segment ()=default
 
const SegmentId id () const
 Returns the persistent identifier. More...
 
const Junctionjunction () 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 Lanelane (int index) const
 Returns the Lane indexed by index. More...
 
Does not allow copy, move, or assignment
 Segment (const Segment &)=delete
 
Segmentoperator= (const Segment &)=delete
 
 Segment (Segment &&)=delete
 
Segmentoperator= (Segment &&)=delete
 

Protected Member Functions

 Segment ()=default
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Segment() [1/3]

Segment ( const Segment )
delete

◆ Segment() [2/3]

Segment ( Segment &&  )
delete

◆ ~Segment()

virtual ~Segment ( )
virtualdefault

Reimplemented in Segment, Segment, Segment, and Segment.

◆ Segment() [3/3]

Segment ( )
protecteddefault

Member Function Documentation

◆ id()

const SegmentId id ( ) const
inline

Returns the persistent identifier.

◆ junction()

const Junction* junction ( ) const
inline

Returns the Junction to which this Segment belongs.

◆ lane()

const Lane* lane ( int  index) const
inline

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.

Precondition
index must be >= 0 and < num_lanes().

◆ num_lanes()

int num_lanes ( ) const
inline

Returns the number of Lanes contained in this Segment.

Return value is non-negative.

◆ operator=() [1/2]

Segment& operator= ( const Segment )
delete

◆ operator=() [2/2]

Segment& operator= ( Segment &&  )
delete

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