pub fn connect_edges<T, Ctr, P, ContributesToResultFn>(
    sorted_events: &[Rc<SweepEvent<T, Ctr, P>>],
    operation: Operation,
    polygon_semantics: PolygonSemantics,
    contributes_to_result: ContributesToResultFn
) -> Vec<Polygon<T>>where
    T: CoordinateType + Debug,
    ContributesToResultFn: Fn(&SweepEvent<T, Ctr, P>) -> bool,
Expand description

Given the processed and sorted events, connect the edges to polygons.

This uses the property events at the same point lie next to each other in the list of sorted events. This way it is easy to follow the contour: 1) Start at some left event, 2) go to its right event, 3) from there find a event with the same location.