63 fpCommand =
new G4UIcommand (
"/vis/viewer/addCutawayPlane",
this);
64 fpCommand -> SetGuidance
65 (
"Add cutaway plane to current viewer.");
68 parameter -> SetDefaultValue (0);
69 parameter -> SetGuidance (
"Coordinate of point on the plane.");
72 parameter -> SetDefaultValue (0);
73 parameter -> SetGuidance (
"Coordinate of point on the plane.");
76 parameter -> SetDefaultValue (0);
77 parameter -> SetGuidance (
"Coordinate of point on the plane.");
80 parameter -> SetDefaultValue (
"m");
81 parameter -> SetGuidance (
"Unit of point on the plane.");
84 parameter -> SetDefaultValue (1);
85 parameter -> SetGuidance (
"Component of plane normal.");
88 parameter -> SetDefaultValue (0);
89 parameter -> SetGuidance (
"Component of plane normal.");
92 parameter -> SetDefaultValue (0);
93 parameter -> SetGuidance (
"Component of plane normal.");
113 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
121 std::istringstream is (newValue);
122 is >> x >> y >> z >> unit >> nx >> ny >> nz;
124 x *= F; y *= F; z *= F;
130 G4cout <<
"Cutaway planes for viewer \"" << viewer->
GetName() <<
"\" now:";
132 for (std::size_t i = 0; i < cutaways.size(); ++i)
133 G4cout <<
"\n " << i <<
": " << cutaways[i];
144 fpCommandCentreAndZoomInOn =
new G4UIcommand (
"/vis/viewer/centreAndZoomInOn",
this);
146 (
"Centre and zoom in on the given physical volume.");
148 (
"The names of all volumes in all worlds are matched against pv-name. If"
149 "\ncopy-no is supplied, it matches the copy number too. If pv-name is of the"
150 "\nform \"/regexp/\", where regexp is a regular expression (see C++ regex),"
151 "\nthe match uses the usual rules of regular expression matching."
152 "\nOtherwise an exact match is required."
153 "\nFor example, \"/Shap/\" matches \"Shape1\" and \"Shape2\".");
155 (
"It may help to see a textual representation of the geometry hierarchy of"
156 "\nthe worlds. Try \"/vis/drawTree [worlds]\" or one of the driver/browser"
157 "\ncombinations that have the required functionality, e.g., HepRepFile.");
159 (
"If there are more than one matching physical volumes they will all be"
160 "\nincluded. If this is not what you want, and what you want is to centre on a"
161 "\nparticular touchable, then select the touchable (\"/vis/set/touchable\") and"
162 "\nuse \"/vis/touchable/centreOn\". (You may need \"/vis/touchable/findPath\".)");
164 parameter =
new G4UIparameter(
"pv-name",
's',omitable =
false);
167 parameter =
new G4UIparameter(
"copy-no",
'i',omitable =
true);
169 parameter->
SetGuidance (
"Copy number. -1 means any or all copy numbers");
172 fpCommandCentreOn =
new G4UIcommand (
"/vis/viewer/centreOn",
this);
173 fpCommandCentreOn->
SetGuidance (
"Centre the view on the given physical volume.");
181 delete fpCommandCentreAndZoomInOn;
182 delete fpCommandCentreOn;
195 if (!currentViewer) {
198 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
206 std::istringstream is (newValue);
207 is >> pvName >> copyNo;
212 std::size_t nWorlds = transportationManager->
GetNoWorlds();
213 std::vector<G4PhysicalVolumesSearchScene::Findings> findingsVector;
214 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
216 for (std::size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
223 for (
const auto& findings: searchScene.
GetFindings()) {
224 findingsVector.push_back(findings);
228 if (findingsVector.empty()) {
231 <<
"WARNING: Volume \"" << pvName <<
"\" ";
233 G4warn <<
"copy number " << copyNo;
241 std::vector<std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>> foundPaths;
244 G4Scene tempScene(
"Centre Scene");
245 G4bool successfullyAdded =
true;
246 for (
const auto& findings: findingsVector) {
248 findings.fpFoundPV->SetCopyNo(findings.fFoundPVCopyNo);
255 findings.fFoundObjectTransformation,
258 findings.fFoundBasePVPath);
262 successfullyAdded =
false;
266 G4cout <<
"\"" << findings.fpFoundPV->GetName()
267 <<
"\", copy no. " << findings.fFoundPVCopyNo
268 <<
",\n found in searched volume \""
269 << findings.fpSearchPV->GetName()
270 <<
"\" at depth " << findings.fFoundDepth
271 <<
",\n base path: \"" << findings.fFoundBasePVPath
272 <<
",\n has been added to temporary scene \"" << tempScene.
GetName() <<
"\"."
275 foundPaths.push_back(findings.fFoundFullPVPath);
279 delete sceneModel.fpModel;
281 if (!successfullyAdded)
return;
290 if (command == fpCommandCentreAndZoomInOn) {
307 Twinkle(currentViewer,newVP,foundPaths);
313 <<
"Viewer \"" << currentViewer->
GetName()
315 if (fpCommandCentreAndZoomInOn) {
316 G4cout <<
"and zoomed in";
318 G4cout <<
" on physical volume(s) \"" << pvName <<
'\"'
329 fpCommand =
new G4UIcommand (
"/vis/viewer/changeCutawayPlane",
this);
330 fpCommand -> SetGuidance(
"Change cutaway plane.");
333 parameter -> SetGuidance (
"Index of plane: 0, 1, 2.");
336 parameter -> SetDefaultValue (0);
337 parameter -> SetGuidance (
"Coordinate of point on the plane.");
340 parameter -> SetDefaultValue (0);
341 parameter -> SetGuidance (
"Coordinate of point on the plane.");
344 parameter -> SetDefaultValue (0);
345 parameter -> SetGuidance (
"Coordinate of point on the plane.");
348 parameter -> SetDefaultValue (
"m");
349 parameter -> SetGuidance (
"Unit of point on the plane.");
352 parameter -> SetDefaultValue (1);
353 parameter -> SetGuidance (
"Component of plane normal.");
356 parameter -> SetDefaultValue (0);
357 parameter -> SetGuidance (
"Component of plane normal.");
360 parameter -> SetDefaultValue (0);
361 parameter -> SetGuidance (
"Component of plane normal.");
381 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
390 std::istringstream is (newValue);
391 is >> index >> x >> y >> z >> unit >> nx >> ny >> nz;
393 x *= F; y *= F; z *= F;
400 G4cout <<
"Cutaway planes for viewer \"" << viewer->
GetName() <<
"\" now:";
402 for (std::size_t i = 0; i < cutaways.size(); ++i)
403 G4cout <<
"\n " << i <<
": " << cutaways[i];
413 G4bool omitable, currentAsDefault;
415 fpCommand -> SetGuidance (
"Clears viewer.");
416 fpCommand -> SetGuidance
417 (
"By default, clears current viewer. Specified viewer becomes current."
418 "\n\"/vis/viewer/list\" to see possible viewer names.");
419 fpCommand -> SetParameterName (
"viewer-name",
421 currentAsDefault =
true);
430 return viewer ? viewer -> GetName () :
G4String(
"none");
441 G4warn <<
"ERROR: Viewer \"" << clearName
442 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
452 G4cout <<
"Viewer \"" << clearName <<
"\" cleared." <<
G4endl;
461 (
"/vis/viewer/clearCutawayPlanes",
this);
462 fpCommand -> SetGuidance (
"Clear cutaway planes of current viewer.");
481 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
490 G4cout <<
"Cutaway planes for viewer \"" << viewer->
GetName()
491 <<
"\" now cleared." <<
G4endl;
500 G4bool omitable, currentAsDefault;
502 fpCommand -> SetGuidance (
"Clears transients from viewer.");
503 fpCommand -> SetGuidance
504 (
"By default, operates on current viewer. Specified viewer becomes current."
505 "\n\"/vis/viewer/list\" to see possible viewer names.");
506 fpCommand -> SetParameterName (
"viewer-name",
508 currentAsDefault =
true);
517 return viewer ? viewer -> GetName () :
G4String(
"none");
528 G4warn <<
"ERROR: Viewer \"" << clearName
529 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
540 G4cout <<
"Viewer \"" << clearName <<
"\" cleared of transients."
550 (
"/vis/viewer/clearVisAttributesModifiers",
this);
551 fpCommand -> SetGuidance (
"Clear vis attribute modifiers of current viewer.");
552 fpCommand -> SetGuidance (
"(These are used for touchables, etc.)");
571 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
580 G4cout <<
"Vis attributes modifiers for viewer \"" << viewer->
GetName()
581 <<
"\" now cleared." <<
G4endl;
591 fpCommand =
new G4UIcommand (
"/vis/viewer/clone",
this);
592 fpCommand -> SetGuidance (
"Clones viewer.");
593 fpCommand -> SetGuidance
594 (
"By default, clones current viewer. Clone becomes current."
595 "\nClone name, if not provided, is derived from the original name."
596 "\n\"/vis/viewer/list\" to see possible viewer names.");
598 parameter =
new G4UIparameter (
"original-viewer-name",
's', omitable =
true);
599 parameter -> SetCurrentAsDefault (
true);
600 fpCommand -> SetParameter (parameter);
601 parameter =
new G4UIparameter (
"clone-name",
's', omitable =
true);
602 parameter -> SetDefaultValue (
"none");
603 fpCommand -> SetParameter (parameter);
613 return "\"" + originalName +
"\"";
621 std::istringstream is (newValue);
626 while (is.get(c) && c ==
' '){}
628 while (is.get(c) && c !=
'"') {originalName += c;}
632 while (is.get(c) && c !=
' ') {originalName += c;}
638 if (!originalViewer) {
640 G4warn <<
"ERROR: Viewer \"" << originalName
641 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
646 originalName = originalViewer->
GetName();
648 while (is.get(c) && c ==
' '){}
650 while (is.get(c) && c !=
'"') {cloneName += c;}
654 while (is.get(c) && c !=
' ') {cloneName += c;}
659 G4bool errorWhileNaming =
false;
660 if (cloneName ==
"none") {
663 cloneName = originalName;
664 std::ostringstream oss;
665 oss <<
'-' << subID++;
666 G4String::size_type lastDashPosition, nextSpacePosition;
667 if ((lastDashPosition = cloneName.rfind(
'-')) != G4String::npos &&
668 (nextSpacePosition = cloneName.find(
" ", lastDashPosition)) !=
670 cloneName.insert(nextSpacePosition, oss.str());
672 G4String::size_type spacePosition = cloneName.find(
' ');
673 if (spacePosition != G4String::npos)
674 cloneName.insert(spacePosition, oss.str());
676 errorWhileNaming =
true;
678 }
while (!errorWhileNaming &&
fpVisManager -> GetViewer (cloneName));
681 if (errorWhileNaming) {
683 G4warn <<
"ERROR: While naming clone viewer \"" << cloneName
692 G4warn <<
"ERROR: Putative clone viewer \"" << cloneName
693 <<
"\" already exists."
705 (
G4String(
"/vis/viewer/create ! \"" + cloneName +
"\" " + windowSizeHint));
709 G4cout <<
"Viewer \"" << originalName <<
"\" cloned." <<
G4endl;
710 G4cout <<
"Clone \"" << cloneName <<
"\" now current." <<
G4endl;
718 fpCommand =
new G4UIcommand (
"/vis/viewer/colourByDensity",
this);
719 fpCommand -> SetGuidance
720 (
"If a volume has no vis attributes, colour it by density.");
721 fpCommand -> SetGuidance
722 (
"Provide algorithm number, e.g., \"1\" (or \"0\" to switch off)."
723 "\nThen a unit of density, e.g., \"g/cm3\"."
724 "\nThen parameters for the algorithm assumed to be densities in that unit.");
725 fpCommand -> SetGuidance
726 (
"Algorithm 1: Simple algorithm takes 3 parameters: d0, d1 and d2."
727 "\n Volumes with density < d0 are invisible."
728 "\n Volumes with d0 <= density < d1 have colour on range red->green."
729 "\n Volumes with d1 <= density < d2 have colour on range green->blue."
730 "\n Volumes with density > d2 are blue.");
733 parameter -> SetGuidance (
"Algorithm number (or \"0\" to switch off).");
734 parameter -> SetDefaultValue (1);
737 parameter -> SetGuidance (
"Unit of following densities, e.g., \"g/cm3\".");
738 parameter -> SetDefaultValue (
"g/cm3");
741 parameter -> SetGuidance (
"Density parameter 0");
742 parameter -> SetDefaultValue (0.5);
745 parameter -> SetGuidance (
"Density parameter 1");
746 parameter -> SetDefaultValue (3.0);
749 parameter -> SetGuidance (
"Density parameter 2.");
750 parameter -> SetDefaultValue (10.0);
770 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
777 G4int algorithmNumber;
780 std::istringstream is (newValue);
781 is >> algorithmNumber >> unit >> d0 >> d1 >> d2;
783 if (algorithmNumber < 0 || algorithmNumber > 1) {
786 "ERROR: Unrecognised algorithm number: " << algorithmNumber
792 std::vector<G4double> parameters;
793 if (algorithmNumber > 0) {
794 const G4String where =
"G4VisCommandViewerColourByDensity::SetNewValue";
799 d0 *= valueOfUnit; d1 *= valueOfUnit; d2 *= valueOfUnit;
803 "ERROR: Unrecognised or inappropriate unit: " << unit
808 parameters.push_back(d0);
809 parameters.push_back(d1);
810 parameters.push_back(d2);
820 <<
" selected for viewer \"" << viewer->
GetName()
837 fpCommand -> SetGuidance
838 (
"Copy the camera-specific parameters from the specified viewer.");
839 fpCommand -> SetGuidance
840 (
"Note: To copy ALL view parameters, including scene modifications,"
841 "\nuse \"/vis/viewer/set/all\"");
842 fpCommand -> SetParameterName (
"from-viewer-name", omitable =
false);
858 if (!currentViewer) {
861 "ERROR: G4VisCommandsViewerCopyViewFrom::SetNewValue: no current viewer."
867 const G4String& fromViewerName = newValue;
871 G4warn <<
"ERROR: Viewer \"" << fromViewerName
872 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
878 if (fromViewer == currentViewer) {
881 "WARNING: G4VisCommandsViewerSet::SetNewValue:"
882 "\n from-viewer and current viewer are identical."
894 G4cout <<
"Camera parameters of viewer \"" << currentViewer->
GetName()
895 <<
"\"\n set to those of viewer \"" << fromViewer->
GetName()
905 fpCommand =
new G4UIcommand (
"/vis/viewer/create",
this);
906 fpCommand -> SetGuidance
907 (
"Creates a viewer. If the scene handler name is specified, then a"
908 "\nviewer of that scene handler is created. Otherwise, a viewer"
909 "\nof the current scene handler is created.");
910 fpCommand -> SetGuidance
911 (
"If the viewer name is not specified a name is generated from the name"
912 "\nof the scene handler and a serial number.");
913 fpCommand -> SetGuidance(
"The scene handler and viewer become current.");
914 fpCommand -> SetGuidance
915 (
"(Note: the system adds the graphics system name to the viewer name"
916 "\nfor identification, but for selecting, copying, etc., only characters"
917 "\nup to the first blank are used. For example, if the viewer name is"
918 "\n\"viewer-0 (G4OpenGLStoredQt)\", it may be referenced by \"viewer-0\","
919 "\nfor example in \"/vis/viewer/select viewer-0\".)");
920 fpCommand -> SetGuidance
921 (
"Window size and placement hints, e.g. 600x600-100+100 (in pixels):");
922 fpCommand -> SetGuidance
923 (
"- single number, e.g., \"600\": square window;");
924 fpCommand -> SetGuidance
925 (
"- two numbers, e.g., \"800x600\": rectangluar window;");
926 fpCommand -> SetGuidance
927 (
"- two numbers plus placement hint, e.g., \"600x600-100+100\" places window of size"
928 "\n 600x600 100 pixels left and 100 pixels down from top right corner.");
929 fpCommand -> SetGuidance
930 (
"- If not specified, the default is \"600\", i.e., 600 pixels square, placed"
931 "\n at the window manager's discretion...or picked up from the previous viewer.");
932 fpCommand -> SetGuidance
933 (
"- This is an X-Windows-type geometry string, see:"
934 "\n https://en.wikibooks.org/wiki/Guide_to_X11/Starting_Programs,"
935 "\n \"Specifying window geometry\".");
937 parameter =
new G4UIparameter (
"scene-handler",
's', omitable =
true);
938 parameter -> SetCurrentAsDefault (
true);
939 fpCommand -> SetParameter (parameter);
940 parameter =
new G4UIparameter (
"viewer-name",
's', omitable =
true);
941 parameter -> SetCurrentAsDefault (
true);
942 fpCommand -> SetParameter (parameter);
943 parameter =
new G4UIparameter (
"window-size-hint",
's', omitable =
true);
944 parameter -> SetDefaultValue(
"none");
945 fpCommand -> SetParameter (parameter);
952G4String G4VisCommandViewerCreate::NextName () {
953 std::ostringstream oss;
955 oss <<
"viewer-" << fId <<
" (";
957 oss << sceneHandler -> GetGraphicsSystem () -> GetName ();
960 oss <<
"no_scene_handlers";
970 if (currentSceneHandler) {
971 currentValue = currentSceneHandler -> GetName ();
973 currentValue =
"none";
977 currentValue += NextName ();
988 std::istringstream is (newValue);
989 is >> sceneHandlerName;
994 while (is.get(c) && c ==
' '){}
996 while (is.get(c) && c !=
'"') {newName += c;}
1000 while (is.get(c) && c !=
' ') {newName += c;}
1006 is >> windowSizeHintString;
1010 std::size_t nHandlers = sceneHandlerList.size ();
1011 if (nHandlers == 0) {
1014 "ERROR: G4VisCommandViewerCreate::SetNewValue: no scene handlers."
1015 "\n Create a scene handler with \"/vis/sceneHandler/create\"";
1020 std::size_t iHandler;
1021 for (iHandler = 0; iHandler < nHandlers; ++iHandler) {
1022 if (sceneHandlerList [iHandler] -> GetName () == sceneHandlerName)
break;
1025 if (iHandler >= nHandlers) {
1030 "G4VisCommandViewerCreate::SetNewValue: invalid scene handler specified.";
1038 if (sceneHandler !=
fpVisManager -> GetCurrentSceneHandler ()) {
1044 if (newName ==
"") {
1047 if (newName == nextName) fId++;
1050 for (std::size_t ih = 0; ih < nHandlers; ++ih) {
1052 const G4ViewerList& viewerList = sh -> GetViewerList ();
1053 for (std::size_t iViewer = 0; iViewer < viewerList.size (); iViewer++) {
1054 if (viewerList [iViewer] -> GetShortName () == newShortName ) {
1057 "ERROR: Viewer \"" << newShortName <<
"\" already exists.";
1067 if (existingViewer) {
1069 fExistingVP = existingViewer->GetViewParameters();
1078 fpVisManager -> CreateViewer (newName,windowSizeHintString);
1083 if (newViewer && newViewer -> GetName () == newName) {
1095 G4cout <<
"New viewer \"" << newName <<
"\" created." <<
G4endl;
1103 ed <<
"ERROR: New viewer doesn\'t match!!! Curious!!";
1105 ed <<
"WARNING: No viewer created.";
1117 G4warn <<
"Issue /vis/viewer/refresh or flush to see effect."
1127 fDollyIncrement (0.),
1130 G4bool omitable, currentAsDefault;
1133 (
"/vis/viewer/dolly",
this);
1134 fpCommandDolly -> SetGuidance
1135 (
"Incremental dolly.");
1136 fpCommandDolly -> SetGuidance
1137 (
"Moves the camera incrementally towards target point.");
1138 fpCommandDolly -> SetParameterName(
"increment",
1140 currentAsDefault=
true);
1141 fpCommandDolly -> SetDefaultUnit(
"m");
1144 (
"/vis/viewer/dollyTo",
this);
1145 fpCommandDollyTo -> SetGuidance
1146 (
"Dolly to specific coordinate.");
1147 fpCommandDollyTo -> SetGuidance
1148 (
"Places the camera towards target point relative to standard camera point.");
1149 fpCommandDollyTo -> SetParameterName(
"distance",
1151 currentAsDefault=
true);
1152 fpCommandDollyTo -> SetDefaultUnit(
"m");
1156 delete fpCommandDolly;
1157 delete fpCommandDollyTo;
1162 if (command == fpCommandDolly) {
1165 else if (command == fpCommandDollyTo) {
1168 return currentValue;
1178 if (!currentViewer) {
1181 "ERROR: G4VisCommandsViewerDolly::SetNewValue: no current viewer."
1189 if (command == fpCommandDolly) {
1193 else if (command == fpCommandDollyTo) {
1208 G4bool omitable, currentAsDefault;
1210 fpCommand -> SetGuidance
1211 (
"Compound command: \"/vis/viewer/refresh\" + \"/vis/viewer/update\".");
1212 fpCommand -> SetGuidance
1213 (
"Useful for refreshing and initiating post-processing for graphics"
1214 "\nsystems which need post-processing. By default, acts on current"
1215 "\nviewer. \"/vis/viewer/list\" to see possible viewers. Viewer"
1216 "\nbecomes current.");
1217 fpCommand -> SetParameterName (
"viewer-name",
1219 currentAsDefault =
true);
1229 return viewer ? viewer -> GetName () :
G4String(
"none");
1240 G4warn <<
"ERROR: Viewer \"" << flushName <<
"\"" <<
1241 " not found - \"/vis/viewer/list\"\n to see possibilities."
1251 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\""
1252 <<
" flushed." <<
G4endl;
1260 fpCommand =
new G4UIcommand (
"/vis/viewer/interpolate",
this);
1261 fpCommand -> SetGuidance
1262 (
"Interpolate views defined by the first argument, which can contain "
1263 "Unix-shell-style pattern matching characters such as '*', '?' and '[' "
1264 "- see \"man sh\" and look for \"Pattern Matching\". The contents "
1265 "of each file are assumed to be \"/vis/viewer\" commands "
1266 "that specify a particular view. The files are processed in alphanumeric "
1267 "order of filename. The files may be written by hand or produced by the "
1268 "\"/vis/viewer/save\" command.");
1269 fpCommand -> SetGuidance
1270 (
"The default is to search the working directory for files with a .g4view "
1271 "extension. Another procedure is to assemble view files in a subdirectory, "
1272 "e.g., \"myviews\"; then they can be interpolated with\n"
1273 "\"/vis/viewer/interpolate myviews\".");
1274 fpCommand -> SetGuidance
1275 (
"To export interpolated views to file for a future possible movie, "
1276 "write \"export\" as 5th parameter (OpenGL only).");
1278 parameter =
new G4UIparameter(
"pattern",
's', omitable =
true);
1279 parameter -> SetGuidance(
"Pattern that defines the view files.");
1280 parameter -> SetDefaultValue(
"*.g4view");
1281 fpCommand -> SetParameter(parameter);
1282 parameter =
new G4UIparameter(
"no-of-points",
'i', omitable =
true);
1283 parameter -> SetGuidance (
"Number of interpolation points per interval.");
1284 parameter -> SetDefaultValue(50);
1285 fpCommand -> SetParameter(parameter);
1286 parameter =
new G4UIparameter(
"wait-time",
's', omitable =
true);
1287 parameter -> SetGuidance(
"Wait time per interpolated point");
1288 parameter -> SetDefaultValue(
"20.");
1289 fpCommand -> SetParameter(parameter);
1290 parameter =
new G4UIparameter(
"time-unit",
's', omitable =
true);
1291 parameter -> SetDefaultValue(
"millisecond");
1292 fpCommand -> SetParameter (parameter);
1293 parameter =
new G4UIparameter(
"export",
's', omitable =
true);
1294 parameter -> SetDefaultValue(
"no");
1295 fpCommand -> SetParameter (parameter);
1311 if (!currentViewer) {
1314 "ERROR: G4VisCommandViewerInterpolate::SetNewValue: no current viewer."
1321 G4int nInterpolationPoints;
1326 std::istringstream iss (newValue);
1329 >> nInterpolationPoints
1330 >> waitTimePerPointString
1333 G4String waitTimePerPointDimString(waitTimePerPointString +
' ' + timeUnit);
1336 G4int waitTimePerPointmilliseconds = waitTimePerPoint/millisecond;
1337 if (waitTimePerPointmilliseconds < 0) waitTimePerPointmilliseconds = 0;
1358 const G4int safety = 99;
1359 G4int safetyCount = 0;
1360 G4fs::path pathPattern = pattern.c_str();
1364 (pathPattern.parent_path().string().length() ?
1365 pathPattern.parent_path().string() :
1367 G4fs::path parentPath = parentPathString.c_str();
1370 std::set<G4fs::path> paths;
1372 if (G4fs::is_directory(pathPattern)) {
1375 for (
const auto& path: G4fs::directory_iterator(pathPattern)) {
1376 if (safetyCount++ >= safety)
break;
1386 for (
G4int i = 0; i < (
G4int)pattern.length(); ++i) {
1387 if (pattern[i] ==
'.') {
1388 regexp_pattern +=
"\\.";
1389 }
else if (pattern[i] ==
'*') {
1390 regexp_pattern +=
".*";
1391 }
else if (pattern[i] ==
'?') {
1392 regexp_pattern +=
"(.{1,1})";
1394 regexp_pattern += pattern[i];
1397 std::regex regexp(regexp_pattern, std::regex_constants::basic | std::regex_constants::icase);
1399 for (
const auto& path: G4fs::directory_iterator(parentPath)) {
1400 const auto& pathname = path.path().relative_path().string();
1401 if (std::regex_match(pathname, regexp)) {
1402 if (safetyCount++ >= safety)
break;
1408 if (safetyCount > safety) {
1411 "/vis/viewer/interpolate:"
1412 "\n the number of way points has been limited to the maximum currently allowed: "
1418 std::vector<G4ViewParameters> viewVector;
1419 for (
const auto& path: paths) {
1420 uiManager->
ApplyCommand(
"/control/execute " + path.relative_path().string());
1424 viewVector.push_back(vp);
1428 (currentViewer,viewVector,
1429 nInterpolationPoints,waitTimePerPointmilliseconds,exportString);
1439 G4cout <<
"Viewer \"" << currentViewer -> GetName () <<
"\""
1440 <<
" restored." <<
G4endl;
1448 fpCommand =
new G4UIcommand (
"/vis/viewer/list",
this);
1449 fpCommand -> SetGuidance (
"Lists viewers(s).");
1450 fpCommand -> SetGuidance
1451 (
"See \"/vis/verbose\" for definition of verbosity.");
1455 parameter -> SetDefaultValue (
"all");
1456 fpCommand -> SetParameter (parameter);
1459 parameter -> SetDefaultValue (
"warnings");
1460 fpCommand -> SetParameter (parameter);
1473 std::istringstream is (newValue);
1474 is >> name >> verbosityString;
1481 if (currentViewer) {
1482 currentViewerShortName = currentViewer -> GetShortName ();
1485 currentViewerShortName =
"none";
1490 std::size_t nHandlers = sceneHandlerList.size ();
1492 G4bool foundCurrent =
false;
1493 for (std::size_t iHandler = 0; iHandler < nHandlers; ++iHandler) {
1495 const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
1497 <<
"Scene handler \"" << sceneHandler -> GetName () <<
"\" ("
1499 const G4Scene* pScene = sceneHandler -> GetScene ();
1501 G4cout <<
", scene \"" << pScene -> GetName () <<
"\"";
1504 std::size_t nViewers = viewerList.size ();
1505 if (nViewers == 0) {
1506 G4cout <<
"\n No viewers for this scene handler." <<
G4endl;
1509 for (std::size_t iViewer = 0; iViewer < nViewers; ++iViewer) {
1510 const G4VViewer* thisViewer = viewerList [iViewer];
1511 G4String thisName = thisViewer -> GetName ();
1512 G4String thisShortName = thisViewer -> GetShortName ();
1513 if (name !=
"all") {
1514 if (thisShortName != shortName)
continue;
1518 if (thisShortName == currentViewerShortName) {
1519 foundCurrent =
true;
1525 G4cout <<
" viewer \"" << thisName <<
"\"";
1527 G4cout <<
"\n " << *thisViewer;
1534 if (!foundCurrent) {
1535 G4cout <<
"No valid current viewer - please create or select one."
1541 if (name !=
"all") {
1542 G4cout <<
" of name \"" << name <<
"\"";
1551 fPanIncrementRight (0.),
1552 fPanIncrementUp (0.),
1559 (
"/vis/viewer/pan",
this);
1560 fpCommandPan -> SetGuidance
1561 (
"Incremental pan.");
1562 fpCommandPan -> SetGuidance
1563 (
"Moves the camera incrementally right and up by these amounts (as seen"
1564 "\nfrom viewpoint direction).");
1566 parameter =
new G4UIparameter(
"right-increment",
'd', omitable =
true);
1567 parameter -> SetCurrentAsDefault (
true);
1568 fpCommandPan -> SetParameter (parameter);
1569 parameter =
new G4UIparameter(
"up-increment",
'd', omitable =
true);
1570 parameter -> SetCurrentAsDefault (
true);
1571 fpCommandPan -> SetParameter (parameter);
1572 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1573 parameter -> SetDefaultValue (
"m");
1574 fpCommandPan -> SetParameter (parameter);
1577 (
"/vis/viewer/panTo",
this);
1578 fpCommandPanTo -> SetGuidance
1579 (
"Pan to specific coordinate.");
1580 fpCommandPanTo -> SetGuidance
1581 (
"Places the camera in this position right and up relative to standard"
1582 "\ntarget point (as seen from viewpoint direction).");
1583 parameter =
new G4UIparameter(
"right",
'd', omitable =
true);
1584 parameter -> SetCurrentAsDefault (
true);
1585 fpCommandPanTo -> SetParameter (parameter);
1587 parameter -> SetCurrentAsDefault (
true);
1588 fpCommandPanTo -> SetParameter (parameter);
1589 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1590 parameter -> SetDefaultValue (
"m");
1591 fpCommandPanTo -> SetParameter (parameter);
1595 delete fpCommandPan;
1596 delete fpCommandPanTo;
1601 if (command == fpCommandPan) {
1602 currentValue =
ConvertToString(fPanIncrementRight, fPanIncrementUp,
"m");
1604 else if (command == fpCommandPanTo) {
1607 return currentValue;
1617 if (!currentViewer) {
1620 "ERROR: G4VisCommandsViewerPan::SetNewValue: no current viewer."
1628 if (command == fpCommandPan) {
1632 else if (command == fpCommandPanTo) {
1634 vp.
SetPan(fPanToRight, fPanToUp);
1648 G4bool omitable, currentAsDefault;
1650 fpCommand -> SetGuidance (
"Forces rebuild of graphical database.");
1651 fpCommand -> SetGuidance
1652 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1653 "\nto see possible viewers. Viewer becomes current.");
1654 fpCommand -> SetParameterName (
"viewer-name",
1656 currentAsDefault =
true);
1666 return viewer -> GetName ();
1682 G4warn <<
"ERROR: Viewer \"" << rebuildName
1683 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1690 if (!sceneHandler) {
1692 G4warn <<
"ERROR: Viewer \"" << viewer->
GetName() <<
"\"" <<
1693 " has no scene handler - report serious bug."
1712 G4bool omitable, currentAsDefault;
1714 fpCommand -> SetGuidance
1715 (
"Refreshes viewer.");
1716 fpCommand -> SetGuidance
1717 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1718 "\nto see possible viewers. Viewer becomes current.");
1719 fpCommand -> SetParameterName (
"viewer-name",
1721 currentAsDefault =
true);
1730 return viewer ? viewer -> GetName () :
G4String(
"none");
1742 G4warn <<
"ERROR: Viewer \"" << refreshName <<
"\"" <<
1743 " not found - \"/vis/viewer/list\"\n to see possibilities."
1750 if (!sceneHandler) {
1752 G4warn <<
"ERROR: Viewer \"" << refreshName <<
"\"" <<
1753 " has no scene handler - report serious bug."
1762 G4cout <<
"NOTE: SceneHandler \"" << sceneHandler->
GetName()
1763 <<
"\", to which viewer \"" << refreshName <<
"\"" <<
1764 "\n is attached, has no scene - \"/vis/scene/create\" and"
1765 " \"/vis/sceneHandler/attach\""
1766 "\n (or use compound command \"/vis/drawVolume\")."
1772 G4bool successful = scene -> AddWorldIfEmpty (warn);
1776 "WARNING: Scene is empty. Perhaps no geometry exists."
1777 "\n Try /run/initialize."
1788 G4cout <<
"Refreshing viewer \"" << viewer -> GetName () <<
"\"..."
1791 viewer -> SetView ();
1792 viewer -> ClearView ();
1793 viewer -> DrawView ();
1795 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\"" <<
" refreshed."
1796 "\n (You might also need \"/vis/viewer/update\".)" <<
G4endl;
1804 G4bool omitable, currentAsDefault;
1806 fpCommand -> SetGuidance (
"Resets viewer.");
1807 fpCommand -> SetGuidance
1808 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1809 "\nto see possible viewers. Viewer becomes current.");
1810 fpCommand -> SetParameterName (
"viewer-name",
1812 currentAsDefault =
true);
1822 return viewer -> GetName ();
1837 G4warn <<
"ERROR: Viewer \"" << resetName
1838 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1851 G4bool omitable, currentAsDefault;
1853 fpCommand -> SetGuidance (
"Resets only the camera parameters.");
1854 fpCommand -> SetGuidance
1855 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1856 "\nto see possible viewers. Viewer becomes current.");
1857 fpCommand -> SetParameterName (
"viewer-name",
1859 currentAsDefault =
true);
1869 return viewer -> GetName ();
1884 G4warn <<
"ERROR: Viewer \"" << resetName
1885 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1902 fpCommand -> SetGuidance
1903 (
"Write commands that define the current view to file.");
1904 fpCommand -> SetGuidance
1905 (
"Read them back into the same or any viewer with \"/control/execute\".");
1906 fpCommand -> SetGuidance
1907 (
"If the filename is omitted the view is saved to a file "
1908 "\"g4_nn.g4view\", where nn is a sequential two-digit number.");
1909 fpCommand -> SetGuidance
1910 (
"If the filename is \"-\", the data are written to G4cout.");
1911 fpCommand -> SetGuidance
1912 (
"If you are wanting to save views for future interpolation a recommended "
1913 "procedure is: save views to \"g4_nn.g4view\", as above, then move the files "
1914 "into a sub-directory, say, \"views\", then interpolate with"
1915 "\"/vis/viewer/interpolate views\"");
1916 fpCommand -> SetParameterName (
"filename", omitable =
true);
1917 fpCommand -> SetDefaultValue (
"");
1950 if (!currentViewer) {
1953 "ERROR: G4VisCommandsViewerSave::SetNewValue: no current viewer."
1960 if (!currentScene) {
1963 "ERROR: G4VisCommandsViewerSave::SetNewValue: no current scene."
1972 const std::vector<G4ModelingParameters::VisAttributesModifier>*
1975 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator i;
1976 for (i = privateVAMs->begin(); i != privateVAMs->end(); ++i) {
1984 if (newValue.length() == 0) {
1986 const G4int maxNoOfFiles = 100;
1987 static G4int sequenceNumber = 0;
1988 if (sequenceNumber >= maxNoOfFiles) {
1991 <<
"ERROR: G4VisCommandsViewerSave::SetNewValue: Maximum number, "
1993 <<
", of files exceeded."
1998 std::ostringstream oss;
1999 oss << std::setw(2) << std::setfill(
'0') << sequenceNumber++;
2000 filename =
"g4_" + oss.str() +
".g4view";
2003 if (filename ==
"-") {
2005 WriteCommands(
G4cout,vp,stp);
2010 filename +=
".g4view";
2012 std::ofstream ofs(filename);
2016 "ERROR: G4VisCommandsViewerSave::SetNewValue: Trouble opening file \""
2017 << filename <<
"\"."
2023 WriteCommands(ofs,vp,stp);
2028 G4warn <<
"Viewer \"" << currentViewer -> GetName ()
2029 <<
"\"" <<
" saved to ";
2030 if (filename ==
"-") {
2033 G4warn <<
"file \'" << filename <<
"\"." <<
2034 "\n Read the view back into this or any viewer with"
2035 "\n \"/control/execute " << filename <<
"\" or use"
2036 "\n \"/vis/viewer/interpolate\" if you have several saved files -"
2037 "\n see \"help /vis/viewer/interpolate\" for guidance.";
2049 G4bool omitable, currentAsDefault;
2052 (
"/vis/viewer/scale",
this);
2053 fpCommandScale -> SetGuidance (
"Incremental (non-uniform) scaling.");
2054 fpCommandScale -> SetGuidance
2055 (
"Multiplies components of current scaling by components of this factor."
2056 "\n Scales (x,y,z) by corresponding components of the resulting factor.");
2057 fpCommandScale -> SetGuidance
2059 fpCommandScale -> SetParameterName
2060 (
"x-scale-multiplier",
"y-scale-multiplier",
"z-scale-multiplier",
2061 omitable=
true, currentAsDefault=
true);
2064 (
"/vis/viewer/scaleTo",
this);
2065 fpCommandScaleTo -> SetGuidance (
"Absolute (non-uniform) scaling.");
2066 fpCommandScaleTo -> SetGuidance
2067 (
"Scales (x,y,z) by corresponding components of this factor.");
2068 fpCommandScaleTo -> SetParameterName
2069 (
"x-scale-factor",
"y-scale-factor",
"z-scale-factor",
2070 omitable=
true, currentAsDefault=
true);
2074 delete fpCommandScale;
2075 delete fpCommandScaleTo;
2080 if (command == fpCommandScale) {
2083 else if (command == fpCommandScaleTo) {
2086 return currentValue;
2096 if (!currentViewer) {
2099 "ERROR: G4VisCommandsViewerScale::SetNewValue: no current viewer."
2107 if (command == fpCommandScale) {
2111 else if (command == fpCommandScaleTo) {
2128 fpCommand -> SetGuidance (
"Selects viewer.");
2129 fpCommand -> SetGuidance
2130 (
"Specify viewer by name. \"/vis/viewer/list\" to see possible viewers.");
2131 fpCommand -> SetParameterName (
"viewer-name", omitable =
false);
2151 G4warn <<
"ERROR: Viewer \"" << selectName <<
"\"";
2152 G4warn <<
" not found - \"/vis/viewer/list\""
2153 "\n to see possibilities."
2161 G4warn <<
"WARNING: Viewer \"" << viewer -> GetName () <<
"\""
2162 <<
" already selected." <<
G4endl;
2176 G4bool omitable, currentAsDefault;
2178 fpCommand -> SetGuidance
2179 (
"Triggers graphical database post-processing for viewers"
2180 "\nusing that technique.");
2181 fpCommand -> SetGuidance
2182 (
"For such viewers the view only becomes visible with this command."
2183 "\nBy default, acts on current viewer. \"/vis/viewer/list\""
2184 "\nto see possible viewers. Viewer becomes current.");
2185 fpCommand -> SetParameterName (
"viewer-name",
2187 currentAsDefault =
true);
2197 return viewer -> GetName ();
2214 "WARNING: command \"/vis/viewer/update\" could not be applied: no current viewer."
2221 if (!sceneHandler) {
2223 G4warn <<
"ERROR: Viewer \"" << updateName <<
"\"" <<
2224 " has no scene handler - report serious bug."
2233 G4cout <<
"NOTE: SceneHandler \"" << sceneHandler->
GetName()
2234 <<
"\", to which viewer \"" << updateName <<
"\"" <<
2235 "\n is attached, has no scene - \"/vis/scene/create\" and"
2236 " \"/vis/sceneHandler/attach\""
2237 "\n (or use compound command \"/vis/drawVolume\")."
2244 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\"";
2247 viewer -> ShowView ();
2249 sceneHandler -> SetMarkForClearingTransientStore(
true);
2255 fZoomMultiplier (1.),
2258 G4bool omitable, currentAsDefault;
2261 (
"/vis/viewer/zoom",
this);
2262 fpCommandZoom -> SetGuidance (
"Incremental zoom.");
2263 fpCommandZoom -> SetGuidance
2264 (
"Multiplies current magnification by this factor.");
2265 fpCommandZoom -> SetParameterName(
"multiplier",
2267 currentAsDefault=
true);
2270 (
"/vis/viewer/zoomTo",
this);
2271 fpCommandZoomTo -> SetGuidance (
"Absolute zoom.");
2272 fpCommandZoomTo -> SetGuidance
2273 (
"Magnifies standard magnification by this factor.");
2274 fpCommandZoomTo -> SetParameterName(
"factor",
2276 currentAsDefault=
true);
2280 delete fpCommandZoom;
2281 delete fpCommandZoomTo;
2286 if (command == fpCommandZoom) {
2289 else if (command == fpCommandZoomTo) {
2292 return currentValue;
2302 if (!currentViewer) {
2305 "ERROR: G4VisCommandsViewerZoom::SetNewValue: no current viewer."
2313 if (command == fpCommandZoom) {
2317 else if (command == fpCommandZoomTo) {
std::ostringstream G4ExceptionDescription
HepGeom::Normal3D< G4double > G4Normal3D
HepGeom::Plane3D< G4double > G4Plane3D
HepGeom::Point3D< G4double > G4Point3D
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4Plane3D > G4Planes
G4GLOB_DLL std::ostream G4cout
void DescribeYourselfTo(G4VGraphicsScene &)
const std::vector< Findings > & GetFindings() const
G4bool AddRunDurationModel(G4VModel *, G4bool warn=false)
const std::vector< Model > & GetRunDurationModelList() const
const G4VisExtent & GetExtent() const
const G4Point3D & GetStandardTargetPoint() const
const G4String & GetName() const
static G4TransportationManager * GetTransportationManager()
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
std::size_t GetNoWorlds() const
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4double ValueOf(const char *unitName)
static G4String ConvertToString(G4bool boolVal)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
static G4double ConvertToDimensionedDouble(const char *st)
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 & GetNickname() const
void SetModelingParameters(const G4ModelingParameters *)
virtual void ClearTransientStore()
void SetMarkForClearingTransientStore(G4bool)
G4VGraphicsSystem * GetGraphicsSystem() const
G4Scene * GetScene() const
const G4String & GetName() const
const G4String & GetName() const
virtual void DrawView()=0
const G4ViewParameters & GetViewParameters() const
G4double GetKernelVisitElapsedTimeSeconds() const
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers() const
const G4ViewParameters & GetDefaultViewParameters() const
virtual void FinishView()
void SetViewParameters(const G4ViewParameters &vp)
virtual void ClearView()=0
G4VSceneHandler * GetSceneHandler() const
static G4ViewParameters fExistingVP
void CopyCameraParameters(G4ViewParameters &target, const G4ViewParameters &from)
void CheckSceneAndNotifyHandlers(G4Scene *=nullptr)
static G4VisManager * fpVisManager
void InterpolateToNewView(G4VViewer *currentViewer, const G4ViewParameters &oldVP, const G4ViewParameters &newVP, const G4int nInterpolationPoints=50, const G4int waitTimePerPointmilliseconds=20, const G4String exportString="")
static G4bool ConvertToDoublePair(const G4String ¶mString, G4double &xval, G4double &yval)
void RefreshIfRequired(G4VViewer *viewer)
void SetViewParameters(G4VViewer *viewer, const G4ViewParameters &viewParams)
void CopyParametersFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd)
G4bool ProvideValueOfUnit(const G4String &where, const G4String &unit, const G4String &category, G4double &value)
static G4bool fThereWasAViewer
void Twinkle(G4VViewer *currentViewer, const G4ViewParameters &baseVP, const std::vector< std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > > &paths)
static G4String ConvertToString(G4double x, G4double y, const char *unitName)
void CopyGuidanceFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd, G4int startLine=0)
void InterpolateViews(G4VViewer *currentViewer, std::vector< G4ViewParameters > viewVector, const G4int nInterpolationPoints=50, const G4int waitTimePerPointmilliseconds=20, const G4String exportString="")
void SetCBDParameters(const std::vector< G4double > &)
void SetScaleFactor(const G4Vector3D &scaleFactor)
const G4Vector3D & GetScaleFactor() const
void SetAutoRefresh(G4bool)
void SetBackgroundColour(const G4Colour &)
const G4String & GetXGeometryString() const
G4String CameraAndLightingCommands(const G4Point3D standardTargetPoint) const
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
void SetCurrentTargetPoint(const G4Point3D ¤tTargetPoint)
const G4Colour & GetBackgroundColour() const
void SetXGeometryString(const G4String &)
void ClearCutawayPlanes()
const G4Point3D & GetCurrentTargetPoint() const
void SetCBDAlgorithmNumber(G4int)
void MultiplyScaleFactor(const G4Vector3D &scaleFactorMultiplier)
G4double GetZoomFactor() const
void SetDolly(G4double dolly)
G4String SceneModifyingCommands() const
void IncrementPan(G4double right, G4double up)
G4String TimeWindowCommands() const
G4String TouchableCommands() const
const std::vector< G4double > & GetCBDParameters() const
G4int GetCBDAlgorithmNumber() const
void ChangeCutawayPlane(size_t index, const G4Plane3D &cutawayPlane)
void SetZoomFactor(G4double zoomFactor)
void SetPan(G4double right, G4double up)
const G4Planes & GetCutawayPlanes() const
void MultiplyZoomFactor(G4double zoomFactorMultiplier)
G4String DrawingStyleCommands() const
G4bool IsAutoRefresh() const
void IncrementDolly(G4double dollyIncrement)
void ClearVisAttributesModifiers()
void AddCutawayPlane(const G4Plane3D &cutawayPlane)
G4double GetDolly() const
G4VisCommandViewerAddCutawayPlane()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerAddCutawayPlane()
G4VisCommandViewerCentreOn()
virtual ~G4VisCommandViewerCentreOn()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandViewerChangeCutawayPlane()
virtual ~G4VisCommandViewerChangeCutawayPlane()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandViewerClearCutawayPlanes()
virtual ~G4VisCommandViewerClearCutawayPlanes()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandViewerClearTransients()
virtual ~G4VisCommandViewerClearTransients()
G4VisCommandViewerClearVisAttributesModifiers()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandViewerClearVisAttributesModifiers()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandViewerClear()
virtual ~G4VisCommandViewerClear()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandViewerClone()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerClone()
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandViewerColourByDensity()
G4VisCommandViewerColourByDensity()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerCopyViewFrom()
G4VisCommandViewerCopyViewFrom()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandViewerCreate()
virtual ~G4VisCommandViewerCreate()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandViewerDolly()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerDolly()
virtual ~G4VisCommandViewerFlush()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandViewerFlush()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandViewerInterpolate()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandViewerInterpolate()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerList()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerPan()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandViewerRebuild()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerRebuild()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandViewerRefresh()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandViewerRefresh()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerResetCameraParameters()
G4VisCommandViewerResetCameraParameters()
G4VisCommandViewerReset()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandViewerReset()
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandViewerSave()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandViewerScale()
G4VisCommandViewerScale()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerSelect()
G4VisCommandViewerSelect()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandViewerUpdate()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerUpdate()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandViewerZoom()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4double GetExtentRadius() const
const G4Point3D & GetExtentCentre() const
G4VViewer * GetCurrentViewer() const
static Verbosity GetVerbosity()
void ResetTransientsDrawnFlags()
void SetVerboseLevel(G4int)
static Verbosity GetVerbosityValue(const G4String &)
void strip(G4String &str, char ch=' ')
Remove leading and trailing characters from string.
G4bool contains(const G4String &str, std::string_view ss)
Check if a string contains a given substring.