WIP: Manipulate the assembly #29
@ -318,16 +318,16 @@ pub fn Display() -> View {
|
||||
let rep = state.assembly.elements.with_untracked(
|
||||
|elts| elts[sel].representation.get_clone_untracked()
|
||||
);
|
||||
let vel_field_z = DMatrix::from_column_slice(5, 5, &[
|
||||
0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
let vel_field_x = DMatrix::from_column_slice(5, 5, &[
|
||||
0.0, 0.0, 0.0, 0.0, 1.0,
|
||||
0.0, 0.0, 2.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
2.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0
|
||||
]);
|
||||
let translate_x = translate_pos_x_val - translate_neg_x_val;
|
||||
if translate_x != 0.0 {
|
||||
let vel = translate_x * vel_field_z * rep;
|
||||
let vel = translate_x * vel_field_x * rep;
|
||||
let elt_motion: DVector<f64> = time_step * TRANSLATION_SPEED * vel;
|
||||
assembly_for_raf.deform(vec![(sel, elt_motion.as_view())]);
|
||||
scene_changed.set(true);
|
||||
|
Loading…
Reference in New Issue
Block a user