diff --git a/vcg/space/index/aabb_binary_tree/frustum_cull.h b/vcg/space/index/aabb_binary_tree/frustum_cull.h index d04914e3..435ddcaa 100644 --- a/vcg/space/index/aabb_binary_tree/frustum_cull.h +++ b/vcg/space/index/aabb_binary_tree/frustum_cull.h @@ -226,7 +226,8 @@ protected: } } - if (fullInside || (node->IsLeaf()) || (node->ObjectsCount() <= minNodeObjectsCount)) { + // Intermediate BVs containing a sufficient number of objects are marked fully visible even if they don't + if (fullInside || (node->ObjectsCount() <= minNodeObjectsCount)) { node->Flags() |= FC_FULLY_VISIBLE_BIT; nodeApply(*node); return; @@ -234,6 +235,12 @@ protected: node->Flags() |= FC_PARTIALLY_VISIBLE_BIT; + if ((node->IsLeaf())) + { + nodeApply(*node); + return; + } + //ClassType::NodeVsFrustum(node->children[0], viewerPosition, f, newMask, minNodeObjectsCount, nodeApply); //ClassType::NodeVsFrustum(node->children[1], viewerPosition, f, newMask, minNodeObjectsCount, nodeApply); ScalarType dt;