Add RemoveChildNodes
This commit is contained in:
@@ -71,6 +71,15 @@ namespace OpenVulkano::Scene
|
||||
}
|
||||
}
|
||||
|
||||
void Node::RemoveChildNodes()
|
||||
{
|
||||
for (Node* node : children)
|
||||
{
|
||||
node->SetParent(nullptr);
|
||||
}
|
||||
children.clear();
|
||||
}
|
||||
|
||||
void Node::AddDrawable(Drawable* drawable)
|
||||
{
|
||||
if (scene) drawable->SetScene(scene);
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace OpenVulkano::Scene
|
||||
|
||||
void RemoveChild(Node* node);
|
||||
|
||||
void RemoveChildNodes();
|
||||
|
||||
inline void RemoveChild(Drawable* drawable) { RemoveDrawable(drawable); }
|
||||
|
||||
void AddDrawable(Drawable* drawable);
|
||||
|
||||
Reference in New Issue
Block a user