Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 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
 

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 ( )

Definition at line 51 of file G4VVisCommand.cc.

51 {}
G4VVisCommand::~G4VVisCommand ( )
virtual

Definition at line 53 of file G4VVisCommand.cc.

53 {}

Member Function Documentation

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

Definition at line 67 of file G4VVisCommand.cc.

70 {
71  G4double x, y;
72  char unts[30];
73 
74  std::istringstream is(paramString);
75  is >> x >> y >> unts;
76  G4String unt = unts;
77 
78  xval = x*G4UIcommand::ValueOf(unt);
79  yval = y*G4UIcommand::ValueOf(unt);
80 
81  return;
82 }
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:309
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 58 of file G4VVisCommand.cc.

59 {
60  G4double uv = G4UIcommand::ValueOf(unitName);
61 
62  std::ostringstream oss;
63  oss << x/uv << " " << y/uv << " " << unitName;
64  return oss.str();
65 }
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:309
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

static const G4Colour& G4VVisCommand::GetCurrentColour ( )
inlinestatic

Definition at line 53 of file G4VVisCommand.hh.

53 {return fCurrentColour;}
static G4Colour fCurrentColour
static G4double G4VVisCommand::GetCurrentLineWidth ( )
inlinestatic

Definition at line 56 of file G4VVisCommand.hh.

56 {return fCurrentLineWidth;}
static G4double fCurrentLineWidth
static const G4Colour& G4VVisCommand::GetCurrentTextColour ( )
inlinestatic

Definition at line 58 of file G4VVisCommand.hh.

58 {return fCurrentTextColour;}
static G4Colour fCurrentTextColour

Here is the caller graph for this function:

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

Definition at line 59 of file G4VVisCommand.hh.

59 {return fCurrentTextLayout;}
static G4Text::Layout fCurrentTextLayout
static G4double G4VVisCommand::GetCurrentTextSize ( )
inlinestatic

Definition at line 60 of file G4VVisCommand.hh.

60 {return fCurrentTextSize;}
static G4double fCurrentTextSize
static void G4VVisCommand::SetVisManager ( G4VisManager )
static

Here is the caller graph for this function:

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

Definition at line 85 of file G4VVisCommand.cc.

85  {
86 
88 
89  const G4SceneList& sceneList = fpVisManager -> GetSceneList ();
90 
91  G4int iScene, nScenes = sceneList.size ();
92  for (iScene = 0; iScene < nScenes; iScene++) {
93  if (sceneList [iScene] -> GetName () == sceneName) break;
94  }
95 
96  G4Scene* pScene = 0; // Zero unless scene has been found...
97  if (iScene < nScenes) {
98  pScene = sceneList [iScene];
99  }
100 
101  if (!pScene) {
102  if (verbosity >= G4VisManager::warnings) {
103  G4cout << "WARNING: Scene \"" << sceneName << "\" not found."
104  << G4endl;
105  }
106  return;
107  }
108 
109  fpVisManager -> SetCurrentScene (pScene);
110 
111  // Scene has changed. Refresh viewers of all sceneHandlers using
112  // this scene...
113  G4VViewer* pViewer = fpVisManager -> GetCurrentViewer();
114  G4VSceneHandler* sceneHandler = fpVisManager -> GetCurrentSceneHandler();
115  if (sceneHandler && sceneHandler -> GetScene ()) {
116  if (pViewer) {
118  ApplyCommand ("/vis/scene/notifyHandlers");
119  }
120  }
121 }
int G4int
Definition: G4Types.hh:78
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
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

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

Definition at line 81 of file G4VVisCommand.hh.

G4double G4VVisCommand::fCurrentLineWidth = 1.
staticprotected

Definition at line 84 of file G4VVisCommand.hh.

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

Definition at line 86 of file G4VVisCommand.hh.

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

Definition at line 87 of file G4VVisCommand.hh.

G4double G4VVisCommand::fCurrentTextSize = 12.
staticprotected

Definition at line 88 of file G4VVisCommand.hh.

G4ModelingParameters::PVNameCopyNoPath G4VVisCommand::fCurrentTouchablePath
staticprotected

Definition at line 89 of file G4VVisCommand.hh.

G4int G4VVisCommand::fErrorCode = 0
staticprotected

Definition at line 78 of file G4VVisCommand.hh.

G4VisManager * G4VVisCommand::fpVisManager = 0
staticprotected

Definition at line 75 of file G4VVisCommand.hh.


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