Drain the list of handles destroyed since the last call. Swift pulls these and removes the matching SCNNodes from its retainedNodes map.
(dst: *mut u32, max: i64)
| 386 | /// Drain the list of handles destroyed since the last call. Swift pulls |
| 387 | /// these and removes the matching SCNNodes from its retainedNodes map. |
| 388 | pub fn drain_destroyed(dst: *mut u32, max: i64) -> i64 { |
| 389 | if dst.is_null() || max <= 0 { return 0; } |
| 390 | with(|inner| { |
| 391 | let n = inner.destroyed_queue.len().min(max as usize); |
| 392 | unsafe { |
| 393 | std::ptr::copy_nonoverlapping(inner.destroyed_queue.as_ptr(), dst, n); |
| 394 | } |
| 395 | inner.destroyed_queue.drain(..n); |
| 396 | n as i64 |
| 397 | }) |
| 398 | } |
| 399 | |
| 400 | pub fn copy_lights(dst: *mut Light, max: i64) -> i64 { |
| 401 | if dst.is_null() || max <= 0 { return 0; } |
no test coverage detected