pub fn possible_destination_roads(
map: &Map,
from_r: RoadID,
i: Option<IntersectionID>,
) -> HashSet<RoadID>
Expand description
Returns a HashSet of all roads which are connected by driving from RoadID. This accounts for oneway restrictions, but not turn restrictions. eg:
- If a oneway restriction on either the ‘from_road’ or the ‘target_road’ would prevent driving from source to destination, then ‘target_road’ it will NOT be included in the result.
- If a turn restriction exists and is the only thing that would prevent driving from ‘from_road’ or the ‘target_road’, then the ‘target_road’ will still be included in the result.
i
is Optional. If i
is Some
then, it must be connected to from_r
. It is used to filter
the results to return only the destination roads that connect to i
.