46 (
"Produces a representation of the geometry hierarchy. Further"
47 "\nguidance is given on running the command. Or look at the guidance"
48 "\nfor \"/vis/ASCIITree/verbose\".");
49 fpCommand->
SetGuidance(
"The pre-existing scene and view are preserved.");
51 parameter =
new G4UIparameter(
"physical-volume-name",
's', omitable =
true);
52 parameter -> SetDefaultValue(
"world");
53 fpCommand -> SetParameter (parameter);
54 parameter =
new G4UIparameter(
"system",
's', omitable =
true);
55 parameter -> SetDefaultValue(
"ATree");
56 fpCommand -> SetParameter (parameter);
66 std::istringstream is(newValue);
67 is >> pvname >> system;
92 if (keepUIVerbose >= 2 ||
130 fpCommand =
new G4UIcommand(
"/vis/drawView",
this);
132 (
"Draw view from this angle, etc.");
134 parameter =
new G4UIparameter(
"theta-degrees",
'd', omitable =
true);
135 parameter -> SetDefaultValue(0.);
136 fpCommand -> SetParameter (parameter);
137 parameter =
new G4UIparameter(
"phi-degrees",
'd', omitable =
true);
138 parameter -> SetDefaultValue(0.);
139 fpCommand -> SetParameter (parameter);
140 parameter =
new G4UIparameter(
"pan-right",
'd', omitable =
true);
141 parameter -> SetDefaultValue(0.);
142 fpCommand -> SetParameter (parameter);
143 parameter =
new G4UIparameter(
"pan-up",
'd', omitable =
true);
144 parameter -> SetDefaultValue(0.);
145 fpCommand -> SetParameter (parameter);
146 parameter =
new G4UIparameter(
"pan-unit",
's', omitable =
true);
147 parameter -> SetDefaultValue(
"cm");
148 fpCommand -> SetParameter (parameter);
149 parameter =
new G4UIparameter(
"zoom-factor",
'd', omitable =
true);
150 parameter -> SetDefaultValue(1.);
151 fpCommand -> SetParameter (parameter);
152 parameter =
new G4UIparameter(
"dolly",
'd', omitable =
true);
153 parameter -> SetDefaultValue(0.);
154 fpCommand -> SetParameter (parameter);
155 parameter =
new G4UIparameter(
"dolly-unit",
's', omitable =
true);
156 parameter -> SetDefaultValue(
"cm");
157 fpCommand -> SetParameter (parameter);
169 if (!currentViewer) {
172 "WARNING: G4VisCommandsDrawView::SetNewValue: no current viewer."
186 std::istringstream is(newValue);
187 is >> thetaDeg >> phiDeg >> panRight >> panUp >> panUnit
188 >> zoomFactor >> dolly >> dollyUnit;
193 if (keepVerbose >= 2 ||
202 G4String(
"/vis/viewer/set/viewpointThetaPhi " + thetaDeg +
" " + phiDeg +
" deg"));
204 G4String(
"/vis/viewer/panTo " + panRight +
" " + panUp +
" " + panUnit));
206 G4String(
"/vis/viewer/zoomTo " + zoomFactor));
211 G4String(
"/vis/viewer/dollyTo " + dolly +
" " + dollyUnit));
218 fpCommand =
new G4UIcommand(
"/vis/drawLogicalVolume",
this);
220 (
"Draws logical volume with additional components.");
222 (
"Synonymous with \"/vis/specify\".");
224 (
"Creates a scene consisting of this logical volume and asks the"
225 "\n current viewer to draw it. The scene becomes current.");
249 if (keepAutoRefresh) UImanager->
ApplyCommand(
"/vis/viewer/set/autoRefresh false");
255 UImanager->
ApplyCommand(
"/vis/viewer/set/style wireframe");
257 if (!keepMarkerNotHidden) UImanager->
ApplyCommand(
"/vis/viewer/set/hiddenMarker false");
258 if (keepAutoRefresh) UImanager->
ApplyCommand(
"/vis/viewer/set/autoRefresh true");
263 <<
"Drawing style changed to wireframe. To restore previous style:";
265 switch (keepDrawingStyle) {
267 style =
"wireframe"; edge =
"false";
break;
269 style =
"wireframe"; edge =
"true";
break;
271 style =
"surface"; edge =
"false";
break;
273 style =
"surface"; edge =
"true";
break;
275 style =
"cloud"; edge =
"";
break;
277 G4cout <<
"\n /vis/viewer/set/style " + style;
278 if (!edge.empty())
G4cout <<
"\n /vis/viewer/set/hiddenEdge " + edge;
283 <<
"Markers changed to \"not hidden\". To restore previous condition:"
284 <<
"\n /vis/viewer/set/hiddenmarker true"
288 static G4bool warned =
false;
291 "NOTE: For systems which are not \"auto-refresh\" you will need to"
292 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
301 fpCommand =
new G4UIcommand(
"/vis/drawVolume",
this);
303 (
"Creates a scene containing this physical volume and asks the"
304 "\ncurrent viewer to draw it. The scene becomes current.");
329 static G4bool warned =
false;
332 "NOTE: For systems which are not \"auto-refresh\" you will need to"
333 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
345 (
"Creates a scene handler ready for drawing.");
347 (
"The scene handler becomes current (the name is auto-generated).");
349 parameter =
new G4UIparameter(
"graphics-system-name",
's', omitable =
false);
351 parameter =
new G4UIparameter(
"window-size-hint",
's', omitable =
true);
353 (
"integer (pixels) for square window placed by window manager or"
354 " X-Windows-type geometry string, e.g. 600x600-100+100");
364 G4String systemName, windowSizeHint;
365 std::istringstream is(newValue);
366 is >> systemName >> windowSizeHint;
370 if (keepVerbose >= 2 ||
379 std::set<G4String> candidates;
380 for (
const auto gs:
fpVisManager -> GetAvailableGraphicsSystems()) {
382 for (
const auto& nickname: gs->GetNicknames()) {
383 if (!nickname.contains(
"FALLBACK")) {
384 candidates.insert(nickname);
388 std::ostringstream oss;
389 oss <<
"Candidates are:";
390 for (
const auto& candidate: candidates) {
391 oss <<
' ' << candidate;
405 (
"Draws logical volume with Boolean components, voxels and readout geometry.");
407 (
"Synonymous with \"/vis/drawLogicalVolume\".");
409 (
"Creates a scene consisting of this logical volume and asks the"
410 "\n current viewer to draw it to the specified depth of descent"
411 "\n showing boolean components (if any), voxels (if any),"
412 "\n readout geometry (if any), local axes and overlaps (if any),"
413 "\n under control of the appropriate flag.");
415 (
"Note: voxels are not constructed until start of run - /run/beamOn."
416 "\n (For voxels without a run, \"/run/beamOn 0\".)");
417 fpCommand->
SetGuidance(
"The scene becomes current.");
419 parameter =
new G4UIparameter(
"logical-volume-name",
's', omitable =
false);
421 parameter =
new G4UIparameter(
"depth-of-descent",
'i', omitable =
true);
424 parameter =
new G4UIparameter(
"booleans-flag",
'b', omitable =
true);
427 parameter =
new G4UIparameter(
"voxels-flag",
'b', omitable =
true);
430 parameter =
new G4UIparameter(
"readout-flag",
'b', omitable =
true);
433 parameter =
new G4UIparameter(
"axes-flag",
'b', omitable =
true);
435 parameter -> SetGuidance (
"Set \"false\" to suppress axes.");
437 parameter =
new G4UIparameter(
"check-overlap-flag",
'b', omitable =
true);
439 parameter -> SetGuidance (
"Set \"false\" to suppress overlap check.");
460 static G4bool warned =
false;
463 "NOTE: For systems which are not \"auto-refresh\" you will need to"
464 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
G4bool contains(const std::string &) const
G4UIcommand * FindPath(const char *commandPath) const
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
G4UIcommandTree * GetTree() const
G4int ApplyCommand(const char *aCommand)
G4int GetVerboseLevel() const
static G4UImanager * GetUIpointer()
void SetVerboseLevel(G4int val)
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
const G4String & GetName() const
const G4ViewParameters & GetViewParameters() const
void SetViewParameters(const G4ViewParameters &vp)
static G4VisManager * fpVisManager
void CopyParametersFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd)
void CopyGuidanceFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd, G4int startLine=0)
static G4VVisManager * GetConcreteInstance()
void SetAutoRefresh(G4bool)
G4bool IsMarkerNotHidden() const
G4bool IsAutoRefresh() const
DrawingStyle GetDrawingStyle() const
G4VisCommandDrawLogicalVolume()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandDrawLogicalVolume()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandDrawTree()
virtual ~G4VisCommandDrawView()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandDrawVolume()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandOpen()
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSpecify()
void SetCurrentGraphicsSystem(G4VGraphicsSystem *)
G4Scene * GetCurrentScene() const
void SetCurrentSceneHandler(G4VSceneHandler *)
void SetCurrentScene(G4Scene *)
void SetCurrentViewer(G4VViewer *)
G4VGraphicsSystem * GetCurrentGraphicsSystem() const
G4VViewer * GetCurrentViewer() const
G4VSceneHandler * GetCurrentSceneHandler() const
static Verbosity GetVerbosity()
void SetVerboseLevel(G4int)