#include <G4VisCommandsSceneHandler.hh>
◆ G4VisCommandSceneHandlerAttach()
G4VisCommandSceneHandlerAttach::G4VisCommandSceneHandlerAttach |
( |
| ) |
|
Definition at line 44 of file G4VisCommandsSceneHandler.cc.
45 G4bool omitable, currentAsDefault;
47 fpCommand -> SetGuidance (
"Attaches scene to current scene handler.");
49 (
"If scene-name is omitted, current scene is attached. To see scenes and" 50 "\nscene handlers, use \"/vis/scene/list\" and \"/vis/sceneHandler/list\"");
51 fpCommand -> SetParameterName (
"scene-name",
53 currentAsDefault =
true);
G4UIcmdWithAString * fpCommand
◆ ~G4VisCommandSceneHandlerAttach()
G4VisCommandSceneHandlerAttach::~G4VisCommandSceneHandlerAttach |
( |
| ) |
|
◆ GetCurrentValue()
◆ SetNewValue()
Reimplemented from G4UImessenger.
Definition at line 65 of file G4VisCommandsSceneHandler.cc.
72 if (sceneName.length () == 0) {
75 "WARNING: No scene specified. Maybe there are no scenes available" 76 "\n yet. Please create one." <<
G4endl;
85 "ERROR: Current scene handler not defined. Please select or create one." 93 if (sceneList.empty ()) {
96 "ERROR: No valid scenes available yet. Please create one." 102 G4int iScene, nScenes = sceneList.size ();
103 for (iScene = 0; iScene < nScenes; iScene++) {
104 if (sceneList [iScene] -> GetName () == sceneName)
break;
106 if (iScene < nScenes) {
107 G4Scene* pScene = sceneList [iScene];
108 pSceneHandler -> SetScene (pScene);
112 G4VViewer* pViewer = pSceneHandler -> GetCurrentViewer();
113 if (pViewer && pViewer -> GetViewParameters().IsAutoRefresh()) {
114 pViewer -> SetView ();
115 pViewer -> ClearView ();
116 pViewer -> DrawView ();
119 G4cout <<
"Scene \"" << sceneName
120 <<
"\" attached to scene handler \"" 121 << pSceneHandler -> GetName () <<
122 ".\n (You may have to refresh with \"/vis/viewer/flush\" if view" 123 " is not \"auto-refresh\".)" 129 G4cerr <<
"ERROR: Scene \"" << sceneName
130 <<
"\" not found. Use \"/vis/scene/list\" to see possibilities."
G4GLOB_DLL std::ostream G4cout
static Verbosity GetVerbosity()
G4GLOB_DLL std::ostream G4cerr
static G4VisManager * fpVisManager
◆ fpCommand
The documentation for this class was generated from the following files: