}
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)
{
else if (aFlag == "alllayers"
|| aFlag == "layers") aParam = Graphic3d_RenderingParams::PerfCounters_Layers;
else if (aFlag == "allstructs"
- || aFlag == "structs") aParam = Graphic3d_RenderingParams::PerfCounters_Structures;
+ || aFlag == "allstructures"
+ || aFlag == "structs"
+ || aFlag == "structures") aParam = Graphic3d_RenderingParams::PerfCounters_Structures;
else if (aFlag == "groups") aParam = Graphic3d_RenderingParams::PerfCounters_Groups;
else if (aFlag == "allarrays"
|| aFlag == "fillarrays"
{
theDI << searchInfo (aDict, "Rendered layers") << " ";
}
- else if (aFlag == "allstructs")
+ else if (aFlag == "allstructs"
+ || aFlag == "allstructures")
{
theDI << searchInfo (aDict, "Structs") << " ";
}
- else if (aFlag == "structs")
+ else if (aFlag == "structs"
+ || aFlag == "structures")
{
- theDI << searchInfo (aDict, "Rendered structs") << " ";
+ TCollection_AsciiString aRend = searchInfo (aDict, "Rendered structs");
+ if (aRend.IsEmpty()) // all structures rendered
+ {
+ aRend = searchInfo (aDict, "Structs");
+ }
+ theDI << aRend << " ";
}
else if (aFlag == "groups")
{
"\n '-exposure value' Exposure value for tone mapping (0.0 value disables the effect)"
"\n '-whitepoint value' White point value for filmic tone mapping"
"\n '-tonemapping mode' Tone mapping mode (disabled, filmic)"
- "\n '-perfCounters none|fps|cpu|layers|structures|groups|arrays|triagles|points"
+ "\n '-perfCounters none|fps|cpu|layers|structures|groups|arrays|triangles|points"
"\n ' |gpuMem|frameTime|basic|extended|full|nofps|skipImmediate'"
"\n Show/hide performance counters (flags can be combined)"
"\n '-perfUpdateInterval nbSeconds' Performance counters update interval"
theCommands.Add("vstatprofiler",
"\n vstatprofiler [fps|cpu|allLayers|layers|allstructures|structures|groups"
"\n |allArrays|fillArrays|lineArrays|pointArrays|textArrays"
- "\n |triagles|points|geomMem|textureMem|frameMem"
+ "\n |triangles|points|geomMem|textureMem|frameMem"
"\n |elapsedFrame|cpuFrameAverage|cpuPickingAverage|cpuCullingAverage|cpuDynAverage"
"\n |cpuFrameMax|cpuPickingMax|cpuCullingMax|cpuDynMax]"
"\n [-noredraw]"
--- /dev/null
+puts "============="
+puts "0031341: Visualization - Graphic3d_Layer::UpdateCulling() ignores Presentation range"
+puts "============="
+
+pload MODELING VISUALIZATION
+# create big enough set of overlapped boxes, so that more than 1 structure appear on a leaf of BVH tree
+set aList {}
+for {set i 0} {$i < 2000} {incr i} { box b$i 2000-$i 2000-$i 2000-$i; lappend aList b$i }
+vclear
+vinit View1
+vtop
+vdefaults -autoTriang 0
+vdisplay -dispMode 0 {*}$aList
+
+vfit
+vzoom 5
+if { [vstatprofiler structs] != 1203 } { puts "Error: unexpected number of culled structures" }
+vdump $::imagedir/${::casename}_zoom.png
+
+vfit
+vzoom 0.9
+if { [vstatprofiler structs] != 2000 } { puts "Error: no culling is expected" }
+vdump $::imagedir/${::casename}.png