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>
Sourcepub fn road_geometry(&self) -> RoadGeometry<'_>
pub fn road_geometry(&self) -> RoadGeometry<'_>
Returns the RoadGeometry to which this BranchPoint belongs.
§Returns
A RoadGeometry containing the RoadGeometry to which this BranchPoint belongs.
Sourcepub fn get_confluent_branches(
&self,
end: &LaneEnd<'_>,
) -> Result<LaneEndSet<'_>, MaliputError>
pub fn get_confluent_branches( &self, end: &LaneEnd<'_>, ) -> Result<LaneEndSet<'_>, MaliputError>
Sourcepub fn get_ongoing_branches(
&self,
end: &LaneEnd<'_>,
) -> Result<LaneEndSet<'_>, MaliputError>
pub fn get_ongoing_branches( &self, end: &LaneEnd<'_>, ) -> Result<LaneEndSet<'_>, MaliputError>
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.
§Arguments
end
- The LaneEnd for which to get the default branch.
§Returns
An Option<LaneEnd>
containing the default branch if it exists.
If no default branch exists, it returns 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”.
§Returns
A LaneEndSet containing the LaneEnds on the “A-side” of the BranchPoint.
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”.
§Returns
A LaneEndSet containing the LaneEnds on the “B-side” of the BranchPoint. This is the opposite side of the “A-side”.