Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VisCommandDrawVolume Class Reference

#include <G4VisCommandsCompound.hh>

Inheritance diagram for G4VisCommandDrawVolume:
Collaboration diagram for G4VisCommandDrawVolume:

Public Member Functions

 G4VisCommandDrawVolume ()
 
virtual ~G4VisCommandDrawVolume ()
 
void SetNewValue (G4UIcommand *command, G4String newValue)
 
- Public Member Functions inherited from G4VVisCommand
 G4VVisCommand ()
 
virtual ~G4VVisCommand ()
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VVisCommand
static void SetVisManager (G4VisManager *)
 
static const G4ColourGetCurrentColour ()
 
static G4double GetCurrentLineWidth ()
 
static const G4ColourGetCurrentTextColour ()
 
static G4Text::Layout GetCurrentTextLayout ()
 
static G4double GetCurrentTextSize ()
 
- Protected Member Functions inherited from G4VVisCommand
void UpdateVisManagerScene (const G4String &sceneName="")
 
- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Static Protected Member Functions inherited from G4VVisCommand
static G4String ConvertToString (G4double x, G4double y, const char *unitName)
 
static void ConvertToDoublePair (const G4String &paramString, G4double &xval, G4double &yval)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 
- Static Protected Attributes inherited from G4VVisCommand
static G4VisManagerfpVisManager = 0
 
static G4int fErrorCode = 0
 
static G4Colour fCurrentColour = G4Colour::White()
 
static G4double fCurrentLineWidth = 1.
 
static G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentTextSize = 12.
 
static
G4ModelingParameters::PVNameCopyNoPath 
fCurrentTouchablePath
 

Detailed Description

Definition at line 58 of file G4VisCommandsCompound.hh.

Constructor & Destructor Documentation

G4VisCommandDrawVolume::G4VisCommandDrawVolume ( )

Definition at line 202 of file G4VisCommandsCompound.cc.

202  {
203  G4bool omitable;
204  fpCommand = new G4UIcmdWithAString("/vis/drawVolume", this);
205  fpCommand->SetGuidance
206  ("Creates a scene containing this physical volume and asks the"
207  "\ncurrent viewer to draw it. The scene becomes current.");
208  fpCommand -> SetGuidance
209  ("If physical-volume-name is \"world\" (the default), the main geometry"
210  "\ntree (material world) is drawn. If \"worlds\", all worlds - material"
211  "\nworld and parallel worlds, if any - are drawn. Otherwise a search of"
212  "\nall worlds is made, taking the first matching occurence only. To see"
213  "\na representation of the geometry hierarchy of the worlds, try"
214  "\n\"/vis/drawTree worlds\" or one of the driver/browser combinations"
215  "\nthat have the required functionality, e.g., HepRepFile/HepRApp.");
216  fpCommand->SetParameterName("physical-volume-name", omitable = true);
217  fpCommand->SetDefaultValue("world");
218 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
bool G4bool
Definition: G4Types.hh:79
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetDefaultValue(const char *defVal)

Here is the call graph for this function:

G4VisCommandDrawVolume::~G4VisCommandDrawVolume ( )
virtual

Definition at line 220 of file G4VisCommandsCompound.cc.

220  {
221  delete fpCommand;
222 }

Member Function Documentation

void G4VisCommandDrawVolume::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 224 of file G4VisCommandsCompound.cc.

224  {
226  G4UImanager* UImanager = G4UImanager::GetUIpointer();
227  G4int keepVerbose = UImanager->GetVerboseLevel();
228  G4int newVerbose(0);
229  if (keepVerbose >= 2 || verbosity >= G4VisManager::confirmations)
230  newVerbose = 2;
231  UImanager->SetVerboseLevel(newVerbose);
232  UImanager->ApplyCommand("/vis/scene/create");
233  UImanager->ApplyCommand(G4String("/vis/scene/add/volume " + newValue));
234  UImanager->ApplyCommand("/vis/sceneHandler/attach");
235  UImanager->SetVerboseLevel(keepVerbose);
236  static G4bool warned = false;
237  if (verbosity >= G4VisManager::confirmations && !warned) {
238  G4cout <<
239  "NOTE: For systems which are not \"auto-refresh\" you will need to"
240  "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
241  << G4endl;
242  warned = true;
243  }
244 }
G4int GetVerboseLevel() const
Definition: G4UImanager.hh:227
int G4int
Definition: G4Types.hh:78
void SetVerboseLevel(G4int val)
Definition: G4UImanager.hh:225
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static Verbosity GetVerbosity()
#define G4endl
Definition: G4ios.hh:61
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447
static G4VisManager * fpVisManager

Here is the call graph for this function:


The documentation for this class was generated from the following files: