mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-04 09:58:27 +00:00
Simplify
This commit is contained in:
parent
1f59100a90
commit
20ad5a3572
@ -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()
|
||||
|
@ -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),
|
||||
}
|
||||
|
@ -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])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user