mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
cr cleanup and optimization of isLeaf()
This commit is contained in:
parent
bf3b014743
commit
3673ee36ad
1 changed files with 3 additions and 4 deletions
|
@ -183,13 +183,12 @@ void VoxelNode::setRandomColor(int minimumBrightness) {
|
|||
}
|
||||
|
||||
bool VoxelNode::isLeaf() const {
|
||||
int childCount = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (NULL != children[i]) {
|
||||
childCount++;
|
||||
if (children[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return (0 == childCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
void VoxelNode::printDebugDetails(const char* label) const {
|
||||
|
|
Loading…
Reference in a new issue