Give each element a serial number #22

Merged
glen merged 6 commits from element-serial into main 2024-11-22 02:25:11 +00:00
Showing only changes of commit c5f09b99b3 - Show all commits

View File

@ -13,6 +13,11 @@ pub type ConstraintKey = usize;
pub type ElementColor = [f32; 3]; pub type ElementColor = [f32; 3];
/* KLUDGE */
// we should reconsider this design when we build a system for switching between
// assemblies. at that point, we might want to switch to hierarchical keys,
// where each each element has a key that identifies it within its assembly and
// each assembly has a key that identifies it within the sesssion
static NEXT_ELEMENT_SERIAL: AtomicU64 = AtomicU64::new(0); static NEXT_ELEMENT_SERIAL: AtomicU64 = AtomicU64::new(0);
#[derive(Clone, PartialEq)] #[derive(Clone, PartialEq)]