//function : VOccluded
//purpose : Returns number of Occluded objects
//==============================================================================
-static Standard_Integer VNbOccluded(Draw_Interpretor & /*theDi*/,
+static Standard_Integer VNbOccluded(Draw_Interpretor & theDi,
Standard_Integer theArgNb,
const char **theArgVec) {
NCollection_List<TCollection_AsciiString> aViewList;
Handle(V3d_View) aView = ViewerTest_myViews.Find1(anIter.Value());
aView->ChangeRenderingParams().OcculsionQueryState = Graphic3d_RenderingParams::OcculsionQuery_NoUpdate;
aView->Redraw();
+ aView->Redraw();
aView->View()->UpdateOcclusion();
Graphic3d_MapOfStructure aOcculdedStructs;
aView->View()->OccludedStructures(aOcculdedStructs);
- printf("Occluded objects in view: %d = %d\n",
- aView->View()->Identification(), aOcculdedStructs.Extent());
+ theDi << aOcculdedStructs.Extent() << "\n";
}
return 0;
vfront
vfit
-#run occlusion query for each view
-vnboccluded View1
-vnboccluded View2
+#run occlusion query test for each view
+if {[vnboccluded View1] != "1"} {
+ puts "ERROR: occluded objects in view 1 expected to be 1"
+ }
+
+if {[vnboccluded View2] != "0"} {
+ puts "ERROR: occluded objects in view 2 expected to be 0"
+ }