Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VVisCommand Class Reference

#include <G4VVisCommand.hh>

+ Inheritance diagram for G4VVisCommand:

Public Member Functions

 G4VVisCommand ()
 
virtual ~G4VVisCommand ()
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc)
 
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)
 
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::G4VVisCommand ( )

Definition at line 48 of file G4VVisCommand.cc.

48{}

◆ ~G4VVisCommand()

G4VVisCommand::~G4VVisCommand ( )
virtual

Definition at line 50 of file G4VVisCommand.cc.

50{}

Member Function Documentation

◆ ConvertToDoublePair()

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

Definition at line 64 of file G4VVisCommand.cc.

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}
double G4double
Definition: G4Types.hh:64
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:288

Referenced by G4VisCommandViewerPan::SetNewValue(), and G4VisCommandsViewerSet::SetNewValue().

◆ ConvertToString()

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

Definition at line 54 of file G4VVisCommand.cc.

56{
57 G4double uv = G4UIcommand::ValueOf(unitName);
58
59 std::ostringstream oss;
60 oss << x/uv << " " << y/uv << " " << unitName;
61 return oss.str();
62}

Referenced by G4VisCommandViewerPan::GetCurrentValue().

◆ SetVisManager()

static void G4VVisCommand::SetVisManager ( G4VisManager )
static

◆ UpdateVisManagerScene()

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

Definition at line 81 of file G4VVisCommand.cc.

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:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:51
static G4VisManager * fpVisManager
static Verbosity GetVerbosity()

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

Member Data Documentation

◆ fCurrentColour

◆ fCurrentLineWidth

◆ fCurrentTextColour

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

◆ fCurrentTextLayout

◆ fCurrentTouchablePath

G4ModelingParameters::PVNameCopyNoPath G4VVisCommand::fCurrentTouchablePath
staticprotected

◆ fpVisManager

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(), G4VisCommandViewerFlush::GetCurrentValue(), G4VisCommandViewerReset::GetCurrentValue(), G4VisCommandViewerRefresh::GetCurrentValue(), G4VisCommandViewerRebuild::GetCurrentValue(), G4VisCommandViewerUpdate::GetCurrentValue(), G4VVisCommandViewer::RefreshIfRequired(), G4VVisCommandGeometrySet::Set(), G4VVisCommandGeometrySet::SetLVVisAtts(), G4VisCommandAbortReviewKeptEvents::SetNewValue(), G4VisCommandEnable::SetNewValue(), G4VisCommandInitialize::SetNewValue(), G4VisCommandList::SetNewValue(), G4VisCommandReviewKeptEvents::SetNewValue(), G4VisCommandVerbose::SetNewValue(), G4VisCommandDrawTree::SetNewValue(), G4VisCommandDrawView::SetNewValue(), G4VisCommandDrawVolume::SetNewValue(), G4VisCommandOpen::SetNewValue(), G4VisCommandSpecify::SetNewValue(), G4VisCommandGeometryList::SetNewValue(), G4VisCommandGeometryRestore::SetNewValue(), G4VisCommandGeometrySetColour::SetNewValue(), G4VisCommandGeometrySetDaughtersInvisible::SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValue(), G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandSceneCreate::SetNewValue(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandSceneEndOfRunAction::SetNewValue(), G4VisCommandSceneList::SetNewValue(), G4VisCommandSceneNotifyHandlers::SetNewValue(), G4VisCommandSceneSelect::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddGhosts::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddPSHits::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), G4VisCommandSceneAddUserAction::SetNewValue(), G4VisCommandSceneAddVolume::SetNewValue(), G4VisCommandSceneHandlerAttach::SetNewValue(), G4VisCommandSceneHandlerCreate::SetNewValue(), G4VisCommandSceneHandlerList::SetNewValue(), G4VisCommandSceneHandlerSelect::SetNewValue(), G4VisCommandSetColour::SetNewValue(), G4VisCommandSetTextColour::SetNewValue(), G4VisCommandSetLineWidth::SetNewValue(), G4VisCommandSetTextLayout::SetNewValue(), G4VisCommandSetTouchable::SetNewValue(), G4VisCommandsTouchableSet::SetNewValue(), G4VisCommandViewerAddCutawayPlane::SetNewValue(), G4VisCommandViewerChangeCutawayPlane::SetNewValue(), G4VisCommandViewerClear::SetNewValue(), G4VisCommandViewerClearCutawayPlanes::SetNewValue(), G4VisCommandViewerClearTransients::SetNewValue(), G4VisCommandViewerClone::SetNewValue(), G4VisCommandViewerCopyViewFrom::SetNewValue(), G4VisCommandViewerCreate::SetNewValue(), G4VisCommandViewerDolly::SetNewValue(), G4VisCommandViewerFlush::SetNewValue(), G4VisCommandViewerList::SetNewValue(), G4VisCommandViewerPan::SetNewValue(), G4VisCommandViewerReset::SetNewValue(), G4VisCommandViewerRefresh::SetNewValue(), G4VisCommandViewerRebuild::SetNewValue(), G4VisCommandViewerSave::SetNewValue(), G4VisCommandViewerScale::SetNewValue(), G4VisCommandViewerSelect::SetNewValue(), G4VisCommandViewerUpdate::SetNewValue(), G4VisCommandViewerZoom::SetNewValue(), G4VisCommandViewerDefaultHiddenEdge::SetNewValue(), G4VisCommandViewerDefaultStyle::SetNewValue(), G4VisCommandsViewerSet::SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValueOnLV(), and UpdateVisManagerScene().


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