Skip to main content

route_hops

Function route_hops 

Source
pub fn route_hops<'a>(
    routes: impl IntoIterator<Item = &'a RouteGeometry>,
) -> Vec<Vec<Crossing>>
Expand description

The hops each of routes draws, in the order given. Each crossing point resolves to a single orientation and every route crossing it in that orientation gets a matching hop (see compute_crossings).

The order must be draw order, since a lone crossing hops whichever wire is drawn later; and the set must hold every wire through any point whose hop is wanted, since a busier point hops differently from a lone pair. Any set the spatial index reports for a rectangle holds both for the points inside it, which is why hops are computed where the wires are drawn rather than stored beside them.