Outline: encapsulate assembly data

This commit is contained in:
Aaron Fenyes 2024-09-13 00:40:34 -07:00
parent d481181ef8
commit e6d1e0b865
3 changed files with 44 additions and 32 deletions

View 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>>
}