Merge pull request #82502 from Rindbee/fix-bugs-in-bvh-for-3.x

[3.x] BVH - fix not refitting upward from leaf nodes
This commit is contained in:
Rémi Verschelde 2023-10-01 22:51:24 +02:00
commit 3947c11cd3
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ void refit_branch(uint32_t p_node_id) {
TLeaf &leaf = _node_get_leaf(tnode);
if (leaf.is_dirty()) {
leaf.set_dirty(false);
refit_upward(p_node_id);
refit_upward(rp.node_id);
}
}
} // while more nodes to pop

View File

@ -71,7 +71,7 @@ public:
void clear() {
num_items = 0;
set_dirty(true);
set_dirty(false);
}
bool is_full() const { return num_items >= MAX_ITEMS; }