Display: say "assembly" instead of "construction"

Update variable names and comments in code from the display prototype.
This commit is contained in:
Aaron Fenyes 2024-09-15 11:41:16 -07:00
parent 7cb01bab82
commit e2d3af2867
2 changed files with 6 additions and 6 deletions

View File

@ -266,7 +266,7 @@ pub fn Display() -> View {
frames_since_last_sample = 0;
}
// find the map from construction space to world space
// find the map from assembly space to world space
let location = {
let u = -location_z;
DMatrix::from_column_slice(5, 5, &[
@ -277,12 +277,12 @@ pub fn Display() -> View {
0.0, 0.0, 0.0, 0.0, 1.0
])
};
let construction_to_world = &location * &orientation;
let assembly_to_world = &location * &orientation;
// get the construction
// get the assembly
let elements = state.assembly.elements.get_clone();
let element_iter = (&elements).into_iter();
let reps_world: Vec<_> = element_iter.clone().map(|elt| &construction_to_world * &elt.rep).collect();
let reps_world: Vec<_> = element_iter.clone().map(|elt| &assembly_to_world * &elt.rep).collect();
let colors: Vec<_> = element_iter.map(|elt| elt.color).collect();
// set the resolution
@ -291,7 +291,7 @@ pub fn Display() -> View {
ctx.uniform2f(resolution_loc.as_ref(), width, height);
ctx.uniform1f(shortdim_loc.as_ref(), width.min(height));
// pass the construction
// pass the assembly
ctx.uniform1i(sphere_cnt_loc.as_ref(), elements.len() as i32);
for n in 0..reps_world.len() {
let v = &reps_world[n];

View File

@ -13,7 +13,7 @@ struct vecInv {
// --- uniforms ---
// construction
// assembly
const int SPHERE_MAX = 200;
uniform int sphere_cnt;
uniform vecInv sphere_list[SPHERE_MAX];