1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0031341: Visualization - Graphic3d_Layer::UpdateCulling() ignores Presentation range

Graphic3d_Layer::UpdateCulling() now takes into account BVH_Tree::EndPrimitive().
'vstatprofiler structs' now properly prints number of structures in case of no culling.
This commit is contained in:
kgv
2020-02-01 00:50:04 +03:00
committed by bugmaster
parent 18348b382e
commit a2803f37e7
3 changed files with 49 additions and 13 deletions

View File

@@ -557,14 +557,18 @@ void Graphic3d_Layer::UpdateCulling (Standard_Integer theViewId,
}
else
{
Standard_Integer aIdx = aBVHTree->BegPrimitive (aNode);
const Graphic3d_CStructure* aStruct = isTrsfPers
? myBVHPrimitivesTrsfPers.GetStructureById (aIdx)
: myBVHPrimitives.GetStructureById (aIdx);
if (aStruct->IsVisible (theViewId))
const Standard_Integer aStartIdx = aBVHTree->BegPrimitive (aNode);
const Standard_Integer anEndIdx = aBVHTree->EndPrimitive (aNode);
for (Standard_Integer anIdx = aStartIdx; anIdx <= anEndIdx; ++anIdx)
{
aStruct->MarkAsNotCulled();
++myNbStructuresNotCulled;
const Graphic3d_CStructure* aStruct = isTrsfPers
? myBVHPrimitivesTrsfPers.GetStructureById (anIdx)
: myBVHPrimitives.GetStructureById (anIdx);
if (aStruct->IsVisible (theViewId))
{
aStruct->MarkAsNotCulled();
++myNbStructuresNotCulled;
}
}
if (aHead < 0)
{