MCPcopy Create free account
hub / github.com/Geant4/geant4 / ProcessScene

Method ProcessScene

source/visualization/management/src/G4VSceneHandler.cc:673–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671//}
672
673void G4VSceneHandler::ProcessScene()
674{
675 // Assumes graphics database store has already been cleared if
676 // relevant for the particular scene handler.
677
678 if(!fpScene)
679 return;
680
681 if(fpScene->GetExtent() == G4VisExtent::GetNullExtent())
682 {
683 G4Exception("G4VSceneHandler::ProcessScene", "visman0106", JustWarning,
684 "The scene has no extent.");
685 }
686
687 G4VisManager* visManager = G4VisManager::GetInstance();
688
689 if(!visManager->GetConcreteInstance())
690 return;
691
692 G4VisManager::Verbosity verbosity = visManager->GetVerbosity();
693
694 fReadyForTransients = false;
695
696 // Traverse geometry tree and send drawing primitives to window(s).
697
698 const std::vector<G4Scene::Model>& runDurationModelList =
699 fpScene->GetRunDurationModelList();
700
701 if(runDurationModelList.size()) {
702 if(verbosity >= G4VisManager::confirmations) {
703 G4cout << "Traversing scene data..." << G4endl;
704 static G4int first = true;
705 if (first) {
706 first = false;
707 G4cout <<
708 "(This could happen more than once - in fact, up to three times"
709 "\nper rebuild, for opaque, transparent and non-hidden markers.)"
710 << G4endl;
711 }
712 }
713
714 // Reset visibility of all objects to false - visible objects will then set to true
715 fpViewer->AccessSceneTree().ResetVisibility();
716
717 BeginModeling();
718
719 // Create modeling parameters from view parameters...
720 G4ModelingParameters* pMP = CreateModelingParameters();
721
722 for(const auto& i : runDurationModelList) {
723 if(i.fActive) {
724 fpModel = i.fpModel;
725 fpModel->SetModelingParameters(pMP);
726
727 // Describe to the current scene handler
728 fpModel->DescribeYourselfTo(*this);
729
730 // To see the extents of each model represented as wireframe boxes,

Callers 1

ProcessViewMethod · 0.45

Calls 13

G4ExceptionFunction · 0.85
GetInstanceFunction · 0.85
ResetVisibilityMethod · 0.80
GetMaxFullDepthMethod · 0.80
GetTotalAllTouchablesMethod · 0.80
GetExtentMethod · 0.45
GetConcreteInstanceMethod · 0.45
GetVerbosityMethod · 0.45
sizeMethod · 0.45
DescribeYourselfToMethod · 0.45

Tested by

no test coverage detected