forked from StudioInfinity/dyna3
Outline: encapsulate assembly data
This commit is contained in:
parent
d481181ef8
commit
e6d1e0b865
3 changed files with 44 additions and 32 deletions
16
app-proto/sketch-outline/src/assembly.rs
Normal file
16
app-proto/sketch-outline/src/assembly.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
use nalgebra::DVector;
|
||||
use sycamore::reactive::Signal;
|
||||
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub struct Element {
|
||||
pub id: String,
|
||||
pub label: String,
|
||||
pub color: [f32; 3],
|
||||
pub rep: DVector<f64>,
|
||||
}
|
||||
|
||||
// a complete, view-independent description of an assembly
|
||||
pub struct Assembly {
|
||||
// the order of the elements is arbitrary, and it could change at any time
|
||||
pub elements: Signal<Vec<Element>>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue