Geant4  10.02.p03
G4VVisCommand Class Reference

#include <G4VVisCommand.hh>

Inheritance diagram for G4VVisCommand:
Collaboration diagram for G4VVisCommand:

Public Member Functions

 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)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Static Public Member Functions

static void SetVisManager (G4VisManager *)
 
static const G4ColourGetCurrentColour ()
 
static G4double GetCurrentLineWidth ()
 
static const G4ColourGetCurrentTextColour ()
 
static G4Text::Layout GetCurrentTextLayout ()
 
static G4double GetCurrentTextSize ()
 

Protected Member Functions

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

static G4String ConvertToString (G4double x, G4double y, const char *unitName)
 
static void ConvertToDoublePair (const G4String &paramString, G4double &xval, G4double &yval)
 

Static Protected Attributes

static G4VisManagerfpVisManager = 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
 

Additional Inherited Members

- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 47 of file G4VVisCommand.hh.

Constructor & Destructor Documentation

◆ G4VVisCommand()

G4VVisCommand::G4VVisCommand ( )

Definition at line 49 of file G4VVisCommand.cc.

49 {}

◆ ~G4VVisCommand()

G4VVisCommand::~G4VVisCommand ( )
virtual

Definition at line 51 of file G4VVisCommand.cc.

51 {}
Here is the call graph for this function:

Member Function Documentation

◆ ConvertToDoublePair()

void G4VVisCommand::ConvertToDoublePair ( const G4String paramString,
G4double xval,
G4double yval 
)
staticprotected

Definition at line 65 of file G4VVisCommand.cc.

68 {
69  G4double x, y;
70  char unts[30];
71 
72  std::istringstream is(paramString);
73  is >> x >> y >> unts;
74  G4String unt = unts;
75 
76  xval = x*G4UIcommand::ValueOf(unt);
77  yval = y*G4UIcommand::ValueOf(unt);
78 
79  return;
80 }
Double_t y
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:308
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConvertToString()

G4String G4VVisCommand::ConvertToString ( G4double  x,
G4double  y,
const char *  unitName 
)
staticprotected

Definition at line 56 of file G4VVisCommand.cc.

57 {
58  G4double uv = G4UIcommand::ValueOf(unitName);
59 
60  std::ostringstream oss;
61  oss << x/uv << " " << y/uv << " " << unitName;
62  return oss.str();
63 }
Double_t y
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:308
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCurrentColour()

static const G4Colour& G4VVisCommand::GetCurrentColour ( )
inlinestatic

Definition at line 53 of file G4VVisCommand.hh.

53 {return fCurrentColour;}
static G4Colour fCurrentColour

◆ GetCurrentLineWidth()

static G4double G4VVisCommand::GetCurrentLineWidth ( )
inlinestatic

Definition at line 56 of file G4VVisCommand.hh.

56 {return fCurrentLineWidth;}
static G4double fCurrentLineWidth

◆ GetCurrentTextColour()

static const G4Colour& G4VVisCommand::GetCurrentTextColour ( )
inlinestatic

Definition at line 58 of file G4VVisCommand.hh.

58 {return fCurrentTextColour;}
static G4Colour fCurrentTextColour

◆ GetCurrentTextLayout()

static G4Text::Layout G4VVisCommand::GetCurrentTextLayout ( )
inlinestatic

Definition at line 59 of file G4VVisCommand.hh.

59 {return fCurrentTextLayout;}
static G4Text::Layout fCurrentTextLayout

◆ GetCurrentTextSize()

static G4double G4VVisCommand::GetCurrentTextSize ( )
inlinestatic

Definition at line 60 of file G4VVisCommand.hh.

60 {return fCurrentTextSize;}
static G4double fCurrentTextSize
Here is the call graph for this function:

◆ SetVisManager()

static void G4VVisCommand::SetVisManager ( G4VisManager )
static
Here is the caller graph for this function:

◆ UpdateVisManagerScene()

void G4VVisCommand::UpdateVisManagerScene ( const G4String sceneName = "")
protected

Definition at line 83 of file G4VVisCommand.cc.

83  {
84 
86 
87  const G4SceneList& sceneList = fpVisManager -> GetSceneList ();
88 
89  G4int iScene, nScenes = sceneList.size ();
90  for (iScene = 0; iScene < nScenes; iScene++) {
91  if (sceneList [iScene] -> GetName () == sceneName) break;
92  }
93 
94  G4Scene* pScene = 0; // Zero unless scene has been found...
95  if (iScene < nScenes) {
96  pScene = sceneList [iScene];
97  }
98 
99  if (!pScene) {
100  if (verbosity >= G4VisManager::warnings) {
101  G4cout << "WARNING: Scene \"" << sceneName << "\" not found."
102  << G4endl;
103  }
104  return;
105  }
106 
107  fpVisManager -> SetCurrentScene (pScene);
108 
109  // Scene has changed. Refresh viewers of all sceneHandlers using
110  // this scene...
111  G4VViewer* pViewer = fpVisManager -> GetCurrentViewer();
112  G4VSceneHandler* sceneHandler = fpVisManager -> GetCurrentSceneHandler();
113  if (sceneHandler && sceneHandler -> GetScene ()) {
114  if (pViewer) {
116  ApplyCommand ("/vis/scene/notifyHandlers");
117  }
118  }
119 }
int G4int
Definition: G4Types.hh:78
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
G4GLOB_DLL std::ostream G4cout
static Verbosity GetVerbosity()
#define G4endl
Definition: G4ios.hh:61
static G4VisManager * fpVisManager
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fCurrentColour

G4Colour G4VVisCommand::fCurrentColour = G4Colour::White()
staticprotected

Definition at line 78 of file G4VVisCommand.hh.

◆ fCurrentLineWidth

G4double G4VVisCommand::fCurrentLineWidth = 1.
staticprotected

Definition at line 81 of file G4VVisCommand.hh.

◆ fCurrentTextColour

G4Colour G4VVisCommand::fCurrentTextColour = G4Colour::Blue()
staticprotected

Definition at line 83 of file G4VVisCommand.hh.

◆ fCurrentTextLayout

G4Text::Layout G4VVisCommand::fCurrentTextLayout = G4Text::left
staticprotected

Definition at line 84 of file G4VVisCommand.hh.

◆ fCurrentTextSize

G4double G4VVisCommand::fCurrentTextSize = 12.
staticprotected

Definition at line 85 of file G4VVisCommand.hh.

◆ fCurrentTouchablePath

G4ModelingParameters::PVNameCopyNoPath G4VVisCommand::fCurrentTouchablePath
staticprotected

Definition at line 86 of file G4VVisCommand.hh.

◆ fpVisManager

G4VisManager * G4VVisCommand::fpVisManager = 0
staticprotected

Definition at line 75 of file G4VVisCommand.hh.


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