Remove a node and invalidate old ids for that slot. Successful removal bumps the slot generation and pushes the slot onto the free list for later reuse.
(&mut self, id: NodeID)
| 221 | pub fn physics_revision(&self) -> u64 { |
| 222 | self.physics_revision |
| 223 | } |
| 224 | |
| 225 | /// Record a possible physics-relevant data change. Pairs with |
| 226 | /// [`Self::get_mut_untracked_non_physics`]. |
| 227 | #[inline] |
| 228 | pub fn mark_physics_change(&mut self) { |
| 229 | self.physics_revision = self.physics_revision.wrapping_add(1); |
| 230 | } |
| 231 | |
| 232 | /// Structural revision: chg only on insert / remove / clear / reparent — |
| 233 | /// NOT on data mutations. Cheap gate 4 systems that care only whether the |
| 234 | /// node set or topology chg (e.g. audio scene-flag rescan). |
| 235 | #[inline] |
| 236 | pub fn structural_revision(&self) -> u64 { |
| 237 | self.structural_revision |
| 238 | } |
| 239 | |
| 240 | #[inline] |
| 241 | fn bump_mutation_revision(&mut self) { |
| 242 | self.mutation_revision = self.mutation_revision.wrapping_add(1); |