maliput::api

Struct BranchPoint

Source
pub struct BranchPoint<'a> { /* private fields */ }
Expand description

A BranchPoint is a node in the network of a RoadGeometry at which Lanes connect to one another. A BranchPoint is a collection of LaneEnds specifying the Lanes (and, in particular, which ends of the Lanes) are connected at the BranchPoint.

LaneEnds participating in a BranchPoint are grouped into two sets, arbitrarily named “A-side” and “B-side”. LaneEnds on the same “side” have coincident into-the-lane tangent vectors, which are anti-parallel to those of LaneEnds on the other side.

Implementations§

Source§

impl<'a> BranchPoint<'a>

Source

pub fn id(&self) -> String

Get the id of the BranchPoint as a string.

Source

pub fn road_geometry(&self) -> RoadGeometry<'_>

Source

pub fn get_confluent_branches(&self, end: &LaneEnd<'_>) -> LaneEndSet<'_>

Returns the set of LaneEnds on the same side as the given LaneEnd. E.g: For a T-junction, this would return the set of LaneEnds on the merging side.

Source

pub fn get_ongoing_branches(&self, end: &LaneEnd<'_>) -> LaneEndSet<'_>

Returns the set of LaneEnds on the opposite side as the given LaneEnd. E.g: For a T-junction, this would return the LaneEnds which end flows into the junction.

Source

pub fn get_default_branch(&self, end: &LaneEnd<'_>) -> Option<LaneEnd<'_>>

Returns the default ongoing branch (if any) for the given end. This typically represents what would be considered “continuing through-traffic” from end (e.g., as opposed to a branch executing a turn).

If end has no default-branch at this BranchPoint, the return value will be None.

Source

pub fn get_a_side(&self) -> LaneEndSet<'_>

Returns the set of LaneEnds grouped together on the “A-side”.

Source

pub fn get_b_side(&self) -> LaneEndSet<'_>

Returns the set of LaneEnds grouped together on the “B-side”.

Auto Trait Implementations§

§

impl<'a> Freeze for BranchPoint<'a>

§

impl<'a> RefUnwindSafe for BranchPoint<'a>

§

impl<'a> !Send for BranchPoint<'a>

§

impl<'a> !Sync for BranchPoint<'a>

§

impl<'a> Unpin for BranchPoint<'a>

§

impl<'a> UnwindSafe for BranchPoint<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.