Drake
Segment Class Reference

An api::Segment implementation for RNDF. More...

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

Inheritance diagram for Segment:
[legend]
Collaboration diagram for Segment:
[legend]

Public Member Functions

 Segment (const api::SegmentId &id, api::Junction *junction)
 Constructs a new Segment. More...
 
SplineLaneNewSplineLane (const api::LaneId &id, const std::vector< std::tuple< ignition::math::Vector3d, ignition::math::Vector3d >> &control_points, double width)
 Gives the segment a newly constructed SplineLane. More...
 
 ~Segment () override=default
 
Does not allow copy, move, or assignment
 Segment (const Segment &)=delete
 
Segmentoperator= (const Segment &)=delete
 
 Segment (Segment &&)=delete
 
Segmentoperator= (Segment &&)=delete
 
- Public Member Functions inherited from Segment
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...
 
 Segment (const Segment &)=delete
 
Segmentoperator= (const Segment &)=delete
 
 Segment (Segment &&)=delete
 
Segmentoperator= (Segment &&)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from Segment
 Segment ()=default
 

Detailed Description

An api::Segment implementation for RNDF.

Constructor & Destructor Documentation

Segment ( const Segment )
delete
Segment ( Segment &&  )
delete
Segment ( const api::SegmentId id,
api::Junction junction 
)
inline

Constructs a new Segment.

Parameters
idThis segment's ID.
junctionThe api::Junction that contains this Segment. It must remain valid for the lifetime of this object.

Here is the call graph for this function:

~Segment ( )
overridevirtualdefault

Reimplemented from Segment.

Here is the caller graph for this function:

Member Function Documentation

SplineLane * NewSplineLane ( const api::LaneId id,
const std::vector< std::tuple< ignition::math::Vector3d, ignition::math::Vector3d >> &  control_points,
double  width 
)

Gives the segment a newly constructed SplineLane.

Parameters
idThe lane's ID.
control_pointsA vector of tuples that hold the point (first element) and the tangent (second element) at that point to construct the spline based lane. The size should be at least two pairs.
widthThe width specified by the RNDF lane_width parameter. Later, this value will be used to construct the api::Lane::lane_bounds() and the api::Lane::driveable_bounds() result.
Returns
a pointer to a valid SplineLane that was added to this Segment.
Exceptions
std::runtime_errorWhen control_points' size is less than 2.

Here is the call graph for this function:

Here is the caller graph for this function:

Segment& operator= ( const Segment )
delete
Segment& operator= ( Segment &&  )
delete

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