pub(crate) fn _insert_new_edge_5(
        &mut self,
        site1: VSE::SiteEvent<I, F>,
        site3: VSE::SiteEvent<I, F>,
        circle: VC::CircleEvent,
        edge12_id: EdgeIndex,
        edge23_id: EdgeIndex,
    ) -> (EdgeIndex, EdgeIndex) {
        /*tln!("-> insert_new_edge_5()");
        tln!(
            "site1:{:?}\nsite3:{:?}\ncircle:{:?}\nedge12_id:{:?}\nedge23_id{:?}\n",
            &site1,
            &site3,
            &circle,
            edge12_id,
            edge23_id
        );*/
        tln!("new vertex@CE{:?}", circle);

        let is_linear = VSE::SiteEvent::<I, F>::is_linear_edge(&site1, &site3);
        let is_primary = VSE::SiteEvent::<I, F>::is_primary_edge(&site1, &site3);

        // Add a new half-edge.
        let new_edge1_id =
            self.create_and_insert_edge(CellIndex(site1.sorted_index()), is_linear, is_primary);

        // Add a new half-edge.
        let new_edge2_id =
            self.create_and_insert_edge(CellIndex(site3.sorted_index()), is_linear, is_primary);

        // Add a new Voronoi vertex.
        let new_vertex_id = self._vertex_new_2(
            TC2::<I, F>::f64_to_f(circle.raw_x()),
            TC2::<I, F>::f64_to_f(circle.raw_y()),
            circle.is_site_point(),
        );

        // Update vertex pointers of the old edges.
        self._edge_set_vertex0(Some(edge12_id), Some(new_vertex_id));
        self._edge_set_vertex0(Some(edge23_id), Some(new_vertex_id));

        // Update twin pointers.
        self.edge_set_twin_(Some(new_edge1_id), Some(new_edge2_id));
        self.edge_set_twin_(Some(new_edge2_id), Some(new_edge1_id));

        // Update vertex pointer.
        //new_edge2.vertex0(&new_vertex);
        self._edge_set_vertex0(Some(new_edge2_id), Some(new_vertex_id));

        // Update Voronoi prev/next pointers.
        //edge12->prev(&new_edge1);
        self._edge_set_prev(Some(edge12_id), Some(new_edge1_id));

        //new_edge1.next(edge12);
        self._edge_set_next(Some(new_edge1_id), Some(edge12_id));

        //edge12->twin()->next(edge23);
        let edge12_twin_id = self.edge_get_twin_(Some(edge12_id));
        self._edge_set_next(edge12_twin_id, Some(edge23_id));

        //edge23->prev(edge12->twin());
        self._edge_set_prev(Some(edge23_id), edge12_twin_id);

        //edge23->twin()->next(&new_edge2);
        let edge23_twin_id = self.edge_get_twin_(Some(edge23_id));
        self._edge_set_next(edge23_twin_id, Some(new_edge2_id));

        //new_edge2.prev(edge23->twin());
        self._edge_set_prev(Some(new_edge2_id), edge23_twin_id);

        //tln!("edge12: {:?}", self.get_edge_(edge12_id).get());
        //tln!("edge23: {:?}", self.get_edge_(edge23_id).get());
        //tln!("edges.len():{}", self.edges_.len());
        // Return a pointer to the new half-edge.
        (new_edge1_id, new_edge2_id)
    }
/// Insert a new half-edge into the output data structure with the
/// start at the point where two previously added half-edges intersect.
/// Takes as input two sites that create a new bisector, circle event
/// that corresponds to the intersection point of the two old half-edges,
/// pointers to those half-edges. Half-edges' direction goes out of the
/// new Voronoi vertex point. Returns a pair of pointers to a new half-edges.
Insert a new half-edge into the output data structure with the
start at the point where two previously added half-edges intersect.
Takes as input two sites that create a new bisector, circle event
that corresponds to the intersection point of the two old half-edges,
pointers to those half-edges. Half-edges' direction goes out of the
new Voronoi vertex point. Returns a pair of pointers to a new half-edges.
Insert a new half - edge into the output data structure with the start at the point where two previously added half - edges intersect . Takes as input two sites that create a new bisector circle event that corresponds to the intersection point of the two old half - edges pointers to those half - edges . Half - edges ' direction goes out of the new Voronoi vertex point . Returns a pair of pointers to a new half - edges .
pub(crate) fn _insert_new_edge_5(
        &mut self,
        site1: VSE::SiteEvent<I, F>,
        site3: VSE::SiteEvent<I, F>,
        circle: VC::CircleEvent,
        edge12_id: EdgeIndex,
        edge23_id: EdgeIndex,
    ) -> (EdgeIndex, EdgeIndex) {
        /*tln!("-> insert_new_edge_5()");
        tln!(
            "site1:{:?}\nsite3:{:?}\ncircle:{:?}\nedge12_id:{:?}\nedge23_id{:?}\n",
            &site1,
            &site3,
            &circle,
            edge12_id,
            edge23_id
        );*/
        tln!("new vertex@CE{:?}", circle);
        let is_linear = VSE::SiteEvent::<I, F>::is_linear_edge(&site1, &site3);
        let is_primary = VSE::SiteEvent::<I, F>::is_primary_edge(&site1, &site3);
        // Add a new half-edge.
        let new_edge1_id =
            self.create_and_insert_edge(CellIndex(site1.sorted_index()), is_linear, is_primary);
        // Add a new half-edge.
        let new_edge2_id =
            self.create_and_insert_edge(CellIndex(site3.sorted_index()), is_linear, is_primary);
        // Add a new Voronoi vertex.
        let new_vertex_id = self._vertex_new_2(
            TC2::<I, F>::f64_to_f(circle.raw_x()),
            TC2::<I, F>::f64_to_f(circle.raw_y()),
            circle.is_site_point(),
        );
        // Update vertex pointers of the old edges.
        self._edge_set_vertex0(Some(edge12_id), Some(new_vertex_id));
        self._edge_set_vertex0(Some(edge23_id), Some(new_vertex_id));
        // Update twin pointers.
        self.edge_set_twin_(Some(new_edge1_id), Some(new_edge2_id));
        self.edge_set_twin_(Some(new_edge2_id), Some(new_edge1_id));
        // Update vertex pointer.
        //new_edge2.vertex0(&new_vertex);
        self._edge_set_vertex0(Some(new_edge2_id), Some(new_vertex_id));
        // Update Voronoi prev/next pointers.
        //edge12->prev(&new_edge1);
        self._edge_set_prev(Some(edge12_id), Some(new_edge1_id));
        //new_edge1.next(edge12);
        self._edge_set_next(Some(new_edge1_id), Some(edge12_id));
        //edge12->twin()->next(edge23);
        let edge12_twin_id = self.edge_get_twin_(Some(edge12_id));
        self._edge_set_next(edge12_twin_id, Some(edge23_id));
        //edge23->prev(edge12->twin());
        self._edge_set_prev(Some(edge23_id), edge12_twin_id);
        //edge23->twin()->next(&new_edge2);
        let edge23_twin_id = self.edge_get_twin_(Some(edge23_id));
        self._edge_set_next(edge23_twin_id, Some(new_edge2_id));
        //new_edge2.prev(edge23->twin());
        self._edge_set_prev(Some(new_edge2_id), edge23_twin_id);
        //tln!("edge12: {:?}", self.get_edge_(edge12_id).get());
        //tln!("edge23: {:?}", self.get_edge_(edge23_id).get());
        //tln!("edges.len():{}", self.edges_.len());
        // Return a pointer to the new half-edge.
        (new_edge1_id, new_edge2_id)
    }
pub ( crate ) fn _insert_new_edge_5 ( & mut self , site1 : VSE :: SiteEvent < I , F > , site3 : VSE :: SiteEvent < I , F > , circle : VC :: CircleEvent , edge12_id : EdgeIndex , edge23_id : EdgeIndex , ) -> ( EdgeIndex , EdgeIndex ) { /*tln!("-> insert_new_edge_5()");
        tln!(
            "site1:{:?}\nsite3:{:?}\ncircle:{:?}\nedge12_id:{:?}\nedge23_id{:?}\n",
            &site1,
            &site3,
            &circle,
            edge12_id,
            edge23_id
        );*/ tln ! ( " " circle ) ; let is_linear = VSE :: SiteEvent :: < I , F > :: is_linear_edge ( & site1 , & site3 ) ; let is_primary = VSE :: SiteEvent :: < I , F > :: is_primary_edge ( & site1 , & site3 ) ; // Add a new half-edge. let new_edge1_id = self . create_and_insert_edge ( CellIndex ( site1 . sorted_index ( ) ) , is_linear , is_primary ) ; // Add a new half-edge. let new_edge2_id = self . create_and_insert_edge ( CellIndex ( site3 . sorted_index ( ) ) , is_linear , is_primary ) ; // Add a new Voronoi vertex. let new_vertex_id = self . _vertex_new_2 ( TC2 :: < I , F > :: f64_to_f ( circle . raw_x ( ) ) , TC2 :: < I , F > :: f64_to_f ( circle . raw_y ( ) ) , circle . is_site_point ( ) , ) ; // Update vertex pointers of the old edges. self . _edge_set_vertex0 ( Some ( edge12_id ) , Some ( new_vertex_id ) ) ; self . _edge_set_vertex0 ( Some ( edge23_id ) , Some ( new_vertex_id ) ) ; // Update twin pointers. self . edge_set_twin_ ( Some ( new_edge1_id ) , Some ( new_edge2_id ) ) ; self . edge_set_twin_ ( Some ( new_edge2_id ) , Some ( new_edge1_id ) ) ; // Update vertex pointer. //new_edge2.vertex0(&new_vertex); self . _edge_set_vertex0 ( Some ( new_edge2_id ) , Some ( new_vertex_id ) ) ; // Update Voronoi prev/next pointers. //edge12->prev(&new_edge1); self . _edge_set_prev ( Some ( edge12_id ) , Some ( new_edge1_id ) ) ; //new_edge1.next(edge12); self . _edge_set_next ( Some ( new_edge1_id ) , Some ( edge12_id ) ) ; //edge12->twin()->next(edge23); let edge12_twin_id = self . edge_get_twin_ ( Some ( edge12_id ) ) ; self . _edge_set_next ( edge12_twin_id , Some ( edge23_id ) ) ; //edge23->prev(edge12->twin()); self . _edge_set_prev ( Some ( edge23_id ) , edge12_twin_id ) ; //edge23->twin()->next(&new_edge2); let edge23_twin_id = self . edge_get_twin_ ( Some ( edge23_id ) ) ; self . _edge_set_next ( edge23_twin_id , Some ( new_edge2_id ) ) ; //new_edge2.prev(edge23->twin()); self . _edge_set_prev ( Some ( new_edge2_id ) , edge23_twin_id ) ; //tln!("edge12: {:?}", self.get_edge_(edge12_id).get()); //tln!("edge23: {:?}", self.get_edge_(edge23_id).get()); //tln!("edges.len():{}", self.edges_.len()); // Return a pointer to the new half-edge. ( new_edge1_id , new_edge2_id ) }
Insert a new half-edge into the output data structure with the
start at the point where two previously added half-edges intersect.
Insert a new half - edge into the output data structure with the start at the point where two previously added half - edges intersect .
&mut self
site1
VSE::SiteEvent<I, F>
site3
VSE::SiteEvent<I, F>
circle
VC::CircleEvent
edge12_id
EdgeIndex
edge23_id
EdgeIndex