Skip to content

Commit

Permalink
Remove leftover function
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoeoef committed May 17, 2024
1 parent ca64872 commit da8ba59
Showing 1 changed file with 1 addition and 46 deletions.
47 changes: 1 addition & 46 deletions src/delaunay_core/triangulation_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::HintGenerator;
use crate::Point2;
use crate::{HasPosition, InsertionError, PositionInTriangulation, Triangulation};

use alloc::{collections::VecDeque, vec::Vec};
use alloc::vec::Vec;

impl<T> TriangulationExt for T where T: Triangulation + ?Sized {}

Expand Down Expand Up @@ -255,51 +255,6 @@ pub trait TriangulationExt: Triangulation {
result
}

fn get_vertex_facing_edges<ForwardPredicate, BackwardPredicate>(
&self,
start_edge: FixedDirectedEdgeHandle,
position: Point2<<Self::Vertex as HasPosition>::Scalar>,
forward_predicate: ForwardPredicate,
backward_predicate: BackwardPredicate,
) -> VecDeque<FixedDirectedEdgeHandle>
where
ForwardPredicate: Fn(
DirectedEdgeHandle<Self::Vertex, Self::DirectedEdge, Self::UndirectedEdge, Self::Face>,
) -> bool,
BackwardPredicate: Fn(
DirectedEdgeHandle<Self::Vertex, Self::DirectedEdge, Self::UndirectedEdge, Self::Face>,
) -> bool,
{
let mut result = VecDeque::with_capacity(8);
let mut current_edge_forward = self.directed_edge(start_edge);

debug_assert!(current_edge_forward.side_query(position).is_on_left_side());

result.push_back(current_edge_forward.fix());

loop {
current_edge_forward = current_edge_forward.next();

if forward_predicate(current_edge_forward) {
result.push_back(current_edge_forward.fix());
} else {
break;
}
}

let mut current_edge_backward = self.directed_edge(start_edge);
loop {
current_edge_backward = current_edge_backward.prev();

if backward_predicate(current_edge_backward) {
result.push_front(current_edge_backward.fix());
} else {
break;
}
}
result
}

fn insert_into_face(
&mut self,
face: FixedFaceHandle<InnerTag>,
Expand Down

0 comments on commit da8ba59

Please sign in to comment.