G4VisCommandDrawVolume Class Reference

#include <G4VisCommandsCompound.hh>

Inheritance diagram for G4VisCommandDrawVolume:

G4VVisCommand G4UImessenger

Public Member Functions

 G4VisCommandDrawVolume ()
virtual ~G4VisCommandDrawVolume ()
void SetNewValue (G4UIcommand *command, G4String newValue)

Detailed Description

Definition at line 58 of file G4VisCommandsCompound.hh.


Constructor & Destructor Documentation

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]

Definition at line 204 of file G4VisCommandsCompound.cc.

00204                                                 {
00205   delete fpCommand;
00206 }


Member Function Documentation

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 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:44 2013 for Geant4 by  doxygen 1.4.7