maliput
LaneSRoute Class Reference

Detailed Description

A route, possibly spanning multiple (end-to-end) lanes.

The sequence of LaneSRanges should be contiguous by either presenting laterally adjacent LaneSRanges, or consecutive LaneSRanges. (In other words, taken as a Lane-space path with r=0 and h=0, it should present a G1-continuous curve.)

#include <include/maliput/api/regions.h>

Public Member Functions

 MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN (LaneSRoute)
 
 LaneSRoute ()=default
 Default constructor: constructs an empty route. More...
 
 LaneSRoute (const std::vector< LaneSRange > &ranges)
 Constructs a LaneSRoute from the given sequence of LaneSRanges. More...
 
const std::vector< LaneSRange > & ranges () const
 Returns the sequence of LaneSRanges. More...
 
double length () const
 Computes the accumulated length of all LaneSRanges. More...
 
bool Intersects (const LaneSRoute &lane_s_route, double tolerance) const
 Determines whether this LaneSRoute intersects with lane_s_route. More...
 

Constructor & Destructor Documentation

◆ LaneSRoute() [1/2]

LaneSRoute ( )
default

Default constructor: constructs an empty route.

◆ LaneSRoute() [2/2]

LaneSRoute ( const std::vector< LaneSRange > &  ranges)
explicit

Constructs a LaneSRoute from the given sequence of LaneSRanges.

Parameters
rangesA sequence of LaneSRanges.

Member Function Documentation

◆ Intersects()

bool Intersects ( const LaneSRoute lane_s_route,
double  tolerance 
) const

Determines whether this LaneSRoute intersects with lane_s_route.

LaneSRoutes intersection is evaluated first by LaneSRange's LaneId coincidence, then LaneSRange::Intersects() is used.

tolerance will modify this LaneSRoute's ranges and lane_s_route 's ranges by increasing the maximum and reducing the minimum of each range. When tolerance is negative, it shrinks both ranges.

Parameters
lane_s_routeThe LaneSRoute to compute the intersection with.
toleranceThe tolerance to use to evaluate the intersection.
Returns
true When lane_s_route intersects this LaneSRoute.

◆ length()

double length ( ) const

Computes the accumulated length of all LaneSRanges.

Returns
The accumulated length of all LaneSRanges.

◆ MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN()

MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN ( LaneSRoute  )

◆ ranges()

const std::vector<LaneSRange>& ranges ( ) const

Returns the sequence of LaneSRanges.

Returns
A vector of LaneSRanges.

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