pub struct RouteProjection {
pub position: Vec3,
pub direction: Vec3,
pub segment: usize,
pub segment_fraction: f64,
pub distance: f64,
pub progress: f64,
pub distance_to_route: f64,
}Expand description
Nearest geometric observation from Route3::project. This is not evidence
of visiting checkpoints or completing laps. See that method for an example.
Fields§
§position: Vec3§direction: Vec3Unit tangent of the selected segment, including at its endpoints. Zero for a route consisting only of coincident points.
segment: usizeStart vertex of the selected segment. The closing segment starts at the last vertex; a route consisting only of coincident points uses zero.
segment_fraction: f64Clamped fraction along the selected segment, in 0..=1.
distance: f64Arc distance from the first vertex, in world units. The closed seam is canonicalized to zero; no lap count is retained.
progress: f64Arc distance divided by route length, or zero for a zero-length route.
distance_to_route: f64Unsigned world-space distance from the query to its projection, computed in f64 before rounding the returned position to Vec3.
Trait Implementations§
Source§impl Clone for RouteProjection
impl Clone for RouteProjection
Source§fn clone(&self) -> RouteProjection
fn clone(&self) -> RouteProjection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more