#include <G4VisCommandsCompound.hh>
Inheritance diagram for G4VisCommandDrawVolume:
Public Member Functions | |
G4VisCommandDrawVolume () | |
virtual | ~G4VisCommandDrawVolume () |
void | SetNewValue (G4UIcommand *command, G4String newValue) |
Definition at line 58 of file G4VisCommandsCompound.hh.
G4VisCommandDrawVolume::G4VisCommandDrawVolume | ( | ) |
Definition at line 186 of file G4VisCommandsCompound.cc.
References G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), and G4UIcmdWithAString::SetParameterName().
00186 { 00187 G4bool omitable; 00188 fpCommand = new G4UIcmdWithAString("/vis/drawVolume", this); 00189 fpCommand->SetGuidance 00190 ("Creates a scene containing this physical volume and asks the" 00191 "\ncurrent viewer to draw it. The scene becomes current."); 00192 fpCommand -> SetGuidance 00193 ("If physical-volume-name is \"world\" (the default), the main geometry" 00194 "\ntree (material world) is drawn. If \"worlds\", all worlds - material" 00195 "\nworld and parallel worlds, if any - are drawn. Otherwise a search of" 00196 "\nall worlds is made, taking the first matching occurence only. To see" 00197 "\na representation of the geometry hierarchy of the worlds, try" 00198 "\n\"/vis/drawTree [worlds]\" or one of the driver/browser combinations" 00199 "\nthat have the required functionality, e.g., HepRep"); 00200 fpCommand->SetParameterName("physical-volume-name", omitable = true); 00201 fpCommand->SetDefaultValue("world"); 00202 }
G4VisCommandDrawVolume::~G4VisCommandDrawVolume | ( | ) | [virtual] |
void G4VisCommandDrawVolume::SetNewValue | ( | G4UIcommand * | command, | |
G4String | newValue | |||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 208 of file G4VisCommandsCompound.cc.
References G4UImanager::ApplyCommand(), G4VisManager::confirmations, G4VVisCommand::fpVisManager, G4cout, G4endl, G4UImanager::GetUIpointer(), G4UImanager::GetVerboseLevel(), G4VisManager::GetVerbosity(), and G4UImanager::SetVerboseLevel().
00208 { 00209 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 00210 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 00211 G4int keepVerbose = UImanager->GetVerboseLevel(); 00212 G4int newVerbose(0); 00213 if (keepVerbose >= 2 || verbosity >= G4VisManager::confirmations) 00214 newVerbose = 2; 00215 UImanager->SetVerboseLevel(newVerbose); 00216 UImanager->ApplyCommand("/vis/scene/create"); 00217 UImanager->ApplyCommand(G4String("/vis/scene/add/volume " + newValue)); 00218 UImanager->ApplyCommand("/vis/sceneHandler/attach"); 00219 UImanager->SetVerboseLevel(keepVerbose); 00220 static G4bool warned = false; 00221 if (verbosity >= G4VisManager::confirmations && !warned) { 00222 G4cout << 00223 "NOTE: For systems which are not \"auto-refresh\" you will need to" 00224 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"." 00225 << G4endl; 00226 warned = true; 00227 } 00228 }