fn extend_edges(beachline: &BeachLine, dcel: &mut DCEL) {
    let mut current_node = beachline.tree_minimum(beachline.root);
    trace!("\n\n");
    loop {
        match beachline.nodes[current_node].item {
            BeachItem::Leaf(_) => {}
            BeachItem::Internal(ref breakpoint) => {
                let this_edge = breakpoint.halfedge;
                trace!(
                    "Extending halfedge {:?} with breakpoint {:?}, {:?}",
                    this_edge,
                    breakpoint.left_site,
                    breakpoint.right_site
                );
                let this_x = get_breakpoint_x(&breakpoint, -1000.0);
                let this_y = get_breakpoint_y(&breakpoint, -1000.0);

                let vert = Vertex {
                    coordinates: Point::new(this_x, this_y),
                    incident_edge: this_edge,
                    alive: true,
                };
                let vert_ind = dcel.vertices.len();

                dcel.halfedges[this_edge].origin = vert_ind;
                let this_twin = dcel.halfedges[this_edge].twin;
                dcel.halfedges[this_twin].next = this_edge;

                dcel.vertices.push(vert);
            }
        }
        if let Some(next_node) = beachline.successor(current_node) {
            current_node = next_node;
        } else {
            break;
        }
    }
}
// This just extends the edges past the end of the bounding box
This just extends the edges past the end of the bounding box
This just extends the edges past the end of the bounding box
fn extend_edges(beachline: &BeachLine, dcel: &mut DCEL) {
    let mut current_node = beachline.tree_minimum(beachline.root);
    trace!("\n\n");
    loop {
        match beachline.nodes[current_node].item {
            BeachItem::Leaf(_) => {}
            BeachItem::Internal(ref breakpoint) => {
                let this_edge = breakpoint.halfedge;
                trace!(
                    "Extending halfedge {:?} with breakpoint {:?}, {:?}",
                    this_edge,
                    breakpoint.left_site,
                    breakpoint.right_site
                );
                let this_x = get_breakpoint_x(&breakpoint, -1000.0);
                let this_y = get_breakpoint_y(&breakpoint, -1000.0);
                let vert = Vertex {
                    coordinates: Point::new(this_x, this_y),
                    incident_edge: this_edge,
                    alive: true,
                };
                let vert_ind = dcel.vertices.len();
                dcel.halfedges[this_edge].origin = vert_ind;
                let this_twin = dcel.halfedges[this_edge].twin;
                dcel.halfedges[this_twin].next = this_edge;
                dcel.vertices.push(vert);
            }
        }
        if let Some(next_node) = beachline.successor(current_node) {
            current_node = next_node;
        } else {
            break;
        }
    }
}
fn extend_edges ( beachline : & BeachLine , dcel : & mut DCEL ) { let mut current_node = beachline . tree_minimum ( beachline . root ) ; trace ! ( " \n \n " ) ; loop { match beachline . nodes [ current_node ] . item { BeachItem :: Leaf ( _ ) => { } BeachItem :: Internal ( ref breakpoint ) => { let this_edge = breakpoint . halfedge ; trace ! ( " " this_edge breakpoint left_site breakpoint right_site ) ; let this_x = get_breakpoint_x ( & breakpoint , - 1000.0 ) ; let this_y = get_breakpoint_y ( & breakpoint , - 1000.0 ) ; let vert = Vertex { coordinates : Point :: new ( this_x , this_y ) , incident_edge : this_edge , alive : true , } ; let vert_ind = dcel . vertices . len ( ) ; dcel . halfedges [ this_edge ] . origin = vert_ind ; let this_twin = dcel . halfedges [ this_edge ] . twin ; dcel . halfedges [ this_twin ] . next = this_edge ; dcel . vertices . push ( vert ) ; } } if let Some ( next_node ) = beachline . successor ( current_node ) { current_node = next_node ; } else { break ; } } }
This just extends the edges past the end of the bounding box
This just extends the edges past the end of the bounding box
beachline
&BeachLine
dcel
&mut DCEL
beachline
&BeachLine
dcel
&mut DCEL