BaseSceneGraph::remove_nodes

This commit is contained in:
Dmitry Stepanov
2024-06-17 20:07:58 +03:00
parent 1a6d9b1ebd
commit 9e9665dd6f
+10
View File
@@ -706,6 +706,16 @@ pub trait BaseSceneGraph: AbstractSceneGraph {
self.set_root(scheme.root);
}
}
/// Removes all the nodes from the given slice.
#[inline]
fn remove_nodes(&mut self, nodes: &[Handle<Self::Node>]) {
for &node in nodes {
if self.is_valid_handle(node) {
self.remove_node(node)
}
}
}
}
pub trait SceneGraph: BaseSceneGraph {