mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-07 11:28: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(
|
Face::new(
|
||||||
self.surface().translate(offset),
|
self.surface().translate(offset),
|
||||||
self.half_edges().map(|half_edge| {
|
self.half_edges()
|
||||||
Handle::new(HalfEdge::new(Handle::new(
|
.map(|half_edge| Handle::new(half_edge.translate(offset))),
|
||||||
half_edge.start().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 {
|
impl TranslateExt for Vertex {
|
||||||
fn translate(&self, offset: impl Into<Vector<3>>) -> Self {
|
fn translate(&self, offset: impl Into<Vector<3>>) -> Self {
|
||||||
let offset = offset.into();
|
let offset = offset.into();
|
||||||
|
Loading…
Reference in New Issue
Block a user