mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 19:08:28 +00:00
Implement TranslateExt
for HalfEdge
This commit is contained in:
parent
f23ab21a31
commit
ffdfb7e2d6
@ -14,15 +14,19 @@ impl TranslateExt for Face {
|
||||
|
||||
Face::new(
|
||||
self.surface().translate(offset),
|
||||
self.half_edges().map(|half_edge| {
|
||||
Handle::new(HalfEdge::new(Handle::new(
|
||||
half_edge.start().translate(offset),
|
||||
)))
|
||||
}),
|
||||
self.half_edges()
|
||||
.map(|half_edge| Handle::new(half_edge.translate(offset))),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl TranslateExt for HalfEdge {
|
||||
fn translate(&self, offset: impl Into<Vector<3>>) -> Self {
|
||||
let start = self.start().translate(offset);
|
||||
HalfEdge::new(Handle::new(start))
|
||||
}
|
||||
}
|
||||
|
||||
impl TranslateExt for Vertex {
|
||||
fn translate(&self, offset: impl Into<Vector<3>>) -> Self {
|
||||
let offset = offset.into();
|
||||
|
Loading…
Reference in New Issue
Block a user