46 (
"(DTREE) Creates a scene consisting of this physical volume and"
47 "\n produces a representation of the geometry hieracrhy.");
50 parameter =
new G4UIparameter(
"physical-volume-name",
's', omitable =
true);
51 parameter -> SetDefaultValue(
"world");
53 parameter =
new G4UIparameter(
"system",
's', omitable =
true);
54 parameter -> SetDefaultValue(
"ATree");
65 std::istringstream is(newValue);
66 is >> pvname >> system;
78 if (!system.contains(
"Tree")) {
90 if (keepVerbose >= 2 ||
117 (
"Draw view from this angle, etc.");
119 parameter =
new G4UIparameter(
"theta-degrees",
'd', omitable =
true);
120 parameter -> SetDefaultValue(0.);
122 parameter =
new G4UIparameter(
"phi-degrees",
'd', omitable =
true);
123 parameter -> SetDefaultValue(0.);
125 parameter =
new G4UIparameter(
"pan-right",
'd', omitable =
true);
126 parameter -> SetDefaultValue(0.);
128 parameter =
new G4UIparameter(
"pan-up",
'd', omitable =
true);
129 parameter -> SetDefaultValue(0.);
131 parameter =
new G4UIparameter(
"pan-unit",
's', omitable =
true);
132 parameter -> SetDefaultValue(
"cm");
134 parameter =
new G4UIparameter(
"zoom-factor",
'd', omitable =
true);
135 parameter -> SetDefaultValue(1.);
137 parameter =
new G4UIparameter(
"dolly",
'd', omitable =
true);
138 parameter -> SetDefaultValue(0.);
140 parameter =
new G4UIparameter(
"dolly-unit",
's', omitable =
true);
141 parameter -> SetDefaultValue(
"cm");
154 if (!currentViewer) {
157 "WARNING: G4VisCommandsDrawView::SetNewValue: no current viewer."
171 std::istringstream is(newValue);
172 is >> thetaDeg >> phiDeg >> panRight >> panUp >> panUnit
173 >> zoomFactor >> dolly >> dollyUnit;
178 if (keepVerbose >= 2 ||
187 G4String(
"/vis/viewer/set/viewpointThetaPhi " + thetaDeg +
" " + phiDeg +
" deg"));
189 G4String(
"/vis/viewer/panTo " + panRight +
" " + panUp +
" " + panUnit));
191 G4String(
"/vis/viewer/zoomTo " + zoomFactor));
196 G4String(
"/vis/viewer/dollyTo " + dolly +
" " + dollyUnit));
206 (
"Creates a scene containing this physical volume and asks the"
207 "\ncurrent viewer to draw it. The scene becomes current.");
209 (
"If physical-volume-name is \"world\" (the default), the main geometry"
210 "\ntree (material world) is drawn. If \"worlds\", all worlds - material"
211 "\nworld and parallel worlds, if any - are drawn. Otherwise a search of"
212 "\nall worlds is made, taking the first matching occurence only. To see"
213 "\na representation of the geometry hierarchy of the worlds, try"
214 "\n\"/vis/drawTree worlds\" or one of the driver/browser combinations"
215 "\nthat have the required functionality, e.g., HepRepFile/HepRApp.");
236 static G4bool warned =
false;
239 "NOTE: For systems which are not \"auto-refresh\" you will need to"
240 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
252 (
"Creates a scene handler ready for drawing.");
254 (
"The scene handler becomes current (the name is auto-generated).");
256 parameter =
new G4UIparameter(
"graphics-system-name",
's', omitable =
false);
258 parameter =
new G4UIparameter(
"window-size-hint",
's', omitable =
true);
260 (
"integer (pixels) for square window placed by window manager or"
261 " X-Windows-type geometry string, e.g. 600x600-100+100");
271 G4String systemName, windowSizeHint;
272 std::istringstream is(newValue);
273 is >> systemName >> windowSizeHint;
277 if (keepVerbose >= 2 ||
286 std::set<G4String> candidates;
287 for (
const auto gs:
fpVisManager -> GetAvailableGraphicsSystems()) {
289 for (
const auto& nickname: gs->GetNicknames()) {
290 if (!nickname.contains(
"FALLBACK")) {
291 candidates.insert(nickname);
295 G4cerr <<
"Candidates are:";
296 for (
const auto& candidate: candidates) {
297 G4cerr <<
' ' << candidate;
310 (
"Draws logical volume with Boolean components, voxels and readout geometry.");
312 (
"Creates a scene consisting of this logical volume and asks the"
313 "\n current viewer to draw it to the specified depth of descent"
314 "\n showing boolean components (if any), voxels (if any),"
315 "\n readout geometry (if any) and local axes, under control of the"
316 "\n appropriate flag.");
318 (
"Note: voxels are not constructed until start of run - /run/beamOn."
319 "\n (For voxels without a run, \"/run/beamOn 0\".)");
322 parameter =
new G4UIparameter(
"logical-volume-name",
's', omitable =
false);
324 parameter =
new G4UIparameter(
"depth-of-descent",
'i', omitable =
true);
327 parameter =
new G4UIparameter(
"booleans-flag",
'b', omitable =
true);
330 parameter =
new G4UIparameter(
"voxels-flag",
'b', omitable =
true);
333 parameter =
new G4UIparameter(
"readout-flag",
'b', omitable =
true);
336 parameter =
new G4UIparameter(
"axes-flag",
'b', omitable =
true);
338 parameter -> SetGuidance (
"Set \"false\" to suppress axes.");
359 static G4bool warned =
false;
362 "NOTE: For systems which are not \"auto-refresh\" you will need to"
363 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
const G4String & GetName() const
void SetParameter(G4UIparameter *const newParameter)
virtual ~G4VisCommandOpen()
void SetCurrentSceneHandler(G4VSceneHandler *)
virtual ~G4VisCommandDrawVolume()
const G4ViewParameters & GetViewParameters() const
void SetDefaultValue(const char *theDefaultValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetViewParameters(const G4ViewParameters &vp)
G4VGraphicsSystem * GetCurrentGraphicsSystem() const
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetCurrentScene(G4Scene *)
G4int GetVerboseLevel() const
void SetVerboseLevel(G4int val)
static G4UImanager * GetUIpointer()
virtual ~G4VisCommandDrawView()
G4GLOB_DLL std::ostream G4cout
void SetGuidance(const char *aGuidance)
void SetCurrentGraphicsSystem(G4VGraphicsSystem *)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetCurrentViewer(G4VViewer *)
virtual ~G4VisCommandSpecify()
void SetAutoRefresh(G4bool)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetDefaultValue(const char *defVal)
G4VSceneHandler * GetCurrentSceneHandler() const
static Verbosity GetVerbosity()
virtual ~G4VisCommandDrawTree()
G4VViewer * GetCurrentViewer() const
G4UIcmdWithAString * fpCommand
void SetGuidance(const char *theGuidance)
G4bool IsAutoRefresh() const
G4int ApplyCommand(const char *aCommand)
G4Scene * GetCurrentScene() const
G4GLOB_DLL std::ostream G4cerr
static G4VisManager * fpVisManager