Render constraint lists dynamically

This commit is contained in:
Aaron Fenyes 2024-11-01 04:25:03 -07:00
parent cc126fc527
commit ce9b114dd6
3 changed files with 28 additions and 25 deletions

View file

@ -12,7 +12,7 @@ fn load_gen_assemb(assembly: &Assembly) {
label: String::from("Castor"),
color: [1.00_f32, 0.25_f32, 0.00_f32],
representation: engine::sphere(0.5, 0.5, 0.0, 1.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -22,7 +22,7 @@ fn load_gen_assemb(assembly: &Assembly) {
label: String::from("Pollux"),
color: [0.00_f32, 0.25_f32, 1.00_f32],
representation: engine::sphere(-0.5, -0.5, 0.0, 1.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -32,7 +32,7 @@ fn load_gen_assemb(assembly: &Assembly) {
label: String::from("Ursa major"),
color: [0.25_f32, 0.00_f32, 1.00_f32],
representation: engine::sphere(-0.5, 0.5, 0.0, 0.75),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -42,7 +42,7 @@ fn load_gen_assemb(assembly: &Assembly) {
label: String::from("Ursa minor"),
color: [0.25_f32, 1.00_f32, 0.00_f32],
representation: engine::sphere(0.5, -0.5, 0.0, 0.5),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -52,7 +52,7 @@ fn load_gen_assemb(assembly: &Assembly) {
label: String::from("Deimos"),
color: [0.75_f32, 0.75_f32, 0.00_f32],
representation: engine::sphere(0.0, 0.15, 1.0, 0.25),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -62,7 +62,7 @@ fn load_gen_assemb(assembly: &Assembly) {
label: String::from("Phobos"),
color: [0.00_f32, 0.75_f32, 0.50_f32],
representation: engine::sphere(0.0, -0.15, -1.0, 0.25),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -77,7 +77,7 @@ fn load_low_curv_assemb(assembly: &Assembly) {
label: "Central".to_string(),
color: [0.75_f32, 0.75_f32, 0.75_f32],
representation: engine::sphere(0.0, 0.0, 0.0, 1.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -87,7 +87,7 @@ fn load_low_curv_assemb(assembly: &Assembly) {
label: "Assembly plane".to_string(),
color: [0.75_f32, 0.75_f32, 0.75_f32],
representation: engine::sphere_with_offset(0.0, 0.0, 1.0, 0.0, 0.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -97,7 +97,7 @@ fn load_low_curv_assemb(assembly: &Assembly) {
label: "Side 1".to_string(),
color: [1.00_f32, 0.00_f32, 0.25_f32],
representation: engine::sphere_with_offset(1.0, 0.0, 0.0, 1.0, 0.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -107,7 +107,7 @@ fn load_low_curv_assemb(assembly: &Assembly) {
label: "Side 2".to_string(),
color: [0.25_f32, 1.00_f32, 0.00_f32],
representation: engine::sphere_with_offset(-0.5, a, 0.0, 1.0, 0.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -117,7 +117,7 @@ fn load_low_curv_assemb(assembly: &Assembly) {
label: "Side 3".to_string(),
color: [0.00_f32, 0.25_f32, 1.00_f32],
representation: engine::sphere_with_offset(-0.5, -a, 0.0, 1.0, 0.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -127,7 +127,7 @@ fn load_low_curv_assemb(assembly: &Assembly) {
label: "Corner 1".to_string(),
color: [0.75_f32, 0.75_f32, 0.75_f32],
representation: engine::sphere(-4.0/3.0, 0.0, 0.0, 1.0/3.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -137,7 +137,7 @@ fn load_low_curv_assemb(assembly: &Assembly) {
label: "Corner 2".to_string(),
color: [0.75_f32, 0.75_f32, 0.75_f32],
representation: engine::sphere(2.0/3.0, -4.0/3.0 * a, 0.0, 1.0/3.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);
@ -147,7 +147,7 @@ fn load_low_curv_assemb(assembly: &Assembly) {
label: String::from("Corner 3"),
color: [0.75_f32, 0.75_f32, 0.75_f32],
representation: engine::sphere(2.0/3.0, 4.0/3.0 * a, 0.0, 1.0/3.0),
constraints: BTreeSet::default(),
constraints: create_signal(BTreeSet::default()),
index: 0
}
);