pub struct LaneSRoute { /* private fields */ }Expand 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.)
Implementations§
Source§impl LaneSRoute
impl LaneSRoute
Sourcepub fn new(ranges: Vec<LaneSRange>) -> LaneSRoute
pub fn new(ranges: Vec<LaneSRange>) -> LaneSRoute
Creates a new LaneSRoute with the given ranges.
§Arguments
ranges- A vector of LaneSRange to create the LaneSRoute.
§Returns
A new LaneSRoute instance containing the provided ranges.
Sourcepub fn ranges(&self) -> Vec<LaneSRange>
pub fn ranges(&self) -> Vec<LaneSRange>
Sourcepub fn length(&self) -> f64
pub fn length(&self) -> f64
Computes the accumulated length of all LaneSRanges.
§Returns
A f64 representing the total length of the LaneSRoute.