Update max depth when building a tree

This commit is contained in:
Jackson Campolattaro 2020-08-07 18:44:07 -04:00
parent dd9878a20d
commit 216769ea2b
1 changed files with 3 additions and 0 deletions

View File

@ -244,6 +244,9 @@ public:
// Split the node, redistributing its points to its children
split((*current));
// Check if we've reached a new max depth
m_max_depth_reached = (std::max)(current->depth(), m_max_depth_reached);
// Process each of its children
for (int i = 0; i < 8; ++i)
todo.push(&(*current)[i]);