simplified destructor

This commit is contained in:
devZoGok
2024-10-20 15:31:26 +03:00
parent 42de0d77d9
commit 9e6613d065
+1 -12
View File
@@ -28,18 +28,7 @@ namespace vb01{
}
Model::~Model(){
vector<Node*> descendants;
getDescendants(descendants);
for(Node *node : descendants)
for(Mesh *mesh : node->getMeshes())
mesh->setMaterial(nullptr);
while(!children.empty()){
Node *c = children[children.size() - 1];
dettachChild(c);
delete c;
}
this->setMaterial(nullptr);
}
void Model::update(){