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.
Sourcepub fn intersects(&self, other: &LaneSRoute, tolerance: f64) -> bool
pub fn intersects(&self, other: &LaneSRoute, tolerance: f64) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LaneSRoute
impl RefUnwindSafe for LaneSRoute
impl !Send for LaneSRoute
impl !Sync for LaneSRoute
impl Unpin for LaneSRoute
impl UnwindSafe for LaneSRoute
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more