Application prototype #14
@ -1,6 +1,6 @@
|
|||||||
use nalgebra::DVector;
|
use nalgebra::DVector;
|
||||||
use rustc_hash::FxHashSet;
|
|
||||||
use slab::Slab;
|
use slab::Slab;
|
||||||
|
use std::collections::BTreeSet;
|
||||||
use sycamore::prelude::*;
|
use sycamore::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq)]
|
#[derive(Clone, PartialEq)]
|
||||||
@ -9,7 +9,7 @@ pub struct Element {
|
|||||||
pub label: String,
|
pub label: String,
|
||||||
pub color: [f32; 3],
|
pub color: [f32; 3],
|
||||||
pub rep: DVector<f64>,
|
pub rep: DVector<f64>,
|
||||||
pub constraints: FxHashSet<usize>
|
pub constraints: BTreeSet<usize>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
@ -5,6 +5,7 @@ mod outline;
|
|||||||
|
|
||||||
use nalgebra::DVector;
|
use nalgebra::DVector;
|
||||||
use rustc_hash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
|
use std::collections::BTreeSet;
|
||||||
use sycamore::prelude::*;
|
use sycamore::prelude::*;
|
||||||
|
|
||||||
use add_remove::AddRemove;
|
use add_remove::AddRemove;
|
||||||
@ -37,7 +38,7 @@ fn main() {
|
|||||||
label: String::from("Wing A"),
|
label: String::from("Wing A"),
|
||||||
color: [1.00_f32, 0.25_f32, 0.00_f32],
|
color: [1.00_f32, 0.25_f32, 0.00_f32],
|
||||||
rep: DVector::<f64>::from_column_slice(&[0.5, 0.5, 0.0, 0.5, -0.25]),
|
rep: DVector::<f64>::from_column_slice(&[0.5, 0.5, 0.0, 0.5, -0.25]),
|
||||||
constraints: FxHashSet::default()
|
constraints: BTreeSet::default()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -48,7 +49,7 @@ fn main() {
|
|||||||
label: String::from("Wing B"),
|
label: String::from("Wing B"),
|
||||||
color: [0.00_f32, 0.25_f32, 1.00_f32],
|
color: [0.00_f32, 0.25_f32, 1.00_f32],
|
||||||
rep: DVector::<f64>::from_column_slice(&[-0.5, -0.5, 0.0, 0.5, -0.25]),
|
rep: DVector::<f64>::from_column_slice(&[-0.5, -0.5, 0.0, 0.5, -0.25]),
|
||||||
constraints: FxHashSet::default()
|
constraints: BTreeSet::default()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -59,7 +60,7 @@ fn main() {
|
|||||||
label: String::from("Central"),
|
label: String::from("Central"),
|
||||||
color: [0.75_f32, 0.75_f32, 0.75_f32],
|
color: [0.75_f32, 0.75_f32, 0.75_f32],
|
||||||
rep: DVector::<f64>::from_column_slice(&[0.0, 0.0, 0.0, 0.4, -0.625]),
|
rep: DVector::<f64>::from_column_slice(&[0.0, 0.0, 0.0, 0.4, -0.625]),
|
||||||
constraints: FxHashSet::default()
|
constraints: BTreeSet::default()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -148,7 +148,7 @@ pub fn Outline() -> View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
key=|(key, _)| key.clone()
|
key=|(key, elt)| (key.clone(), elt.constraints.clone())
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user