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>
impl<'a> BranchPoint<'a>
pub fn road_geometry(&self) -> RoadGeometry<'_>
Sourcepub fn get_confluent_branches(&self, end: &LaneEnd<'_>) -> LaneEndSet<'_>
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.
Sourcepub fn get_ongoing_branches(&self, end: &LaneEnd<'_>) -> LaneEndSet<'_>
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.
Sourcepub fn get_default_branch(&self, end: &LaneEnd<'_>) -> Option<LaneEnd<'_>>
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.
Sourcepub fn get_a_side(&self) -> LaneEndSet<'_>
pub fn get_a_side(&self) -> LaneEndSet<'_>
Returns the set of LaneEnds grouped together on the “A-side”.
Sourcepub fn get_b_side(&self) -> LaneEndSet<'_>
pub fn get_b_side(&self) -> LaneEndSet<'_>
Returns the set of LaneEnds grouped together on the “B-side”.