| 671 | //} |
| 672 | |
| 673 | void 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, |
no test coverage detected