(&mut self)
| 295 | } |
| 296 | |
| 297 | pub fn create_node(&mut self) -> f64 { |
| 298 | // New nodes default to `cast_shadow = true`, so the first |
| 299 | // `set_transform` + `update_geometry` will dirty shadows |
| 300 | // anyway. Bumping here too costs nothing and keeps the |
| 301 | // invalidation story simple. |
| 302 | self.shadow_version = self.shadow_version.wrapping_add(1); |
| 303 | self.tlas_version = self.tlas_version.wrapping_add(1); |
| 304 | self.nodes.alloc(SceneNode::new()) |
| 305 | } |
| 306 | |
| 307 | pub fn destroy_node(&mut self, handle: f64) { |
| 308 | if let Some(node) = self.nodes.get(handle) { |
no test coverage detected