Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes
G4VVisCommand Class Reference

#include <G4VVisCommand.hh>

Inheritance diagram for G4VVisCommand:
G4UImessenger G4VisCommandAbortReviewKeptEvents G4VisCommandDrawTree G4VisCommandDrawView G4VisCommandDrawVolume G4VisCommandEnable G4VisCommandInitialize G4VisCommandList G4VisCommandModelCreate< Factory > G4VisCommandOpen G4VisCommandReviewKeptEvents G4VisCommandSceneHandlerAttach G4VisCommandSceneHandlerCreate G4VisCommandSceneHandlerList G4VisCommandSceneHandlerSelect G4VisCommandSetColour G4VisCommandSetLineWidth G4VisCommandSetTextColour G4VisCommandSetTextLayout G4VisCommandSetTouchable G4VisCommandSpecify G4VisCommandVerbose G4VisCommandViewerDefaultHiddenEdge G4VisCommandViewerDefaultStyle G4VVisCommandGeometry G4VVisCommandScene G4VVisCommandViewer

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
 

Static Public Member Functions

static void SetVisManager (G4VisManager *)
 

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 G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentLineWidth = 1.
 
static
G4ModelingParameters::PVNameCopyNoPath 
fCurrentTouchablePath
 

Additional Inherited Members

- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 

Detailed Description

Definition at line 47 of file G4VVisCommand.hh.

Constructor & Destructor Documentation

G4VVisCommand::G4VVisCommand ( )

Definition at line 48 of file G4VVisCommand.cc.

48 {}
G4VVisCommand::~G4VVisCommand ( )
virtual

Definition at line 50 of file G4VVisCommand.cc.

50 {}

Member Function Documentation

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

Definition at line 64 of file G4VVisCommand.cc.

References G4UIcommand::ValueOf(), and test::x.

Referenced by G4VisCommandViewerPan::SetNewValue().

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

Definition at line 55 of file G4VVisCommand.cc.

References G4UIcommand::ValueOf().

Referenced by G4VisCommandViewerPan::GetCurrentValue().

56 {
57  G4double uv = G4UIcommand::ValueOf(unitName);
58 
59  std::ostringstream oss;
60  oss << x/uv << " " << y/uv << " " << unitName;
61  return oss.str();
62 }
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:294
double G4double
Definition: G4Types.hh:76
static void G4VVisCommand::SetVisManager ( G4VisManager )
static
void G4VVisCommand::UpdateVisManagerScene ( const G4String sceneName = "")
protected

Definition at line 82 of file G4VVisCommand.cc.

References G4cout, G4endl, G4UImanager::GetUIpointer(), and G4VisManager::warnings.

Referenced by G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneSelect::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandViewerRefresh::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), and G4VisCommandSceneAddVolume::SetNewValue().

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

Field Documentation

G4Colour G4VVisCommand::fCurrentColour = G4Colour::White()
staticprotected
G4double G4VVisCommand::fCurrentLineWidth = 1.
staticprotected
G4Colour G4VVisCommand::fCurrentTextColour = G4Colour::Blue()
staticprotected
G4Text::Layout G4VVisCommand::fCurrentTextLayout = G4Text::left
staticprotected
G4ModelingParameters::PVNameCopyNoPath G4VVisCommand::fCurrentTouchablePath
staticprotected

Definition at line 77 of file G4VVisCommand.hh.

Referenced by G4VisCommandSetTouchable::SetNewValue().

G4VisManager * G4VVisCommand::fpVisManager = 0
staticprotected

Definition at line 67 of file G4VVisCommand.hh.

Referenced by G4VVisCommandScene::CurrentSceneName(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandSceneHandlerCreate::G4VisCommandSceneHandlerCreate(), G4VisCommandSceneHandlerAttach::GetCurrentValue(), G4VisCommandSceneHandlerCreate::GetCurrentValue(), G4VisCommandViewerClear::GetCurrentValue(), G4VisCommandViewerClearTransients::GetCurrentValue(), G4VisCommandViewerClone::GetCurrentValue(), G4VisCommandViewerCreate::GetCurrentValue(), G4VisCommandViewerReset::GetCurrentValue(), G4VisCommandViewerRefresh::GetCurrentValue(), G4VisCommandViewerRebuild::GetCurrentValue(), G4VisCommandViewerUpdate::GetCurrentValue(), G4VVisCommandViewer::RefreshIfRequired(), G4VisCommandDrawTree::SetNewValue(), G4VisCommandViewerDefaultHiddenEdge::SetNewValue(), G4VisCommandSceneHandlerAttach::SetNewValue(), G4VisCommandAbortReviewKeptEvents::SetNewValue(), G4VisCommandSetColour::SetNewValue(), G4VisCommandDrawView::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandViewerDefaultStyle::SetNewValue(), G4VisCommandSceneHandlerCreate::SetNewValue(), G4VisCommandEnable::SetNewValue(), G4VisCommandGeometryList::SetNewValue(), G4VisCommandSetTextColour::SetNewValue(), G4VisCommandDrawVolume::SetNewValue(), G4VisCommandViewerAddCutawayPlane::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneCreate::SetNewValue(), G4VisCommandSceneHandlerList::SetNewValue(), G4VisCommandGeometryRestore::SetNewValue(), G4VisCommandInitialize::SetNewValue(), G4VisCommandSetLineWidth::SetNewValue(), G4VisCommandOpen::SetNewValue(), G4VisCommandViewerChangeCutawayPlane::SetNewValue(), G4VisCommandSceneHandlerSelect::SetNewValue(), G4VisCommandList::SetNewValue(), G4VisCommandSetTextLayout::SetNewValue(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandSpecify::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandViewerClear::SetNewValue(), G4VisCommandReviewKeptEvents::SetNewValue(), G4VisCommandSetTouchable::SetNewValue(), G4VisCommandSceneEndOfRunAction::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandViewerClearCutawayPlanes::SetNewValue(), G4VisCommandVerbose::SetNewValue(), G4VisCommandSceneList::SetNewValue(), G4VisCommandViewerClearTransients::SetNewValue(), G4VisCommandSceneNotifyHandlers::SetNewValue(), G4VisCommandViewerClone::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneSelect::SetNewValue(), G4VisCommandViewerCopyViewFrom::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandViewerCreate::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandViewerDolly::SetNewValue(), G4VisCommandViewerFlush::SetNewValue(), G4VisCommandViewerList::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandViewerPan::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandViewerReset::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandViewerRefresh::SetNewValue(), G4VisCommandViewerRebuild::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandViewerSave::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandViewerScale::SetNewValue(), G4VisCommandViewerSelect::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandViewerUpdate::SetNewValue(), G4VisCommandViewerZoom::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), and G4VisCommandSceneAddVolume::SetNewValue().


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