Add AddDrawableIfParentless function
This commit is contained in:
@@ -74,6 +74,12 @@ namespace OpenVulkano::Scene
|
||||
drawables.push_back(drawable);
|
||||
}
|
||||
|
||||
void Node::AddDrawableIfParentless(Drawable* drawable)
|
||||
{
|
||||
if (drawable->GetNodes().empty())
|
||||
AddDrawable(drawable);
|
||||
}
|
||||
|
||||
void Node::RemoveDrawable(Drawable* drawable)
|
||||
{
|
||||
drawable->RemoveNode(this);
|
||||
|
||||
Reference in New Issue
Block a user