pub struct RoadPositionResult {
pub road_position: RoadPosition,
pub nearest_position: InertialPosition,
pub distance: f64,
}
Expand description
Represents the result of a RoadPosition query.
This struct contains the RoadPosition
, the nearest InertialPosition
to that RoadPosition
,
and the distance between the input InertialPosition
and the nearest InertialPosition
.
This struct is typically used as return type for the methods: RoadGeometry::to_road_position and RoadGeometry::find_road_positions.
Fields§
§road_position: RoadPosition
The candidate RoadPosition returned by the query.
nearest_position: InertialPosition
The nearest InertialPosition to the candidate RoadPosition. This is the position in the inertial frame that is closest to the candidate RoadPosition
distance: f64
The distance between the input InertialPosition and the nearest InertialPosition.
Implementations§
Source§impl RoadPositionResult
impl RoadPositionResult
Sourcepub fn new(
road_position: RoadPosition,
nearest_position: InertialPosition,
distance: f64,
) -> RoadPositionResult
pub fn new( road_position: RoadPosition, nearest_position: InertialPosition, distance: f64, ) -> RoadPositionResult
Create a new RoadPositionResult
with the given road_position
, nearest_position
, and distance
.
Auto Trait Implementations§
impl Freeze for RoadPositionResult
impl RefUnwindSafe for RoadPositionResult
impl !Send for RoadPositionResult
impl !Sync for RoadPositionResult
impl Unpin for RoadPositionResult
impl UnwindSafe for RoadPositionResult
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