pub struct RoadPosition { /* private fields */ }Expand description
A position in the road network compound by a specific lane and a lane-frame position in that lane. This position is defined by a Lane and a LanePosition.
Implementations§
Source§impl RoadPosition
impl RoadPosition
Sourcepub fn new(lane: &Lane<'_>, lane_pos: &LanePosition) -> RoadPosition
pub fn new(lane: &Lane<'_>, lane_pos: &LanePosition) -> RoadPosition
Create a new RoadPosition with the given lane and lane_pos.
§Arguments
lane- A reference to a Lane that thisRoadPositionis associated with.lane_pos- A reference to a LanePosition that defines the position within the lane.
§Returns
A new RoadPosition instance.
Sourcepub fn to_inertial_position(&self) -> Result<InertialPosition, MaliputError>
pub fn to_inertial_position(&self) -> Result<InertialPosition, MaliputError>
Computes the InertialPosition corresponding to this RoadPosition.
§Notes
This is an indirection to Lane::to_inertial_position method.
§Returns
An InertialPosition corresponding to this RoadPosition.
Sourcepub fn pos(&self) -> LanePosition
pub fn pos(&self) -> LanePosition
Gets the LanePosition associated with this RoadPosition.
§Returns
A LanePosition that defines the position within the lane for this RoadPosition.
Auto Trait Implementations§
impl Freeze for RoadPosition
impl RefUnwindSafe for RoadPosition
impl !Send for RoadPosition
impl !Sync for RoadPosition
impl Unpin for RoadPosition
impl UnwindSafe for RoadPosition
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