mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-12 18:26:00 +00:00
Prepare to refer to operations via handles
This commit is contained in:
parent
464fcdf664
commit
b368105d34
@ -39,7 +39,7 @@ impl Operation for Vertex {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
|
||||
#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
|
||||
pub struct Triangle {
|
||||
pub vertices: [Vertex; 3],
|
||||
}
|
||||
@ -60,7 +60,7 @@ impl Operation for Triangle {
|
||||
fn vertices(&self, _: &mut Vec<Vertex>) {}
|
||||
|
||||
fn triangles(&self, triangles: &mut Vec<Triangle>) {
|
||||
triangles.push(*self)
|
||||
triangles.push(self.clone())
|
||||
}
|
||||
|
||||
fn children(&self) -> Vec<HandleAny> {
|
||||
|
@ -37,7 +37,7 @@ impl Shape {
|
||||
let triangle = triangle.into();
|
||||
|
||||
self.operations.push(OperationInSequence {
|
||||
operation: HandleAny::new(triangle),
|
||||
operation: HandleAny::new(triangle.clone()),
|
||||
previous: self
|
||||
.operations
|
||||
.last()
|
||||
|
Loading…
Reference in New Issue
Block a user