pub struct DriverProgress {
pub segment: usize,
pub segment_fraction: f32,
pub distance_along: f32,
pub path_length: f32,
pub distance_to_path: f32,
}Expand description
Projection onto the supplied closed path, as demonstrated by
RacingDriver::status. Equal-distance segments choose the lowest index.
Intersections and teleports can change the projection discontinuously; it
does not establish that the driver visited any checkpoint.
Fields§
§segment: usizeStart index of the closest segment, including the closing segment.
segment_fraction: f32Clamped fraction along that segment in 0..=1.
distance_along: f32Distance along the path from its first vertex, in world units.
path_length: f32Total length, including the closing segment, in world units.
distance_to_path: f32Unsigned distance from the supplied position to its projection.
Trait Implementations§
Source§impl Clone for DriverProgress
impl Clone for DriverProgress
Source§fn clone(&self) -> DriverProgress
fn clone(&self) -> DriverProgress
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DriverProgress
impl Debug for DriverProgress
Source§impl PartialEq for DriverProgress
impl PartialEq for DriverProgress
impl Copy for DriverProgress
impl StructuralPartialEq for DriverProgress
Auto Trait Implementations§
impl Freeze for DriverProgress
impl RefUnwindSafe for DriverProgress
impl Send for DriverProgress
impl Sync for DriverProgress
impl Unpin for DriverProgress
impl UnwindSafe for DriverProgress
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