This commit is contained in:
Hanno Braun 2025-02-24 19:33:21 +01:00
parent 1f59100a90
commit 20ad5a3572
4 changed files with 4 additions and 10 deletions

View File

@ -65,11 +65,11 @@ fn points(
// tells us how the different 3D points must connect, we use the
// original 3D points to build those triangles. We never convert
// the 2D points back into 3D.
let point_surface = surface.project_point(half_edge.start().point);
let point_surface = surface.project_point(half_edge.start.point);
TriangulationPoint {
point_surface,
point_vertex: half_edge.start().point,
point_vertex: half_edge.start.point,
}
})
.collect()

View File

@ -22,7 +22,7 @@ impl TranslateExt for Face {
impl TranslateExt for HalfEdge {
fn translate(&self, offset: impl Into<Vector<3>>) -> Self {
let start = self.start().translate(offset);
let start = self.start.translate(offset);
HalfEdge {
start: Handle::new(start),
}

View File

@ -42,7 +42,7 @@ impl Face {
self.half_edges
.iter()
.circular_tuple_windows()
.map(|(a, b)| [a.start(), b.start()])
.map(|(a, b)| [&a.start, &b.start])
}
}

View File

@ -11,12 +11,6 @@ pub struct HalfEdge {
pub start: Handle<Vertex>,
}
impl HalfEdge {
pub fn start(&self) -> &Handle<Vertex> {
&self.start
}
}
impl Object for HalfEdge {
fn display(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "HalfEdge")