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;}
634 G4StrUtil::strip(originalName,
' ');
635 G4StrUtil::strip(originalName,
'"');
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;}
656 G4StrUtil::strip(cloneName,
' ');
657 G4StrUtil::strip(cloneName,
'"');
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 -> SetCurrentAsDefault (
true);
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 sceneHandlerName = currentSceneHandler->GetName();
974 sceneHandlerName =
"none";
978 const auto& viewerName = NextName();
984 windowSizeHint = currentViewer->GetViewParameters().GetXGeometryString();
991 return sceneHandlerName +
" \"" + viewerName +
"\" " + windowSizeHint;
1000 std::istringstream is (newValue);
1001 is >> sceneHandlerName;
1006 while (is.get(c) && c ==
' '){}
1008 while (is.get(c) && c !=
'"') {newName += c;}
1012 while (is.get(c) && c !=
' ') {newName += c;}
1014 G4StrUtil::strip(newName,
' ');
1015 G4StrUtil::strip(newName,
'"');
1018 is >> windowSizeHintString;
1022 std::size_t nHandlers = sceneHandlerList.size ();
1023 if (nHandlers == 0) {
1026 "ERROR: G4VisCommandViewerCreate::SetNewValue: no scene handlers."
1027 "\n Create a scene handler with \"/vis/sceneHandler/create\"";
1032 std::size_t iHandler;
1033 for (iHandler = 0; iHandler < nHandlers; ++iHandler) {
1034 if (sceneHandlerList [iHandler] -> GetName () == sceneHandlerName)
break;
1037 if (iHandler >= nHandlers) {
1042 "G4VisCommandViewerCreate::SetNewValue: invalid scene handler specified.";
1050 if (sceneHandler !=
fpVisManager -> GetCurrentSceneHandler ()) {
1056 if (newName ==
"") {
1059 if (newName == nextName) fId++;
1062 for (std::size_t ih = 0; ih < nHandlers; ++ih) {
1064 const G4ViewerList& viewerList = sh -> GetViewerList ();
1065 for (std::size_t iViewer = 0; iViewer < viewerList.size (); iViewer++) {
1066 if (viewerList [iViewer] -> GetShortName () == newShortName ) {
1069 "ERROR: Viewer \"" << newShortName <<
"\" already exists.";
1079 if (existingViewer) {
1081 fExistingVP = existingViewer->GetViewParameters();
1091 fpVisManager -> CreateViewer (newName,windowSizeHintString);
1096 if (newViewer && newViewer -> GetName () == newName) {
1109 G4cout <<
"New viewer \"" << newName <<
"\" created." <<
G4endl;
1119 ed <<
"ERROR: New viewer doesn\'t match!!! Curious!!";
1121 ed <<
"WARNING: No viewer created.";
1133 G4warn <<
"Issue /vis/viewer/refresh or flush to see effect."
1143 fDollyIncrement (0.),
1146 G4bool omitable, currentAsDefault;
1149 (
"/vis/viewer/dolly",
this);
1150 fpCommandDolly -> SetGuidance
1151 (
"Incremental dolly.");
1152 fpCommandDolly -> SetGuidance
1153 (
"Moves the camera incrementally towards target point.");
1154 fpCommandDolly -> SetParameterName(
"increment",
1156 currentAsDefault=
true);
1157 fpCommandDolly -> SetDefaultUnit(
"m");
1160 (
"/vis/viewer/dollyTo",
this);
1161 fpCommandDollyTo -> SetGuidance
1162 (
"Dolly to specific coordinate.");
1163 fpCommandDollyTo -> SetGuidance
1164 (
"Places the camera towards target point relative to standard camera point.");
1165 fpCommandDollyTo -> SetParameterName(
"distance",
1167 currentAsDefault=
true);
1168 fpCommandDollyTo -> SetDefaultUnit(
"m");
1172 delete fpCommandDolly;
1173 delete fpCommandDollyTo;
1178 if (command == fpCommandDolly) {
1181 else if (command == fpCommandDollyTo) {
1184 return currentValue;
1194 if (!currentViewer) {
1197 "ERROR: G4VisCommandsViewerDolly::SetNewValue: no current viewer."
1205 if (command == fpCommandDolly) {
1209 else if (command == fpCommandDollyTo) {
1224 G4bool omitable, currentAsDefault;
1226 fpCommand -> SetGuidance
1227 (
"Compound command: \"/vis/viewer/refresh\" + \"/vis/viewer/update\".");
1228 fpCommand -> SetGuidance
1229 (
"Useful for refreshing and initiating post-processing for graphics"
1230 "\nsystems which need post-processing. By default, acts on current"
1231 "\nviewer. \"/vis/viewer/list\" to see possible viewers. Viewer"
1232 "\nbecomes current.");
1233 fpCommand -> SetParameterName (
"viewer-name",
1235 currentAsDefault =
true);
1245 return viewer ? viewer -> GetName () :
G4String(
"none");
1256 G4warn <<
"ERROR: Viewer \"" << flushName <<
"\"" <<
1257 " not found - \"/vis/viewer/list\"\n to see possibilities."
1267 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\""
1268 <<
" flushed." <<
G4endl;
1276 fpCommand =
new G4UIcommand (
"/vis/viewer/interpolate",
this);
1277 fpCommand -> SetGuidance
1278 (
"Interpolate views defined by the first argument, which can contain "
1279 "Unix-shell-style pattern matching characters such as '*', '?' and '[' "
1280 "- see \"man sh\" and look for \"Pattern Matching\". The contents "
1281 "of each file are assumed to be \"/vis/viewer\" commands "
1282 "that specify a particular view. The files are processed in alphanumeric "
1283 "order of filename. The files may be written by hand or produced by the "
1284 "\"/vis/viewer/save\" command.");
1285 fpCommand -> SetGuidance
1286 (
"The default is to search the working directory for files with a .g4view "
1287 "extension. Another procedure is to assemble view files in a subdirectory, "
1288 "e.g., \"myviews\"; then they can be interpolated with\n"
1289 "\"/vis/viewer/interpolate myviews\".");
1290 fpCommand -> SetGuidance
1291 (
"To export interpolated views to file for a future possible movie, "
1292 "write \"export\" as 5th parameter (OpenGL only).");
1294 parameter =
new G4UIparameter(
"pattern",
's', omitable =
true);
1295 parameter -> SetGuidance(
"Pattern that defines the view files.");
1296 parameter -> SetDefaultValue(
"*.g4view");
1297 fpCommand -> SetParameter(parameter);
1298 parameter =
new G4UIparameter(
"no-of-points",
'i', omitable =
true);
1299 parameter -> SetGuidance (
"Number of interpolation points per interval.");
1300 parameter -> SetDefaultValue(50);
1301 fpCommand -> SetParameter(parameter);
1302 parameter =
new G4UIparameter(
"wait-time",
's', omitable =
true);
1303 parameter -> SetGuidance(
"Wait time per interpolated point");
1304 parameter -> SetDefaultValue(
"20.");
1305 fpCommand -> SetParameter(parameter);
1306 parameter =
new G4UIparameter(
"time-unit",
's', omitable =
true);
1307 parameter -> SetDefaultValue(
"millisecond");
1308 fpCommand -> SetParameter (parameter);
1309 parameter =
new G4UIparameter(
"export",
's', omitable =
true);
1310 parameter -> SetDefaultValue(
"no");
1311 fpCommand -> SetParameter (parameter);
1327 if (!currentViewer) {
1330 "ERROR: G4VisCommandViewerInterpolate::SetNewValue: no current viewer."
1337 G4int nInterpolationPoints;
1342 std::istringstream iss (newValue);
1345 >> nInterpolationPoints
1346 >> waitTimePerPointString
1349 G4String waitTimePerPointDimString(waitTimePerPointString +
' ' + timeUnit);
1352 G4int waitTimePerPointmilliseconds = waitTimePerPoint/millisecond;
1353 if (waitTimePerPointmilliseconds < 0) waitTimePerPointmilliseconds = 0;
1374 const G4int safety = 99;
1375 G4int safetyCount = 0;
1376 G4fs::path pathPattern = pattern.c_str();
1380 (pathPattern.parent_path().string().length() ?
1381 pathPattern.parent_path().string() :
1383 G4fs::path parentPath = parentPathString.c_str();
1386 std::set<G4fs::path> paths;
1388 if (G4fs::is_directory(pathPattern)) {
1391 for (
const auto& path: G4fs::directory_iterator(pathPattern)) {
1392 if (safetyCount++ >= safety)
break;
1402 for (
G4int i = 0; i < (
G4int)pattern.length(); ++i) {
1403 if (pattern[i] ==
'.') {
1404 regexp_pattern +=
"\\.";
1405 }
else if (pattern[i] ==
'*') {
1406 regexp_pattern +=
".*";
1407 }
else if (pattern[i] ==
'?') {
1408 regexp_pattern +=
"(.{1,1})";
1410 regexp_pattern += pattern[i];
1413 std::regex regexp(regexp_pattern, std::regex_constants::basic | std::regex_constants::icase);
1415 for (
const auto& path: G4fs::directory_iterator(parentPath)) {
1416 const auto& pathname = path.path().relative_path().string();
1417 if (std::regex_match(pathname, regexp)) {
1418 if (safetyCount++ >= safety)
break;
1424 if (safetyCount > safety) {
1427 "/vis/viewer/interpolate:"
1428 "\n the number of way points has been limited to the maximum currently allowed: "
1434 std::vector<G4ViewParameters> viewVector;
1435 for (
const auto& path: paths) {
1436 uiManager->
ApplyCommand(
"/control/execute " + path.relative_path().string());
1440 viewVector.push_back(vp);
1444 (currentViewer,viewVector,
1445 nInterpolationPoints,waitTimePerPointmilliseconds,exportString);
1455 G4cout <<
"Viewer \"" << currentViewer -> GetName () <<
"\""
1456 <<
" restored." <<
G4endl;
1464 fpCommand =
new G4UIcommand (
"/vis/viewer/list",
this);
1465 fpCommand -> SetGuidance (
"Lists viewers(s).");
1466 fpCommand -> SetGuidance
1467 (
"See \"/vis/verbose\" for definition of verbosity.");
1471 parameter -> SetDefaultValue (
"all");
1472 fpCommand -> SetParameter (parameter);
1475 parameter -> SetDefaultValue (
"warnings");
1476 fpCommand -> SetParameter (parameter);
1489 std::istringstream is (newValue);
1490 is >> name >> verbosityString;
1497 if (currentViewer) {
1498 currentViewerShortName = currentViewer -> GetShortName ();
1501 currentViewerShortName =
"none";
1506 std::size_t nHandlers = sceneHandlerList.size ();
1508 G4bool foundCurrent =
false;
1509 for (std::size_t iHandler = 0; iHandler < nHandlers; ++iHandler) {
1511 const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
1513 <<
"Scene handler \"" << sceneHandler -> GetName () <<
"\" ("
1515 const G4Scene* pScene = sceneHandler -> GetScene ();
1517 G4cout <<
", scene \"" << pScene -> GetName () <<
"\"";
1520 std::size_t nViewers = viewerList.size ();
1521 if (nViewers == 0) {
1522 G4cout <<
"\n No viewers for this scene handler." <<
G4endl;
1525 for (std::size_t iViewer = 0; iViewer < nViewers; ++iViewer) {
1526 const G4VViewer* thisViewer = viewerList [iViewer];
1527 G4String thisName = thisViewer -> GetName ();
1528 G4String thisShortName = thisViewer -> GetShortName ();
1529 if (name !=
"all") {
1530 if (thisShortName != shortName)
continue;
1534 if (thisShortName == currentViewerShortName) {
1535 foundCurrent =
true;
1541 G4cout <<
" viewer \"" << thisName <<
"\"";
1543 G4cout <<
"\n " << *thisViewer;
1550 if (!foundCurrent) {
1551 G4cout <<
"No valid current viewer - please create or select one."
1557 if (name !=
"all") {
1558 G4cout <<
" of name \"" << name <<
"\"";
1567 fPanIncrementRight (0.),
1568 fPanIncrementUp (0.),
1575 (
"/vis/viewer/pan",
this);
1576 fpCommandPan -> SetGuidance
1577 (
"Incremental pan.");
1578 fpCommandPan -> SetGuidance
1579 (
"Moves the camera incrementally right and up by these amounts (as seen"
1580 "\nfrom viewpoint direction).");
1582 parameter =
new G4UIparameter(
"right-increment",
'd', omitable =
true);
1583 parameter -> SetCurrentAsDefault (
true);
1584 fpCommandPan -> SetParameter (parameter);
1585 parameter =
new G4UIparameter(
"up-increment",
'd', omitable =
true);
1586 parameter -> SetCurrentAsDefault (
true);
1587 fpCommandPan -> SetParameter (parameter);
1588 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1589 parameter -> SetDefaultValue (
"m");
1590 fpCommandPan -> SetParameter (parameter);
1593 (
"/vis/viewer/panTo",
this);
1594 fpCommandPanTo -> SetGuidance
1595 (
"Pan to specific coordinate.");
1596 fpCommandPanTo -> SetGuidance
1597 (
"Places the camera in this position right and up relative to standard"
1598 "\ntarget point (as seen from viewpoint direction).");
1599 parameter =
new G4UIparameter(
"right",
'd', omitable =
true);
1600 parameter -> SetCurrentAsDefault (
true);
1601 fpCommandPanTo -> SetParameter (parameter);
1603 parameter -> SetCurrentAsDefault (
true);
1604 fpCommandPanTo -> SetParameter (parameter);
1605 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1606 parameter -> SetDefaultValue (
"m");
1607 fpCommandPanTo -> SetParameter (parameter);
1611 delete fpCommandPan;
1612 delete fpCommandPanTo;
1617 if (command == fpCommandPan) {
1618 currentValue =
ConvertToString(fPanIncrementRight, fPanIncrementUp,
"m");
1620 else if (command == fpCommandPanTo) {
1623 return currentValue;
1633 if (!currentViewer) {
1636 "ERROR: G4VisCommandsViewerPan::SetNewValue: no current viewer."
1644 if (command == fpCommandPan) {
1648 else if (command == fpCommandPanTo) {
1650 vp.
SetPan(fPanToRight, fPanToUp);
1664 G4bool omitable, currentAsDefault;
1666 fpCommand -> SetGuidance (
"Forces rebuild of graphical database.");
1667 fpCommand -> SetGuidance
1668 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1669 "\nto see possible viewers. Viewer becomes current.");
1670 fpCommand -> SetParameterName (
"viewer-name",
1672 currentAsDefault =
true);
1682 return viewer -> GetName ();
1698 G4warn <<
"ERROR: Viewer \"" << rebuildName
1699 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1706 if (!sceneHandler) {
1708 G4warn <<
"ERROR: Viewer \"" << viewer->
GetName() <<
"\"" <<
1709 " has no scene handler - report serious bug."
1728 G4bool omitable, currentAsDefault;
1730 fpCommand -> SetGuidance
1731 (
"Refreshes viewer.");
1732 fpCommand -> SetGuidance
1733 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1734 "\nto see possible viewers. Viewer becomes current.");
1735 fpCommand -> SetParameterName (
"viewer-name",
1737 currentAsDefault =
true);
1746 return viewer ? viewer -> GetName () :
G4String(
"none");
1758 G4warn <<
"ERROR: Viewer \"" << refreshName <<
"\"" <<
1759 " not found - \"/vis/viewer/list\"\n to see possibilities."
1766 if (!sceneHandler) {
1768 G4warn <<
"ERROR: Viewer \"" << refreshName <<
"\"" <<
1769 " has no scene handler - report serious bug."
1778 G4cout <<
"NOTE: SceneHandler \"" << sceneHandler->
GetName()
1779 <<
"\", to which viewer \"" << refreshName <<
"\"" <<
1780 "\n is attached, has no scene - \"/vis/scene/create\" and"
1781 " \"/vis/sceneHandler/attach\""
1782 "\n (or use compound command \"/vis/drawVolume\")."
1788 G4bool successful = scene -> AddWorldIfEmpty (warn);
1792 "WARNING: Scene is empty. Perhaps no geometry exists."
1793 "\n Try /run/initialize."
1804 G4cout <<
"Refreshing viewer \"" << viewer -> GetName () <<
"\"..."
1807 viewer -> SetView ();
1808 viewer -> ClearView ();
1809 viewer -> DrawView ();
1811 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\"" <<
" refreshed."
1812 "\n (You might also need \"/vis/viewer/update\".)" <<
G4endl;
1820 G4bool omitable, currentAsDefault;
1822 fpCommand -> SetGuidance (
"Resets viewer.");
1823 fpCommand -> SetGuidance
1824 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1825 "\nto see possible viewers. Viewer becomes current.");
1826 fpCommand -> SetParameterName (
"viewer-name",
1828 currentAsDefault =
true);
1838 return viewer -> GetName ();
1853 G4warn <<
"ERROR: Viewer \"" << resetName
1854 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1867 G4bool omitable, currentAsDefault;
1869 fpCommand -> SetGuidance (
"Resets only the camera parameters.");
1870 fpCommand -> SetGuidance
1871 (
"By default, acts on current viewer. \"/vis/viewer/list\""
1872 "\nto see possible viewers. Viewer becomes current.");
1873 fpCommand -> SetParameterName (
"viewer-name",
1875 currentAsDefault =
true);
1885 return viewer -> GetName ();
1900 G4warn <<
"ERROR: Viewer \"" << resetName
1901 <<
"\" not found - \"/vis/viewer/list\" to see possibilities."
1918 fpCommand -> SetGuidance
1919 (
"Write commands that define the current view to file.");
1920 fpCommand -> SetGuidance
1921 (
"Read them back into the same or any viewer with \"/control/execute\".");
1922 fpCommand -> SetGuidance
1923 (
"If the filename is omitted the view is saved to a file "
1924 "\"g4_nn.g4view\", where nn is a sequential two-digit number.");
1925 fpCommand -> SetGuidance
1926 (
"If the filename is \"-\", the data are written to G4cout.");
1927 fpCommand -> SetGuidance
1928 (
"If you are wanting to save views for future interpolation a recommended "
1929 "procedure is: save views to \"g4_nn.g4view\", as above, then move the files "
1930 "into a sub-directory, say, \"views\", then interpolate with"
1931 "\"/vis/viewer/interpolate views\"");
1932 fpCommand -> SetParameterName (
"filename", omitable =
true);
1933 fpCommand -> SetDefaultValue (
"");
1966 if (!currentViewer) {
1969 "ERROR: G4VisCommandsViewerSave::SetNewValue: no current viewer."
1976 if (!currentScene) {
1979 "ERROR: G4VisCommandsViewerSave::SetNewValue: no current scene."
1988 const std::vector<G4ModelingParameters::VisAttributesModifier>*
1991 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator i;
1992 for (i = privateVAMs->begin(); i != privateVAMs->end(); ++i) {
2000 if (newValue.length() == 0) {
2002 const G4int maxNoOfFiles = 100;
2003 static G4int sequenceNumber = 0;
2004 if (sequenceNumber >= maxNoOfFiles) {
2007 <<
"ERROR: G4VisCommandsViewerSave::SetNewValue: Maximum number, "
2009 <<
", of files exceeded."
2014 std::ostringstream oss;
2015 oss << std::setw(2) << std::setfill(
'0') << sequenceNumber++;
2016 filename =
"g4_" + oss.str() +
".g4view";
2019 if (filename ==
"-") {
2021 WriteCommands(
G4cout,vp,stp);
2024 if (!G4StrUtil::contains(filename,
'.')) {
2026 filename +=
".g4view";
2028 std::ofstream ofs(filename);
2032 "ERROR: G4VisCommandsViewerSave::SetNewValue: Trouble opening file \""
2033 << filename <<
"\"."
2039 WriteCommands(ofs,vp,stp);
2044 G4warn <<
"Viewer \"" << currentViewer -> GetName ()
2045 <<
"\"" <<
" saved to ";
2046 if (filename ==
"-") {
2049 G4warn <<
"file \'" << filename <<
"\"." <<
2050 "\n Read the view back into this or any viewer with"
2051 "\n \"/control/execute " << filename <<
"\" or use"
2052 "\n \"/vis/viewer/interpolate\" if you have several saved files -"
2053 "\n see \"help /vis/viewer/interpolate\" for guidance.";
2065 G4bool omitable, currentAsDefault;
2068 (
"/vis/viewer/scale",
this);
2069 fpCommandScale -> SetGuidance (
"Incremental (non-uniform) scaling.");
2070 fpCommandScale -> SetGuidance
2071 (
"Multiplies components of current scaling by components of this factor."
2072 "\n Scales (x,y,z) by corresponding components of the resulting factor.");
2073 fpCommandScale -> SetGuidance
2075 fpCommandScale -> SetParameterName
2076 (
"x-scale-multiplier",
"y-scale-multiplier",
"z-scale-multiplier",
2077 omitable=
true, currentAsDefault=
true);
2080 (
"/vis/viewer/scaleTo",
this);
2081 fpCommandScaleTo -> SetGuidance (
"Absolute (non-uniform) scaling.");
2082 fpCommandScaleTo -> SetGuidance
2083 (
"Scales (x,y,z) by corresponding components of this factor.");
2084 fpCommandScaleTo -> SetParameterName
2085 (
"x-scale-factor",
"y-scale-factor",
"z-scale-factor",
2086 omitable=
true, currentAsDefault=
true);
2090 delete fpCommandScale;
2091 delete fpCommandScaleTo;
2096 if (command == fpCommandScale) {
2099 else if (command == fpCommandScaleTo) {
2102 return currentValue;
2112 if (!currentViewer) {
2115 "ERROR: G4VisCommandsViewerScale::SetNewValue: no current viewer."
2123 if (command == fpCommandScale) {
2127 else if (command == fpCommandScaleTo) {
2144 fpCommand -> SetGuidance (
"Selects viewer.");
2145 fpCommand -> SetGuidance
2146 (
"Specify viewer by name. \"/vis/viewer/list\" to see possible viewers.");
2147 fpCommand -> SetParameterName (
"viewer-name", omitable =
false);
2167 G4warn <<
"ERROR: Viewer \"" << selectName <<
"\"";
2168 G4warn <<
" not found - \"/vis/viewer/list\""
2169 "\n to see possibilities."
2177 G4warn <<
"WARNING: Viewer \"" << viewer -> GetName () <<
"\""
2178 <<
" already selected." <<
G4endl;
2195 G4bool omitable, currentAsDefault;
2197 fpCommand -> SetGuidance
2198 (
"Triggers graphical database post-processing for viewers"
2199 "\nusing that technique.");
2200 fpCommand -> SetGuidance
2201 (
"For such viewers the view only becomes visible with this command."
2202 "\nBy default, acts on current viewer. \"/vis/viewer/list\""
2203 "\nto see possible viewers. Viewer becomes current.");
2204 fpCommand -> SetParameterName (
"viewer-name",
2206 currentAsDefault =
true);
2216 return viewer -> GetName ();
2233 "WARNING: command \"/vis/viewer/update\" could not be applied: no current viewer."
2240 if (!sceneHandler) {
2242 G4warn <<
"ERROR: Viewer \"" << updateName <<
"\"" <<
2243 " has no scene handler - report serious bug."
2252 G4cout <<
"NOTE: SceneHandler \"" << sceneHandler->
GetName()
2253 <<
"\", to which viewer \"" << updateName <<
"\"" <<
2254 "\n is attached, has no scene - \"/vis/scene/create\" and"
2255 " \"/vis/sceneHandler/attach\""
2256 "\n (or use compound command \"/vis/drawVolume\")."
2263 G4cout <<
"Viewer \"" << viewer -> GetName () <<
"\"";
2266 viewer -> ShowView ();
2268 sceneHandler -> SetMarkForClearingTransientStore(
true);
2274 fZoomMultiplier (1.),
2277 G4bool omitable, currentAsDefault;
2280 (
"/vis/viewer/zoom",
this);
2281 fpCommandZoom -> SetGuidance (
"Incremental zoom.");
2282 fpCommandZoom -> SetGuidance
2283 (
"Multiplies current magnification by this factor.");
2284 fpCommandZoom -> SetParameterName(
"multiplier",
2286 currentAsDefault=
true);
2289 (
"/vis/viewer/zoomTo",
this);
2290 fpCommandZoomTo -> SetGuidance (
"Absolute zoom.");
2291 fpCommandZoomTo -> SetGuidance
2292 (
"Magnifies standard magnification by this factor.");
2293 fpCommandZoomTo -> SetParameterName(
"factor",
2295 currentAsDefault=
true);
2299 delete fpCommandZoom;
2300 delete fpCommandZoomTo;
2305 if (command == fpCommandZoom) {
2308 else if (command == fpCommandZoomTo) {
2311 return currentValue;
2321 if (!currentViewer) {
2324 "ERROR: G4VisCommandsViewerZoom::SetNewValue: no current viewer."
2332 if (command == fpCommandZoom) {
2336 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
G4SceneTreeItem & AccessSceneTree()
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 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)
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 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
G4VSceneHandler * GetCurrentSceneHandler() const
static Verbosity GetVerbosity()
void ResetTransientsDrawnFlags()
const G4String & GetDefaultXGeometryString() const
void SetVerboseLevel(G4int)
static Verbosity GetVerbosityValue(const G4String &)