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.");
70 fpCommand->SetParameter(parameter);
72 parameter -> SetDefaultValue (0);
73 parameter -> SetGuidance (
"Coordinate of point on the plane.");
74 fpCommand->SetParameter(parameter);
76 parameter -> SetDefaultValue (0);
77 parameter -> SetGuidance (
"Coordinate of point on the plane.");
78 fpCommand->SetParameter(parameter);
80 parameter -> SetDefaultValue (
"m");
81 parameter -> SetGuidance (
"Unit of point on the plane.");
82 fpCommand->SetParameter(parameter);
84 parameter -> SetDefaultValue (1);
85 parameter -> SetGuidance (
"Component of plane normal.");
86 fpCommand->SetParameter(parameter);
88 parameter -> SetDefaultValue (0);
89 parameter -> SetGuidance (
"Component of plane normal.");
90 fpCommand->SetParameter(parameter);
92 parameter -> SetDefaultValue (0);
93 parameter -> SetGuidance (
"Component of plane normal.");
94 fpCommand->SetParameter(parameter);
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);
145 fpCommandCentreAndZoomInOn->SetGuidance
146 (
"Centre and zoom in on the given physical volume.");
147 fpCommandCentreAndZoomInOn->SetGuidance
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\".");
154 fpCommandCentreAndZoomInOn->SetGuidance
155 (
"It may help to see a textual representation of the geometry hierarchy of"
156 "\nthe worlds. Try \"/vis/drawTree [worlds]\"");
157 fpCommandCentreAndZoomInOn->SetGuidance
158 (
"If there are more than one matching physical volumes they will all be"
159 "\nincluded. If this is not what you want, and what you want is to centre on a"
160 "\nparticular touchable, then select the touchable (\"/vis/set/touchable\") and"
161 "\nuse \"/vis/touchable/centreOn\". (You may need \"/vis/touchable/findPath\".)");
163 parameter =
new G4UIparameter(
"pv-name",
's',omitable =
false);
165 fpCommandCentreAndZoomInOn->SetParameter(parameter);
166 parameter =
new G4UIparameter(
"copy-no",
'i',omitable =
true);
168 parameter->
SetGuidance (
"Copy number. -1 means any or all copy numbers");
169 fpCommandCentreAndZoomInOn->SetParameter(parameter);
171 fpCommandCentreOn =
new G4UIcommand (
"/vis/viewer/centreOn",
this);
172 fpCommandCentreOn->SetGuidance (
"Centre the view on the given physical volume.");
180 delete fpCommandCentreAndZoomInOn;
181 delete fpCommandCentreOn;
194 if (!currentViewer) {
197 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
205 std::istringstream is (newValue);
206 is >> pvName >> copyNo;
211 std::size_t nWorlds = transportationManager->
GetNoWorlds();
212 std::vector<G4PhysicalVolumesSearchScene::Findings> findingsVector;
213 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
215 for (std::size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
222 for (
const auto& findings: searchScene.
GetFindings()) {
223 findingsVector.push_back(findings);
227 if (findingsVector.empty()) {
230 <<
"WARNING: Volume \"" << pvName <<
"\" ";
232 G4warn <<
"copy number " << copyNo;
240 std::vector<std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>> foundPaths;
243 G4Scene tempScene(
"Centre Scene");
244 G4bool successfullyAdded =
true;
245 for (
const auto& findings: findingsVector) {
247 findings.fpFoundPV->SetCopyNo(findings.fFoundPVCopyNo);
254 findings.fFoundObjectTransformation,
257 findings.fFoundBasePVPath);
261 successfullyAdded =
false;
265 G4cout <<
"\"" << findings.fpFoundPV->GetName()
266 <<
"\", copy no. " << findings.fFoundPVCopyNo
267 <<
",\n found in searched volume \""
268 << findings.fpSearchPV->GetName()
269 <<
"\" at depth " << findings.fFoundDepth
270 <<
",\n base path: \"" << findings.fFoundBasePVPath
271 <<
",\n has been added to temporary scene \"" << tempScene.
GetName() <<
"\"."
274 foundPaths.push_back(findings.fFoundFullPVPath);
278 delete sceneModel.fpModel;
280 if (!successfullyAdded)
return;
289 if (command == fpCommandCentreAndZoomInOn) {
306 Twinkle(currentViewer,newVP,foundPaths);
312 <<
"Viewer \"" << currentViewer->
GetName()
314 if (fpCommandCentreAndZoomInOn) {
315 G4cout <<
"and zoomed in";
317 G4cout <<
" on physical volume(s) \"" << pvName <<
'\"'
328 fpCommand =
new G4UIcommand (
"/vis/viewer/changeCutawayPlane",
this);
329 fpCommand -> SetGuidance(
"Change cutaway plane.");
332 parameter -> SetGuidance (
"Index of plane: 0, 1, 2.");
333 fpCommand->SetParameter(parameter);
335 parameter -> SetDefaultValue (0);
336 parameter -> SetGuidance (
"Coordinate of point on the plane.");
337 fpCommand->SetParameter(parameter);
339 parameter -> SetDefaultValue (0);
340 parameter -> SetGuidance (
"Coordinate of point on the plane.");
341 fpCommand->SetParameter(parameter);
343 parameter -> SetDefaultValue (0);
344 parameter -> SetGuidance (
"Coordinate of point on the plane.");
345 fpCommand->SetParameter(parameter);
347 parameter -> SetDefaultValue (
"m");
348 parameter -> SetGuidance (
"Unit of point on the plane.");
349 fpCommand->SetParameter(parameter);
351 parameter -> SetDefaultValue (1);
352 parameter -> SetGuidance (
"Component of plane normal.");
353 fpCommand->SetParameter(parameter);
355 parameter -> SetDefaultValue (0);
356 parameter -> SetGuidance (
"Component of plane normal.");
357 fpCommand->SetParameter(parameter);
359 parameter -> SetDefaultValue (0);
360 parameter -> SetGuidance (
"Component of plane normal.");
361 fpCommand->SetParameter(parameter);
380 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
389 std::istringstream is (newValue);
390 is >> index >> x >> y >> z >> unit >> nx >> ny >> nz;
392 x *= F; y *= F; z *= F;
399 G4cout <<
"Cutaway planes for viewer \"" << viewer->
GetName() <<
"\" now:";
401 for (std::size_t i = 0; i < cutaways.size(); ++i)
402 G4cout <<
"\n " << i <<
": " << cutaways[i];
412 G4bool omitable, currentAsDefault;
414 fpCommand -> SetGuidance (
"Clears viewer.");
415 fpCommand -> SetGuidance
416 (
"By default, clears current viewer. Specified viewer becomes current."
417 "\n\"/vis/viewer/list\" to see possible viewer names.");
418 fpCommand -> SetParameterName (
"viewer-name",
420 currentAsDefault =
true);
429 return viewer ? viewer -> GetName () :
G4String(
"none");
440 G4warn <<
"ERROR: Viewer \"" << clearName
441 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
451 G4cout <<
"Viewer \"" << clearName <<
"\" cleared." <<
G4endl;
460 (
"/vis/viewer/clearCutawayPlanes",
this);
461 fpCommand -> SetGuidance (
"Clear cutaway planes of current viewer.");
480 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
489 G4cout <<
"Cutaway planes for viewer \"" << viewer->
GetName()
490 <<
"\" now cleared." <<
G4endl;
499 G4bool omitable, currentAsDefault;
501 fpCommand -> SetGuidance (
"Clears transients from viewer.");
502 fpCommand -> SetGuidance
503 (
"By default, operates on current viewer. Specified viewer becomes current."
504 "\n\"/vis/viewer/list\" to see possible viewer names.");
505 fpCommand -> SetParameterName (
"viewer-name",
507 currentAsDefault =
true);
516 return viewer ? viewer -> GetName () :
G4String(
"none");
527 G4warn <<
"ERROR: Viewer \"" << clearName
528 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
539 G4cout <<
"Viewer \"" << clearName <<
"\" cleared of transients."
549 (
"/vis/viewer/clearVisAttributesModifiers",
this);
550 fpCommand -> SetGuidance (
"Clear vis attribute modifiers of current viewer.");
551 fpCommand -> SetGuidance (
"(These are used for touchables, etc.)");
570 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
579 G4cout <<
"Vis attributes modifiers for viewer \"" << viewer->
GetName()
580 <<
"\" now cleared." <<
G4endl;
590 fpCommand =
new G4UIcommand (
"/vis/viewer/clone",
this);
591 fpCommand -> SetGuidance (
"Clones viewer.");
592 fpCommand -> SetGuidance
593 (
"By default, clones current viewer. Clone becomes current."
594 "\nClone name, if not provided, is derived from the original name."
595 "\n\"/vis/viewer/list\" to see possible viewer names.");
597 parameter =
new G4UIparameter (
"original-viewer-name",
's', omitable =
true);
598 parameter -> SetCurrentAsDefault (
true);
599 fpCommand -> SetParameter (parameter);
600 parameter =
new G4UIparameter (
"clone-name",
's', omitable =
true);
601 parameter -> SetDefaultValue (
"none");
602 fpCommand -> SetParameter (parameter);
612 return "\"" + originalName +
"\"";
620 std::istringstream is (newValue);
625 while (is.get(c) && c ==
' '){}
627 while (is.get(c) && c !=
'"') {originalName += c;}
631 while (is.get(c) && c !=
' ') {originalName += c;}
637 if (!originalViewer) {
639 G4warn <<
"ERROR: Viewer \"" << originalName
640 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
645 originalName = originalViewer->
GetName();
647 while (is.get(c) && c ==
' '){}
649 while (is.get(c) && c !=
'"') {cloneName += c;}
653 while (is.get(c) && c !=
' ') {cloneName += c;}
658 G4bool errorWhileNaming =
false;
659 if (cloneName ==
"none") {
662 cloneName = originalName;
663 std::ostringstream oss;
664 oss <<
'-' << subID++;
665 G4String::size_type lastDashPosition, nextSpacePosition;
666 if ((lastDashPosition = cloneName.rfind(
'-')) != G4String::npos &&
667 (nextSpacePosition = cloneName.find(
" ", lastDashPosition)) !=
669 cloneName.insert(nextSpacePosition, oss.str());
671 G4String::size_type spacePosition = cloneName.find(
' ');
672 if (spacePosition != G4String::npos)
673 cloneName.insert(spacePosition, oss.str());
675 errorWhileNaming =
true;
677 }
while (!errorWhileNaming &&
fpVisManager -> GetViewer (cloneName));
680 if (errorWhileNaming) {
682 G4warn <<
"ERROR: While naming clone viewer \"" << cloneName
691 G4warn <<
"ERROR: Putative clone viewer \"" << cloneName
692 <<
"\" already exists."
704 (
G4String(
"/vis/viewer/create ! \"" + cloneName +
"\" " + windowSizeHint));
708 G4cout <<
"Viewer \"" << originalName <<
"\" cloned." <<
G4endl;
709 G4cout <<
"Clone \"" << cloneName <<
"\" now current." <<
G4endl;
717 fpCommand =
new G4UIcommand (
"/vis/viewer/colourByDensity",
this);
718 fpCommand -> SetGuidance
719 (
"If a volume has no vis attributes, colour it by density.");
720 fpCommand -> SetGuidance
721 (
"Provide algorithm number, e.g., \"1\" (or \"0\" to switch off)."
722 "\nThen a unit of density, e.g., \"g/cm3\"."
723 "\nThen parameters for the algorithm assumed to be densities in that unit.");
724 fpCommand -> SetGuidance
725 (
"Algorithm 1: Simple algorithm takes 3 parameters: d0, d1 and d2."
726 "\n Volumes with density < d0 are invisible."
727 "\n Volumes with d0 <= density < d1 have colour on range red->green."
728 "\n Volumes with d1 <= density < d2 have colour on range green->blue."
729 "\n Volumes with density > d2 are blue.");
732 parameter -> SetGuidance (
"Algorithm number (or \"0\" to switch off).");
733 parameter -> SetDefaultValue (1);
734 fpCommand->SetParameter(parameter);
736 parameter -> SetGuidance (
"Unit of following densities, e.g., \"g/cm3\".");
737 parameter -> SetDefaultValue (
"g/cm3");
738 fpCommand->SetParameter(parameter);
740 parameter -> SetGuidance (
"Density parameter 0");
741 parameter -> SetDefaultValue (0.5);
742 fpCommand->SetParameter(parameter);
744 parameter -> SetGuidance (
"Density parameter 1");
745 parameter -> SetDefaultValue (3.0);
746 fpCommand->SetParameter(parameter);
748 parameter -> SetGuidance (
"Density parameter 2.");
749 parameter -> SetDefaultValue (10.0);
750 fpCommand->SetParameter(parameter);
769 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
776 G4int algorithmNumber;
779 std::istringstream is (newValue);
780 is >> algorithmNumber >> unit >> d0 >> d1 >> d2;
782 if (algorithmNumber < 0 || algorithmNumber > 1) {
785 "ERROR: Unrecognised algorithm number: " << algorithmNumber
791 std::vector<G4double> parameters;
792 if (algorithmNumber > 0) {
793 const G4String where =
"G4VisCommandViewerColourByDensity::SetNewValue";
798 d0 *= valueOfUnit; d1 *= valueOfUnit; d2 *= valueOfUnit;
802 "ERROR: Unrecognised or inappropriate unit: " << unit
807 parameters.push_back(d0);
808 parameters.push_back(d1);
809 parameters.push_back(d2);
819 <<
" selected for viewer \"" << viewer->
GetName()
836 fpCommand -> SetGuidance
837 (
"Copy the camera-specific parameters from the specified viewer.");
838 fpCommand -> SetGuidance
839 (
"Note: To copy ALL view parameters, including scene modifications,"
840 "\nuse \"/vis/viewer/set/all\"");
841 fpCommand -> SetParameterName (
"from-viewer-name", omitable =
false);
857 if (!currentViewer) {
860 "ERROR: G4VisCommandsViewerCopyViewFrom::SetNewValue: no current viewer."
866 const G4String& fromViewerName = newValue;
870 G4warn <<
"ERROR: Viewer \"" << fromViewerName
871 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
877 if (fromViewer == currentViewer) {
880 "WARNING: G4VisCommandsViewerSet::SetNewValue:"
881 "\n from-viewer and current viewer are identical."
893 G4cout <<
"Camera parameters of viewer \"" << currentViewer->
GetName()
894 <<
"\"\n set to those of viewer \"" << fromViewer->
GetName()
904 fpCommand =
new G4UIcommand (
"/vis/viewer/create",
this);
905 fpCommand -> SetGuidance
906 (
"Creates a viewer. If the scene handler name is specified, then a"
907 "\nviewer of that scene handler is created. Otherwise, a viewer"
908 "\nof the current scene handler is created.");
909 fpCommand -> SetGuidance
910 (
"If the viewer name is not specified a name is generated from the name"
911 "\nof the scene handler and a serial number.");
912 fpCommand -> SetGuidance(
"The scene handler and viewer become current.");
913 fpCommand -> SetGuidance
914 (
"(Note: the system adds the graphics system name to the viewer name"
915 "\nfor identification, but for selecting, copying, etc., only characters"
916 "\nup to the first blank are used. For example, if the viewer name is"
917 "\n\"viewer-0 (G4OpenGLStoredQt)\", it may be referenced by \"viewer-0\","
918 "\nfor example in \"/vis/viewer/select viewer-0\".)");
919 fpCommand -> SetGuidance
920 (
"Window size and placement hints, e.g. 600x600-100+100 (in pixels):");
921 fpCommand -> SetGuidance
922 (
"- single number, e.g., \"600\": square window;");
923 fpCommand -> SetGuidance
924 (
"- two numbers, e.g., \"800x600\": rectangluar window;");
925 fpCommand -> SetGuidance
926 (
"- two numbers plus placement hint, e.g., \"600x600-100+100\" places window of size"
927 "\n 600x600 100 pixels left and 100 pixels down from top right corner.");
928 fpCommand -> SetGuidance
929 (
"- If not specified, the default is \"600\", i.e., 600 pixels square, placed"
930 "\n at the window manager's discretion...or picked up from the previous viewer.");
931 fpCommand -> SetGuidance
932 (
"- This is an X-Windows-type geometry string, see:"
933 "\n https://en.wikibooks.org/wiki/Guide_to_X11/Starting_Programs,"
934 "\n \"Specifying window geometry\".");
936 parameter =
new G4UIparameter (
"scene-handler",
's', omitable =
true);
937 parameter -> SetCurrentAsDefault (
true);
938 fpCommand -> SetParameter (parameter);
939 parameter =
new G4UIparameter (
"viewer-name",
's', omitable =
true);
940 parameter -> SetCurrentAsDefault (
true);
941 fpCommand -> SetParameter (parameter);
942 parameter =
new G4UIparameter (
"window-size-hint",
's', omitable =
true);
943 parameter -> SetCurrentAsDefault (
true);
944 fpCommand -> SetParameter (parameter);
951G4String G4VisCommandViewerCreate::NextName () {
952 std::ostringstream oss;
954 oss <<
"viewer-" << fId <<
" (";
956 oss << sceneHandler -> GetGraphicsSystem () -> GetName ();
959 oss <<
"no_scene_handlers";
968 auto currentSceneHandler =
fpVisManager->GetCurrentSceneHandler();
969 if (currentSceneHandler) {
970 sceneHandlerName = currentSceneHandler->GetName();
973 sceneHandlerName =
"none";
977 const auto& viewerName = NextName();
983 windowSizeHint = currentViewer->GetViewParameters().GetXGeometryString();
986 windowSizeHint =
fpVisManager->GetDefaultXGeometryString();
990 return sceneHandlerName +
" \"" + viewerName +
"\" " + windowSizeHint;
999 std::istringstream is (newValue);
1000 is >> sceneHandlerName;
1005 while (is.get(c) && c ==
' '){}
1007 while (is.get(c) && c !=
'"') {newName += c;}
1011 while (is.get(c) && c !=
' ') {newName += c;}
1017 is >> windowSizeHintString;
1021 std::size_t nHandlers = sceneHandlerList.size ();
1022 if (nHandlers == 0) {
1025 "ERROR: G4VisCommandViewerCreate::SetNewValue: no scene handlers."
1026 "\n Create a scene handler with \"/vis/sceneHandler/create\"";
1031 std::size_t iHandler;
1032 for (iHandler = 0; iHandler < nHandlers; ++iHandler) {
1033 if (sceneHandlerList [iHandler] -> GetName () == sceneHandlerName)
break;
1036 if (iHandler >= nHandlers) {
1041 "G4VisCommandViewerCreate::SetNewValue: invalid scene handler specified.";
1049 if (sceneHandler !=
fpVisManager -> GetCurrentSceneHandler ()) {
1055 if (newName ==
"") {
1058 if (newName == nextName) fId++;
1061 for (std::size_t ih = 0; ih < nHandlers; ++ih) {
1063 const G4ViewerList& viewerList = sh -> GetViewerList ();
1064 for (
const auto* iViewer : viewerList) {
1065 if (iViewer -> GetShortName () == newShortName ) {
1068 "ERROR: Viewer \"" << newShortName <<
"\" already exists.";
1077 windowSizeHintString =
fExistingVP.GetXGeometryString();
1080 fpVisManager -> CreateViewer (newName,windowSizeHintString);
1085 if (newViewer && newViewer -> GetName () == newName) {
1099 G4cout <<
"New viewer \"" << newName <<
"\" created." <<
G4endl;
1109 ed <<
"ERROR: New viewer doesn\'t match!!! Curious!!";
1111 ed <<
"WARNING: No viewer created.";
1123 G4warn <<
"Issue /vis/viewer/refresh or flush to see effect."
1133 fDollyIncrement (0.),
1136 G4bool omitable, currentAsDefault;
1139 (
"/vis/viewer/dolly",
this);
1140 fpCommandDolly -> SetGuidance
1141 (
"Incremental dolly.");
1142 fpCommandDolly -> SetGuidance
1143 (
"Moves the camera incrementally towards target point.");
1144 fpCommandDolly -> SetParameterName(
"increment",
1146 currentAsDefault=
true);
1147 fpCommandDolly -> SetDefaultUnit(
"m");
1150 (
"/vis/viewer/dollyTo",
this);
1151 fpCommandDollyTo -> SetGuidance
1152 (
"Dolly to specific coordinate.");
1153 fpCommandDollyTo -> SetGuidance
1154 (
"Places the camera towards target point relative to standard camera point.");
1155 fpCommandDollyTo -> SetParameterName(
"distance",
1157 currentAsDefault=
true);
1158 fpCommandDollyTo -> SetDefaultUnit(
"m");
1162 delete fpCommandDolly;
1163 delete fpCommandDollyTo;
1168 if (command == fpCommandDolly) {
1169 currentValue = fpCommandDolly->ConvertToString(fDollyIncrement,
"m");
1171 else if (command == fpCommandDollyTo) {
1172 currentValue = fpCommandDollyTo->ConvertToString(fDollyTo,
"m");
1174 return currentValue;
1184 if (!currentViewer) {
1187 "ERROR: G4VisCommandsViewerDolly::SetNewValue: no current viewer."
1195 if (command == fpCommandDolly) {
1196 fDollyIncrement = fpCommandDolly->GetNewDoubleValue(newValue);
1199 else if (command == fpCommandDollyTo) {
1200 fDollyTo = fpCommandDolly->GetNewDoubleValue(newValue);
1214 G4bool omitable, currentAsDefault;
1216 fpCommand -> SetGuidance
1217 (
"Compound command: \"/vis/viewer/refresh\" + \"/vis/viewer/update\".");
1218 fpCommand -> SetGuidance
1219 (
"Useful for refreshing and initiating post-processing for graphics"
1220 "\nsystems which need post-processing. By default, acts on current"
1221 "\nviewer. \"/vis/viewer/list\" to see possible viewers. Viewer"
1222 "\nbecomes current.");
1223 fpCommand -> SetParameterName (
"viewer-name",
1225 currentAsDefault =
true);
1235 return viewer ? viewer -> GetName () :
G4String(
"none");
1246 G4warn <<
"ERROR: Viewer \"" << flushName <<
"\"" <<
1247 " not found - \"/vis/viewer/list\"\n to see possibilities."
1257 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\""
1258 <<
" flushed." <<
G4endl;
1266 fpCommand =
new G4UIcommand (
"/vis/viewer/interpolate",
this);
1267 fpCommand -> SetGuidance
1268 (
"Interpolate views defined by the first argument, which can contain "
1269 "Unix-shell-style pattern matching characters such as '*', '?' and '[' "
1270 "- see \"man sh\" and look for \"Pattern Matching\". The contents "
1271 "of each file are assumed to be \"/vis/viewer\" commands "
1272 "that specify a particular view. The files are processed in alphanumeric "
1273 "order of filename. The files may be written by hand or produced by the "
1274 "\"/vis/viewer/save\" command.");
1275 fpCommand -> SetGuidance
1276 (
"The default is to search the working directory for files with a .g4view "
1277 "extension. Another procedure is to assemble view files in a subdirectory, "
1278 "e.g., \"myviews\"; then they can be interpolated with\n"
1279 "\"/vis/viewer/interpolate myviews\".");
1280 fpCommand -> SetGuidance
1281 (
"To export interpolated views to file for a future possible movie, "
1282 "write \"export\" as 5th parameter (OpenGL only).");
1284 parameter =
new G4UIparameter(
"pattern",
's', omitable =
true);
1285 parameter -> SetGuidance(
"Pattern that defines the view files.");
1286 parameter -> SetDefaultValue(
"*.g4view");
1287 fpCommand -> SetParameter(parameter);
1288 parameter =
new G4UIparameter(
"no-of-points",
'i', omitable =
true);
1289 parameter -> SetGuidance (
"Number of interpolation points per interval.");
1290 parameter -> SetDefaultValue(50);
1291 fpCommand -> SetParameter(parameter);
1292 parameter =
new G4UIparameter(
"wait-time",
's', omitable =
true);
1293 parameter -> SetGuidance(
"Minimum time per interpolated point (steady frame rate)");
1294 parameter -> SetDefaultValue(
"20.");
1295 fpCommand -> SetParameter(parameter);
1296 parameter =
new G4UIparameter(
"time-unit",
's', omitable =
true);
1297 parameter -> SetDefaultValue(
"millisecond");
1298 fpCommand -> SetParameter (parameter);
1299 parameter =
new G4UIparameter(
"export",
's', omitable =
true);
1300 parameter -> SetDefaultValue(
"no");
1301 fpCommand -> SetParameter (parameter);
1317 if (!currentViewer) {
1320 "ERROR: G4VisCommandViewerInterpolate::SetNewValue: no current viewer."
1327 G4int nInterpolationPoints;
1332 std::istringstream iss (newValue);
1335 >> nInterpolationPoints
1336 >> waitTimePerPointString
1339 G4String waitTimePerPointDimString(waitTimePerPointString +
' ' + timeUnit);
1342 G4int waitTimePerPointmilliseconds = waitTimePerPoint/millisecond;
1343 if (waitTimePerPointmilliseconds < 0) waitTimePerPointmilliseconds = 0;
1364 const G4int safety = 99;
1365 G4int safetyCount = 0;
1366 G4fs::path pathPattern = pattern.c_str();
1370 (pathPattern.parent_path().string().length() ?
1371 pathPattern.parent_path().string() :
1373 G4fs::path parentPath = parentPathString.c_str();
1376 std::set<G4fs::path> paths;
1378 if (G4fs::is_directory(pathPattern)) {
1381 for (
const auto& path: G4fs::directory_iterator(pathPattern)) {
1382 if (safetyCount++ >= safety)
break;
1392 for (
G4int i = 0; i < (
G4int)pattern.length(); ++i) {
1393 if (pattern[i] ==
'.') {
1394 regexp_pattern +=
"\\.";
1395 }
else if (pattern[i] ==
'*') {
1396 regexp_pattern +=
".*";
1397 }
else if (pattern[i] ==
'?') {
1398 regexp_pattern +=
"(.{1,1})";
1400 regexp_pattern += pattern[i];
1403 std::regex regexp(regexp_pattern, std::regex_constants::basic | std::regex_constants::icase);
1405 for (
const auto& path: G4fs::directory_iterator(parentPath)) {
1406 const auto& pathname = path.path().relative_path().string();
1407 if (std::regex_match(pathname, regexp)) {
1408 if (safetyCount++ >= safety)
break;
1414 if (safetyCount > safety) {
1417 "/vis/viewer/interpolate:"
1418 "\n the number of way points has been limited to the maximum currently allowed: "
1424 std::vector<G4ViewParameters> viewVector;
1425 for (
const auto& path: paths) {
1426 uiManager->
ApplyCommand(
"/control/execute " + path.relative_path().string());
1430 viewVector.push_back(vp);
1434 (currentViewer,viewVector,
1435 nInterpolationPoints,waitTimePerPointmilliseconds,exportString);
1445 G4cout <<
"Viewer \"" << currentViewer -> GetName () <<
"\""
1446 <<
" restored." <<
G4endl;
1454 fpCommand =
new G4UIcommand (
"/vis/viewer/list",
this);
1455 fpCommand -> SetGuidance (
"Lists viewers(s).");
1456 fpCommand -> SetGuidance
1457 (
"See \"/vis/verbose\" for definition of verbosity.");
1461 parameter -> SetDefaultValue (
"all");
1462 fpCommand -> SetParameter (parameter);
1465 parameter -> SetDefaultValue (
"warnings");
1466 fpCommand -> SetParameter (parameter);
1479 std::istringstream is (newValue);
1480 is >> name >> verbosityString;
1487 if (currentViewer) {
1488 currentViewerShortName = currentViewer -> GetShortName ();
1491 currentViewerShortName =
"none";
1496 std::size_t nHandlers = sceneHandlerList.size ();
1498 G4bool foundCurrent =
false;
1499 for (std::size_t iHandler = 0; iHandler < nHandlers; ++iHandler) {
1501 const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
1503 <<
"Scene handler \"" << sceneHandler -> GetName () <<
"\" ("
1505 const G4Scene* pScene = sceneHandler -> GetScene ();
1507 G4cout <<
", scene \"" << pScene -> GetName () <<
"\"";
1510 std::size_t nViewers = viewerList.size ();
1511 if (nViewers == 0) {
1512 G4cout <<
"\n No viewers for this scene handler." <<
G4endl;
1515 for (std::size_t iViewer = 0; iViewer < nViewers; ++iViewer) {
1516 const G4VViewer* thisViewer = viewerList [iViewer];
1517 G4String thisName = thisViewer -> GetName ();
1518 G4String thisShortName = thisViewer -> GetShortName ();
1519 if (name !=
"all") {
1520 if (thisShortName != shortName)
continue;
1524 if (thisShortName == currentViewerShortName) {
1525 foundCurrent =
true;
1531 G4cout <<
" viewer \"" << thisName <<
"\"";
1533 G4cout <<
"\n " << *thisViewer;
1540 if (!foundCurrent) {
1541 G4cout <<
"No valid current viewer - please create or select one."
1547 if (name !=
"all") {
1548 G4cout <<
" of name \"" << name <<
"\"";
1557 fPanIncrementRight (0.),
1558 fPanIncrementUp (0.),
1565 (
"/vis/viewer/pan",
this);
1566 fpCommandPan -> SetGuidance
1567 (
"Incremental pan.");
1568 fpCommandPan -> SetGuidance
1569 (
"Moves the camera incrementally right and up by these amounts (as seen"
1570 "\nfrom viewpoint direction).");
1572 parameter =
new G4UIparameter(
"right-increment",
'd', omitable =
true);
1573 parameter -> SetCurrentAsDefault (
true);
1574 fpCommandPan -> SetParameter (parameter);
1575 parameter =
new G4UIparameter(
"up-increment",
'd', omitable =
true);
1576 parameter -> SetCurrentAsDefault (
true);
1577 fpCommandPan -> SetParameter (parameter);
1578 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1579 parameter -> SetDefaultValue (
"m");
1580 fpCommandPan -> SetParameter (parameter);
1583 (
"/vis/viewer/panTo",
this);
1584 fpCommandPanTo -> SetGuidance
1585 (
"Pan to specific coordinate.");
1586 fpCommandPanTo -> SetGuidance
1587 (
"Places the camera in this position right and up relative to standard"
1588 "\ntarget point (as seen from viewpoint direction).");
1589 parameter =
new G4UIparameter(
"right",
'd', omitable =
true);
1590 parameter -> SetCurrentAsDefault (
true);
1591 fpCommandPanTo -> SetParameter (parameter);
1593 parameter -> SetCurrentAsDefault (
true);
1594 fpCommandPanTo -> SetParameter (parameter);
1595 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1596 parameter -> SetDefaultValue (
"m");
1597 fpCommandPanTo -> SetParameter (parameter);
1601 delete fpCommandPan;
1602 delete fpCommandPanTo;
1607 if (command == fpCommandPan) {
1608 currentValue =
ConvertToString(fPanIncrementRight, fPanIncrementUp,
"m");
1610 else if (command == fpCommandPanTo) {
1613 return currentValue;
1623 if (!currentViewer) {
1626 "ERROR: G4VisCommandsViewerPan::SetNewValue: no current viewer."
1634 if (command == fpCommandPan) {
1638 else if (command == fpCommandPanTo) {
1640 vp.
SetPan(fPanToRight, fPanToUp);
1654 G4bool omitable, currentAsDefault;
1656 fpCommand -> SetGuidance (
"Forces rebuild of graphical database.");
1657 fpCommand -> SetGuidance
1658 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1659 "\nto see possible viewers. Viewer becomes current.");
1660 fpCommand -> SetParameterName (
"viewer-name",
1662 currentAsDefault =
true);
1672 return viewer -> GetName ();
1688 G4warn <<
"ERROR: Viewer \"" << rebuildName
1689 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1696 if (!sceneHandler) {
1698 G4warn <<
"ERROR: Viewer \"" << viewer->
GetName() <<
"\"" <<
1699 " has no scene handler - report serious bug."
1718 G4bool omitable, currentAsDefault;
1720 fpCommand -> SetGuidance
1721 (
"Refreshes viewer.");
1722 fpCommand -> SetGuidance
1723 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1724 "\nto see possible viewers. Viewer becomes current.");
1725 fpCommand -> SetParameterName (
"viewer-name",
1727 currentAsDefault =
true);
1736 return viewer ? viewer -> GetName () :
G4String(
"none");
1748 G4warn <<
"ERROR: Viewer \"" << refreshName <<
"\"" <<
1749 " not found - \"/vis/viewer/list\"\n to see possibilities."
1756 if (!sceneHandler) {
1758 G4warn <<
"ERROR: Viewer \"" << refreshName <<
"\"" <<
1759 " has no scene handler - report serious bug."
1768 G4cout <<
"NOTE: SceneHandler \"" << sceneHandler->
GetName()
1769 <<
"\", to which viewer \"" << refreshName <<
"\"" <<
1770 "\n is attached, has no scene - \"/vis/scene/create\" and"
1771 " \"/vis/sceneHandler/attach\""
1772 "\n (or use compound command \"/vis/drawVolume\")."
1778 G4bool successful = scene -> AddWorldIfEmpty (warn);
1782 "WARNING: Scene is empty. Perhaps no geometry exists."
1783 "\n Try /run/initialize."
1794 G4cout <<
"Refreshing viewer \"" << viewer -> GetName () <<
"\"..."
1797 viewer -> SetView ();
1798 viewer -> ClearView ();
1799 viewer -> DrawView ();
1801 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\"" <<
" refreshed."
1802 "\n (You might also need \"/vis/viewer/update\".)" <<
G4endl;
1810 G4bool omitable, currentAsDefault;
1812 fpCommand -> SetGuidance (
"Resets viewer.");
1813 fpCommand -> SetGuidance
1814 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1815 "\nto see possible viewers. Viewer becomes current.");
1816 fpCommand -> SetParameterName (
"viewer-name",
1818 currentAsDefault =
true);
1828 return viewer -> GetName ();
1843 G4warn <<
"ERROR: Viewer \"" << resetName
1844 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1857 G4bool omitable, currentAsDefault;
1859 fpCommand -> SetGuidance (
"Resets only the camera parameters.");
1860 fpCommand -> SetGuidance
1861 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1862 "\nto see possible viewers. Viewer becomes current.");
1863 fpCommand -> SetParameterName (
"viewer-name",
1865 currentAsDefault =
true);
1875 return viewer -> GetName ();
1890 G4warn <<
"ERROR: Viewer \"" << resetName
1891 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1908 fpCommand -> SetGuidance
1909 (
"Write commands that define the current view to file.");
1910 fpCommand -> SetGuidance
1911 (
"Read them back into the same or any viewer with \"/control/execute\".");
1912 fpCommand -> SetGuidance
1913 (
"If the filename is omitted the view is saved to a file "
1914 "\"g4_nn.g4view\", where nn is a sequential two-digit number.");
1915 fpCommand -> SetGuidance
1916 (
"If the filename is \"-\", the data are written to G4cout.");
1917 fpCommand -> SetGuidance
1918 (
"If you are wanting to save views for future interpolation a recommended "
1919 "procedure is: save views to \"g4_nn.g4view\", as above, then move the files "
1920 "into a sub-directory, say, \"views\", then interpolate with"
1921 "\"/vis/viewer/interpolate views\"");
1922 fpCommand -> SetParameterName (
"filename", omitable =
true);
1923 fpCommand -> SetDefaultValue (
"");
1956 if (!currentViewer) {
1959 "ERROR: G4VisCommandsViewerSave::SetNewValue: no current viewer."
1966 if (!currentScene) {
1969 "ERROR: G4VisCommandsViewerSave::SetNewValue: no current scene."
1978 const std::vector<G4ModelingParameters::VisAttributesModifier>*
1981 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator i;
1982 for (i = privateVAMs->begin(); i != privateVAMs->end(); ++i) {
1990 if (newValue.length() == 0) {
1992 const G4int maxNoOfFiles = 100;
1993 static G4int sequenceNumber = 0;
1994 if (sequenceNumber >= maxNoOfFiles) {
1997 <<
"ERROR: G4VisCommandsViewerSave::SetNewValue: Maximum number, "
1999 <<
", of files exceeded."
2004 std::ostringstream oss;
2005 oss << std::setw(2) << std::setfill(
'0') << sequenceNumber++;
2006 filename =
"g4_" + oss.str() +
".g4view";
2009 if (filename ==
"-") {
2011 WriteCommands(
G4cout,vp,stp);
2016 filename +=
".g4view";
2018 std::ofstream ofs(filename);
2022 "ERROR: G4VisCommandsViewerSave::SetNewValue: Trouble opening file \""
2023 << filename <<
"\"."
2029 WriteCommands(ofs,vp,stp);
2034 G4warn <<
"Viewer \"" << currentViewer -> GetName ()
2035 <<
"\"" <<
" saved to ";
2036 if (filename ==
"-") {
2039 G4warn <<
"file \'" << filename <<
"\"." <<
2040 "\n Read the view back into this or any viewer with"
2041 "\n \"/control/execute " << filename <<
"\" or use"
2042 "\n \"/vis/viewer/interpolate\" if you have several saved files -"
2043 "\n see \"help /vis/viewer/interpolate\" for guidance.";
2055 G4bool omitable, currentAsDefault;
2058 (
"/vis/viewer/scale",
this);
2059 fpCommandScale -> SetGuidance (
"Incremental (non-uniform) scaling.");
2060 fpCommandScale -> SetGuidance
2061 (
"Multiplies components of current scaling by components of this factor."
2062 "\n Scales (x,y,z) by corresponding components of the resulting factor.");
2063 fpCommandScale -> SetGuidance
2065 fpCommandScale -> SetParameterName
2066 (
"x-scale-multiplier",
"y-scale-multiplier",
"z-scale-multiplier",
2067 omitable=
true, currentAsDefault=
true);
2070 (
"/vis/viewer/scaleTo",
this);
2071 fpCommandScaleTo -> SetGuidance (
"Absolute (non-uniform) scaling.");
2072 fpCommandScaleTo -> SetGuidance
2073 (
"Scales (x,y,z) by corresponding components of this factor.");
2074 fpCommandScaleTo -> SetParameterName
2075 (
"x-scale-factor",
"y-scale-factor",
"z-scale-factor",
2076 omitable=
true, currentAsDefault=
true);
2080 delete fpCommandScale;
2081 delete fpCommandScaleTo;
2086 if (command == fpCommandScale) {
2087 currentValue = fpCommandScale->ConvertToString(
G4ThreeVector(fScaleMultiplier));
2089 else if (command == fpCommandScaleTo) {
2090 currentValue = fpCommandScaleTo->ConvertToString(
G4ThreeVector(fScaleTo));
2092 return currentValue;
2102 if (!currentViewer) {
2105 "ERROR: G4VisCommandsViewerScale::SetNewValue: no current viewer."
2113 if (command == fpCommandScale) {
2114 fScaleMultiplier = fpCommandScale->GetNew3VectorValue(newValue);
2117 else if (command == fpCommandScaleTo) {
2118 fScaleTo = fpCommandScale->GetNew3VectorValue(newValue);
2134 fpCommand -> SetGuidance (
"Selects viewer.");
2135 fpCommand -> SetGuidance
2136 (
"Specify viewer by name. \"/vis/viewer/list\" to see possible viewers.");
2137 fpCommand -> SetParameterName (
"viewer-name", omitable =
false);
2157 G4warn <<
"ERROR: Viewer \"" << selectName <<
"\"";
2158 G4warn <<
" not found - \"/vis/viewer/list\""
2159 "\n to see possibilities."
2167 G4warn <<
"WARNING: Viewer \"" << viewer -> GetName () <<
"\""
2168 <<
" already selected." <<
G4endl;
2186 G4bool omitable, currentAsDefault;
2188 fpCommand -> SetGuidance
2189 (
"Triggers graphical database post-processing for viewers"
2190 "\nusing that technique.");
2191 fpCommand -> SetGuidance
2192 (
"For such viewers the view only becomes visible with this command."
2193 "\nBy default, acts on current viewer. \"/vis/viewer/list\""
2194 "\nto see possible viewers. Viewer becomes current.");
2195 fpCommand -> SetParameterName (
"viewer-name",
2197 currentAsDefault =
true);
2207 return viewer -> GetName ();
2224 "WARNING: command \"/vis/viewer/update\" could not be applied: no current viewer."
2231 if (!sceneHandler) {
2233 G4warn <<
"ERROR: Viewer \"" << updateName <<
"\"" <<
2234 " has no scene handler - report serious bug."
2243 G4cout <<
"NOTE: SceneHandler \"" << sceneHandler->
GetName()
2244 <<
"\", to which viewer \"" << updateName <<
"\"" <<
2245 "\n is attached, has no scene - \"/vis/scene/create\" and"
2246 " \"/vis/sceneHandler/attach\""
2247 "\n (or use compound command \"/vis/drawVolume\")."
2254 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\"";
2257 viewer -> ShowView ();
2259 sceneHandler -> SetMarkForClearingTransientStore(
true);
2265 fZoomMultiplier (1.),
2268 G4bool omitable, currentAsDefault;
2271 (
"/vis/viewer/zoom",
this);
2272 fpCommandZoom -> SetGuidance (
"Incremental zoom.");
2273 fpCommandZoom -> SetGuidance
2274 (
"Multiplies current magnification by this factor.");
2275 fpCommandZoom -> SetParameterName(
"multiplier",
2277 currentAsDefault=
true);
2280 (
"/vis/viewer/zoomTo",
this);
2281 fpCommandZoomTo -> SetGuidance (
"Absolute zoom.");
2282 fpCommandZoomTo -> SetGuidance
2283 (
"Magnifies standard magnification by this factor.");
2284 fpCommandZoomTo -> SetParameterName(
"factor",
2286 currentAsDefault=
true);
2290 delete fpCommandZoom;
2291 delete fpCommandZoomTo;
2296 if (command == fpCommandZoom) {
2297 currentValue = fpCommandZoom->ConvertToString(fZoomMultiplier);
2299 else if (command == fpCommandZoomTo) {
2300 currentValue = fpCommandZoomTo->ConvertToString(fZoomTo);
2302 return currentValue;
2312 if (!currentViewer) {
2315 "ERROR: G4VisCommandsViewerZoom::SetNewValue: no current viewer."
2323 if (command == fpCommandZoom) {
2324 fZoomMultiplier = fpCommandZoom->GetNewDoubleValue(newValue);
2327 else if (command == fpCommandZoomTo) {
2328 fZoomTo = fpCommandZoom->GetNewDoubleValue(newValue);
std::ostringstream G4ExceptionDescription
HepGeom::Normal3D< G4double > G4Normal3D
HepGeom::Plane3D< G4double > G4Plane3D
HepGeom::Point3D< G4double > G4Point3D
CLHEP::Hep3Vector G4ThreeVector
HepGeom::Vector3D< G4double > G4Vector3D
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
G4TransportationManager is a singleton class which stores the navigator used by the transportation pr...
static G4TransportationManager * GetTransportationManager()
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
std::size_t GetNoWorlds() const
static G4double ValueOf(const char *unitName)
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
G4SceneTreeItem & AccessSceneTree()
void UpdateGUIControlWidgets()
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers() const
void UpdateGUISceneTree()
const G4ViewParameters & GetDefaultViewParameters() const
virtual void FinishView()
void SetViewParameters(const G4ViewParameters &vp)
virtual void ClearView()=0
G4VSceneHandler * GetSceneHandler() const
static G4ViewParameters fExistingVP
void InterpolateToNewView(G4VViewer *currentViewer, const G4ViewParameters &oldVP, const G4ViewParameters &newVP, const G4int nInterpolationPoints=50, const G4int waitTimePerPointmilliseconds=20, const G4String &exportString="")
void CopyCameraParameters(G4ViewParameters &target, const G4ViewParameters &from)
void InterpolateViews(G4VViewer *currentViewer, const std::vector< G4ViewParameters > &viewVector, const G4int nInterpolationPoints=50, const G4int waitTimePerPointmilliseconds=20, const G4String &exportString="")
void CheckSceneAndNotifyHandlers(G4Scene *=nullptr)
static G4VisManager * fpVisManager
static G4bool ConvertToDoublePair(const G4String ¶mString, G4double &xval, G4double &yval)
void RefreshIfRequired(G4VViewer *viewer)
static G4SceneTreeItem fExistingSceneTree
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 SetCBDParameters(const std::vector< G4double > &)
void SetScaleFactor(const G4Vector3D &scaleFactor)
const G4Vector3D & GetScaleFactor() const
void SetAutoRefresh(G4bool)
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 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)
G4double GetGlobalMarkerScale() const
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
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.