87 fpCommand =
new G4UIcommand(
"/vis/scene/add/arrow",
this);
88 fpCommand -> SetGuidance (
"Adds arrow to current scene.");
92 fpCommand -> SetParameter (parameter);
94 fpCommand -> SetParameter (parameter);
96 fpCommand -> SetParameter (parameter);
98 fpCommand -> SetParameter (parameter);
100 fpCommand -> SetParameter (parameter);
102 fpCommand -> SetParameter (parameter);
103 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
124 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
131 std::istringstream is(newValue);
132 is >> x1 >> y1 >> z1 >> x2 >> y2 >> z2 >> unitString;
134 x1 *= unit; y1 *= unit; z1 *= unit;
135 x2 *= unit; y2 *= unit; z2 *= unit;
143 (x1, y1, z1, x2, y2, z2,
147 const G4String& currentSceneName = pScene -> GetName ();
148 G4bool successful = pScene -> AddRunDurationModel (model, warn);
151 G4cout <<
"Arrow has been added to scene \""
152 << currentSceneName <<
"\"."
164 fpCommand =
new G4UIcommand(
"/vis/scene/add/arrow2D",
this);
165 fpCommand -> SetGuidance (
"Adds 2D arrow to current scene.");
169 fpCommand -> SetParameter (parameter);
171 fpCommand -> SetParameter (parameter);
173 fpCommand -> SetParameter (parameter);
175 fpCommand -> SetParameter (parameter);
194 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
200 std::istringstream is(newValue);
201 is >> x1 >> y1 >> x2 >> y2;
203 Arrow2D* arrow2D =
new Arrow2D
210 const G4String& currentSceneName = pScene -> GetName ();
211 G4bool successful = pScene -> AddRunDurationModel (model, warn);
214 G4cout <<
"A 2D arrow has been added to scene \""
215 << currentSceneName <<
"\"."
224G4VisCommandSceneAddArrow2D::Arrow2D::Arrow2D
228 fWidth(width), fColour(colour)
230 fShaftPolyline.push_back(
G4Point3D(x1,y1,0));
231 fShaftPolyline.push_back(
G4Point3D(x2,y2,0));
233 G4Vector3D arrowPointLeftDirection(arrowDirection);
234 arrowPointLeftDirection.rotateZ(150.*deg);
235 G4Vector3D arrowPointRightDirection(arrowDirection);
236 arrowPointRightDirection.rotateZ(-150.*deg);
237 fHeadPolyline.push_back(
G4Point3D(x2,y2,0)+0.04*arrowPointLeftDirection);
238 fHeadPolyline.push_back(
G4Point3D(x2,y2,0));
239 fHeadPolyline.push_back(
G4Point3D(x2,y2,0)+0.04*arrowPointRightDirection);
243 fShaftPolyline.SetVisAttributes(va);
244 fHeadPolyline.SetVisAttributes(va);
247void G4VisCommandSceneAddArrow2D::Arrow2D::operator()
250 sceneHandler.BeginPrimitives2D();
251 sceneHandler.AddPrimitive(fShaftPolyline);
252 sceneHandler.AddPrimitive(fHeadPolyline);
253 sceneHandler.EndPrimitives2D();
260 fpCommand =
new G4UIcommand (
"/vis/scene/add/axes",
this);
261 fpCommand -> SetGuidance (
"Add axes.");
262 fpCommand -> SetGuidance
263 (
"Draws axes at (x0, y0, z0) of given length and colour.");
264 fpCommand -> SetGuidance
265 (
"If \"colour-string\" is \"auto\", x, y and z will be red, green and blue"
266 "\n respectively. Otherwise it can be one of the pre-defined text-specified"
267 "\n colours - see information printed by the vis manager at start-up or"
268 "\n use \"/vis/list\".");
269 fpCommand -> SetGuidance
270 (
"If \"length\" is negative, it is set to about 25% of scene extent.");
271 fpCommand -> SetGuidance
272 (
"If \"showtext\" is false, annotations are suppressed.");
283 parameter =
new G4UIparameter (
"length",
'd', omitable =
true);
286 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
289 parameter =
new G4UIparameter (
"colour-string",
's', omitable =
true);
292 parameter =
new G4UIparameter (
"showtext",
'b', omitable =
true);
313 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
320 <<
"ERROR: Scene has no extent. Add volumes or use \"/vis/scene/add/extent\"."
327 G4String unitString, colourString, showTextString;
329 std::istringstream is (newValue);
330 is >> x0 >> y0 >> z0 >> length >> unitString
331 >> colourString >> showTextString;
336 x0 *= unit; y0 *= unit; z0 *= unit;
340 const G4double intLog10Length = std::floor(std::log10(lengthMax));
341 length = std::pow(10,intLog10Length);
342 if (5.*length < lengthMax) length *= 5.;
343 else if (2.*length < lengthMax) length *= 2.;
352 if (arrowWidth > length/50.) arrowWidth = length/50.;
355 (x0, y0, z0, length, arrowWidth, colourString, newValue,
358 G4bool successful = pScene -> AddRunDurationModel (model, warn);
359 const G4String& currentSceneName = pScene -> GetName ();
363 <<
"have been added to scene \"" << currentSceneName <<
"\"."
376 fpCommand =
new G4UIcommand (
"/vis/scene/add/date",
this);
377 fpCommand -> SetGuidance (
"Adds date to current scene.");
378 fpCommand -> SetGuidance
379 (
"If \"date\"is omitted, the current date and time is drawn."
380 "\nOtherwise, the string, including the rest of the line, is drawn.");
382 parameter =
new G4UIparameter (
"size",
'i', omitable =
true);
383 parameter -> SetGuidance (
"Screen size of text in pixels.");
384 parameter -> SetDefaultValue (18);
385 fpCommand -> SetParameter (parameter);
386 parameter =
new G4UIparameter (
"x-position",
'd', omitable =
true);
387 parameter -> SetGuidance (
"x screen position in range -1 < x < 1.");
388 parameter -> SetDefaultValue (0.95);
389 fpCommand -> SetParameter (parameter);
390 parameter =
new G4UIparameter (
"y-position",
'd', omitable =
true);
391 parameter -> SetGuidance (
"y screen position in range -1 < y < 1.");
392 parameter -> SetDefaultValue (0.9);
393 fpCommand -> SetParameter (parameter);
394 parameter =
new G4UIparameter (
"layout",
's', omitable =
true);
395 parameter -> SetGuidance (
"Layout, i.e., adjustment: left|centre|right.");
396 parameter -> SetDefaultValue (
"right");
397 fpCommand -> SetParameter (parameter);
398 parameter =
new G4UIparameter (
"date",
's', omitable =
true);
399 parameter -> SetDefaultValue (
"-");
400 fpCommand -> SetParameter (parameter);
419 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
427 std::istringstream is(newValue);
428 is >> size >> x >> y >> layoutString >> dateString;
430 const size_t NREMAINDER = 100;
431 char remainder[NREMAINDER];
433 is.getline(remainder, NREMAINDER);
434 dateString += remainder;
440 Date* date =
new Date(
fpVisManager, size, x, y, layout, dateString);
446 const G4String& currentSceneName = pScene -> GetName ();
447 G4bool successful = pScene -> AddRunDurationModel (model, warn);
450 G4cout <<
"Date has been added to scene \""
451 << currentSceneName <<
"\"."
460void G4VisCommandSceneAddDate::Date::operator()
465 time = fTimer.GetClockTime();
470 std::string::size_type i = time.rfind(
'\n');
471 if (i != std::string::npos) time.erase(i);
473 text.SetScreenSize(fSize);
474 text.SetLayout(fLayout);
476 text.SetVisAttributes(textAtts);
477 sceneHandler.BeginPrimitives2D();
478 sceneHandler.AddPrimitive(text);
479 sceneHandler.EndPrimitives2D();
486 fpCommand -> SetGuidance (
"Adds digis to current scene.");
487 fpCommand -> SetGuidance
488 (
"Digis are drawn at end of event when the scene in which"
489 "\nthey are added is current.");
508 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
514 const G4String& currentSceneName = pScene -> GetName ();
515 G4bool successful = pScene -> AddEndOfEventModel (model, warn);
518 G4cout <<
"Digis, if any, will be drawn at end of run in scene \""
519 << currentSceneName <<
"\"."
532 fpCommand =
new G4UIcommand (
"/vis/scene/add/electricField",
this);
533 fpCommand -> SetGuidance
534 (
"Adds electric field representation to current scene.");
535 fpCommand -> SetGuidance
536 (
"The first parameter is no. of data points per half scene. So, possibly, at"
537 "\nmaximum, the number of data points sampled is (2*n+1)^3, which can grow"
538 "\nlarge--be warned!"
539 "\nThe default value is 10, i.e., a 21x21x21 array, i.e., 9,261 sampling points."
540 "\nThat may swamp you scene, but usually, a field is limited to a small part of"
541 "\nthe scene, so it's not a problem. But if it is, here are some of the things"
543 "\n- reduce the number of data points per half scene (first parameter);"
544 "\n- specify \"lightArrow\" (second parameter);"
545 "\n- restrict the region sampled with \"/vis/set/extentForField\";"
546 "\n- restrict the drawing to a specific volume with"
547 "\n \"/vis/set/volumeForField\" or \"/vis/touchable/volumeForField\"."
548 "\nNote: you may have to deactivate existing field models with"
549 "\n \"/vis/scene/activateModel Field false\" and re-issue"
550 "\n \"/vis/scene/add/...Field\" command again.");
551 fpCommand -> SetGuidance
552 (
"In the arrow representation, the length of the arrow is proportional"
553 "\nto the magnitude of the field and the colour is mapped onto the range"
554 "\nas a fraction of the maximum magnitude: 0->0.5->1 is red->green->blue.");
556 parameter =
new G4UIparameter (
"nDataPointsPerHalfScene",
'i', omitable =
true);
557 parameter -> SetDefaultValue (10);
558 fpCommand -> SetParameter (parameter);
559 parameter =
new G4UIparameter (
"representation",
's', omitable =
true);
560 parameter -> SetParameterCandidates(
"fullArrow lightArrow");
561 parameter -> SetDefaultValue (
"fullArrow");
562 fpCommand -> SetParameter (parameter);
582 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
587 G4int nDataPointsPerHalfScene;
589 std::istringstream iss(newValue);
590 iss >> nDataPointsPerHalfScene >> representation;
593 if (representation ==
"lightArrow") {
598 (nDataPointsPerHalfScene,modelRepresentation,
602 const G4String& currentSceneName = pScene -> GetName ();
603 G4bool successful = pScene -> AddRunDurationModel (model, warn);
607 <<
"Electric field, if any, will be drawn in scene \""
610 << nDataPointsPerHalfScene
611 <<
" data points per half scene and with representation \""
626 fpCommand =
new G4UIcommand (
"/vis/scene/add/eventID",
this);
627 fpCommand -> SetGuidance (
"Adds eventID to current scene.");
628 fpCommand -> SetGuidance
629 (
"Run and event numbers are drawn at end of event or run when"
630 "\n the scene in which they are added is current.");
632 parameter =
new G4UIparameter (
"size",
'i', omitable =
true);
633 parameter -> SetGuidance (
"Screen size of text in pixels.");
634 parameter -> SetDefaultValue (18);
635 fpCommand -> SetParameter (parameter);
636 parameter =
new G4UIparameter (
"x-position",
'd', omitable =
true);
637 parameter -> SetGuidance (
"x screen position in range -1 < x < 1.");
638 parameter -> SetDefaultValue (-0.95);
639 fpCommand -> SetParameter (parameter);
640 parameter =
new G4UIparameter (
"y-position",
'd', omitable =
true);
641 parameter -> SetGuidance (
"y screen position in range -1 < y < 1.");
642 parameter -> SetDefaultValue (0.9);
643 fpCommand -> SetParameter (parameter);
644 parameter =
new G4UIparameter (
"layout",
's', omitable =
true);
645 parameter -> SetGuidance (
"Layout, i.e., adjustment: left|centre|right.");
646 parameter -> SetDefaultValue (
"left");
647 fpCommand -> SetParameter (parameter);
666 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
674 std::istringstream is(newValue);
675 is >> size >> x >> y >> layoutString;
684 =
new EventID(forEndOfEvent,
fpVisManager, size, x, y, layout);
687 eoeModel->
SetType(
"EoEEventID");
690 G4bool successfulEoE = pScene -> AddEndOfEventModel (eoeModel, warn);
694 =
new EventID(forEndOfRun,
fpVisManager, size, x, y, layout);
697 eorModel->
SetType(
"EoREventID");
700 G4bool successfulEoR = pScene -> AddEndOfRunModel (eorModel, warn);
702 if (successfulEoE && successfulEoR) {
704 const G4String& currentSceneName = pScene -> GetName ();
705 G4cout <<
"EventID has been added to scene \""
706 << currentSceneName <<
"\"."
715void G4VisCommandSceneAddEventID::EventID::operator()
723 if (!currentRun)
return;
727 std::ostringstream oss;
732 if (!fpVisManager->GetReviewingKeptEvents())
return;
733 const G4Event* currentEvent = mp->GetEvent();
734 if (!currentEvent)
return;
736 oss <<
"Run " << currentRunID <<
" Event " << eventID;
742 if (fpVisManager->GetReviewingKeptEvents())
return;
745 size_t nKeptEvents = events? events->size(): 0;
746 oss <<
"Run " << currentRunID <<
" (" << nEvents <<
" event";
747 if (nEvents != 1) oss <<
's';
748 oss <<
", " << nKeptEvents <<
" kept)";
756 text.SetScreenSize(fSize);
757 text.SetLayout(fLayout);
759 text.SetVisAttributes(textAtts);
760 sceneHandler.BeginPrimitives2D();
761 sceneHandler.AddPrimitive(text);
762 sceneHandler.EndPrimitives2D();
768 fpCommand =
new G4UIcommand(
"/vis/scene/add/extent",
this);
769 fpCommand -> SetGuidance
770 (
"Adds a dummy model with given extent to the current scene."
771 "\nRequires the limits: xmin, xmax, ymin, ymax, zmin, zmax unit."
772 "\nThis can be used to provide an extent to the scene even if"
773 "\nno other models with extent are available. For example,"
774 "\neven if there is no geometry. In that case, for example:"
776 "\n /vis/scene/create"
777 "\n /vis/scene/add/extent -300 300 -300 300 -300 300 cm"
778 "\n /vis/sceneHandler/attach");
781 parameter =
new G4UIparameter (
"xmin",
'd', omitable =
true);
782 parameter -> SetDefaultValue (0.);
783 fpCommand -> SetParameter (parameter);
784 parameter =
new G4UIparameter (
"xmax",
'd', omitable =
true);
785 parameter -> SetDefaultValue (0.);
786 fpCommand -> SetParameter (parameter);
787 parameter =
new G4UIparameter (
"ymin",
'd', omitable =
true);
788 parameter -> SetDefaultValue (0.);
789 fpCommand -> SetParameter (parameter);
790 parameter =
new G4UIparameter (
"ymax",
'd', omitable =
true);
791 parameter -> SetDefaultValue (0.);
792 fpCommand -> SetParameter (parameter);
793 parameter =
new G4UIparameter (
"zmin",
'd', omitable =
true);
794 parameter -> SetDefaultValue (0.);
795 fpCommand -> SetParameter (parameter);
796 parameter =
new G4UIparameter (
"zmax",
'd', omitable =
true);
797 parameter -> SetDefaultValue (0.);
798 fpCommand -> SetParameter (parameter);
799 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
800 parameter -> SetDefaultValue (
"m");
801 fpCommand -> SetParameter (parameter);
820 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
825 G4double xmin, xmax, ymin, ymax, zmin, zmax;
827 std::istringstream is(newValue);
828 is >> xmin >> xmax >> ymin >> ymax >> zmin >> zmax >> unitString;
830 xmin *= unit; xmax *= unit;
831 ymin *= unit; ymax *= unit;
832 zmin *= unit; zmax *= unit;
834 G4VisExtent visExtent(xmin, xmax, ymin, ymax, zmin, zmax);
835 Extent* extent =
new Extent(xmin, xmax, ymin, ymax, zmin, zmax);
842 const G4String& currentSceneName = pScene -> GetName ();
843 G4bool successful = pScene -> AddRunDurationModel (model, warn);
846 G4cout <<
"A benign model with extent "
848 <<
" has been added to scene \""
849 << currentSceneName <<
"\"."
858G4VisCommandSceneAddExtent::Extent::Extent
862fExtent(xmin,xmax,ymin,ymax,zmin,zmax)
865void G4VisCommandSceneAddExtent::Extent::operator()
872 fpCommand =
new G4UIcommand(
"/vis/scene/add/frame",
this);
873 fpCommand -> SetGuidance (
"Add frame to current scene.");
876 parameter =
new G4UIparameter (
"size",
'd', omitable =
true);
877 parameter -> SetGuidance (
"Size of frame. 1 = full window.");
878 parameter -> SetParameterRange (
"size > 0 && size <=1");
879 parameter -> SetDefaultValue (0.97);
880 fpCommand -> SetParameter (parameter);
899 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
905 std::istringstream is(newValue);
914 const G4String& currentSceneName = pScene -> GetName ();
915 G4bool successful = pScene -> AddRunDurationModel (model, warn);
918 G4cout <<
"Frame has been added to scene \""
919 << currentSceneName <<
"\"."
928void G4VisCommandSceneAddFrame::Frame::operator()
932 frame.push_back(
G4Point3D( fSize, fSize, 0.));
933 frame.push_back(
G4Point3D(-fSize, fSize, 0.));
934 frame.push_back(
G4Point3D(-fSize, -fSize, 0.));
935 frame.push_back(
G4Point3D( fSize, -fSize, 0.));
936 frame.push_back(
G4Point3D( fSize, fSize, 0.));
941 sceneHandler.BeginPrimitives2D();
942 sceneHandler.AddPrimitive(frame);
943 sceneHandler.EndPrimitives2D();
951 fpCommand =
new G4UIcommand (
"/vis/scene/add/gps",
this);
952 fpCommand -> SetGuidance
953 (
"A representation of the source(s) of the General Particle Source"
954 "\nwill be added to current scene and drawn, if applicable.");
956 fpCommand->
SetGuidance(
"Default: red and transparent.");
957 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
958 parameter -> SetDefaultValue (
"1.");
959 fpCommand -> SetParameter (parameter);
960 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
961 parameter -> SetDefaultValue (0.);
962 fpCommand -> SetParameter (parameter);
963 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
964 parameter -> SetDefaultValue (0.);
965 fpCommand -> SetParameter (parameter);
966 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
967 parameter -> SetDefaultValue (0.3);
968 fpCommand -> SetParameter (parameter);
987 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
994 std::istringstream iss(newValue);
995 iss >> redOrString >> green >> blue >> opacity;
1000 const G4String& currentSceneName = pScene -> GetName ();
1001 G4bool successful = pScene -> AddRunDurationModel (model, warn);
1005 "A representation of the source(s) of the General Particle Source will be drawn"
1006 "\n in colour " << colour <<
" for scene \""
1007 << currentSceneName <<
"\" if applicable."
1020 fpCommand -> SetGuidance (
"Adds hits to current scene.");
1021 fpCommand -> SetGuidance
1022 (
"Hits are drawn at end of event when the scene in which"
1023 "\nthey are added is current.");
1042 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
1048 const G4String& currentSceneName = pScene -> GetName ();
1049 G4bool successful = pScene -> AddEndOfEventModel (model, warn);
1052 G4cout <<
"Hits, if any, will be drawn at end of run in scene \""
1053 << currentSceneName <<
"\"."
1065 fpCommand =
new G4UIcommand(
"/vis/scene/add/line",
this);
1066 fpCommand -> SetGuidance (
"Adds line to current scene.");
1069 parameter =
new G4UIparameter (
"x1",
'd', omitable =
false);
1070 fpCommand -> SetParameter (parameter);
1071 parameter =
new G4UIparameter (
"y1",
'd', omitable =
false);
1072 fpCommand -> SetParameter (parameter);
1073 parameter =
new G4UIparameter (
"z1",
'd', omitable =
false);
1074 fpCommand -> SetParameter (parameter);
1075 parameter =
new G4UIparameter (
"x2",
'd', omitable =
false);
1076 fpCommand -> SetParameter (parameter);
1077 parameter =
new G4UIparameter (
"y2",
'd', omitable =
false);
1078 fpCommand -> SetParameter (parameter);
1079 parameter =
new G4UIparameter (
"z2",
'd', omitable =
false);
1080 fpCommand -> SetParameter (parameter);
1081 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1102 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
1109 std::istringstream is(newValue);
1110 is >> x1 >> y1 >> z1 >> x2 >> y2 >> z2 >> unitString;
1112 x1 *= unit; y1 *= unit; z1 *= unit;
1113 x2 *= unit; y2 *= unit; z2 *= unit;
1115 Line* line =
new Line(x1, y1, z1, x2, y2, z2,
1122 const G4String& currentSceneName = pScene -> GetName ();
1123 G4bool successful = pScene -> AddRunDurationModel (model, warn);
1126 G4cout <<
"Line has been added to scene \""
1127 << currentSceneName <<
"\"."
1136G4VisCommandSceneAddLine::Line::Line
1140 fWidth(width), fColour(colour)
1142 fPolyline.push_back(
G4Point3D(x1,y1,z1));
1143 fPolyline.push_back(
G4Point3D(x2,y2,z2));
1147 fPolyline.SetVisAttributes(va);
1150void G4VisCommandSceneAddLine::Line::operator()
1153 sceneHandler.BeginPrimitives();
1154 sceneHandler.AddPrimitive(fPolyline);
1155 sceneHandler.EndPrimitives();
1161 fpCommand =
new G4UIcommand(
"/vis/scene/add/line2D",
this);
1162 fpCommand -> SetGuidance (
"Adds 2D line to current scene.");
1165 parameter =
new G4UIparameter (
"x1",
'd', omitable =
false);
1166 fpCommand -> SetParameter (parameter);
1167 parameter =
new G4UIparameter (
"y1",
'd', omitable =
false);
1168 fpCommand -> SetParameter (parameter);
1169 parameter =
new G4UIparameter (
"x2",
'd', omitable =
false);
1170 fpCommand -> SetParameter (parameter);
1171 parameter =
new G4UIparameter (
"y2",
'd', omitable =
false);
1172 fpCommand -> SetParameter (parameter);
1191 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
1197 std::istringstream is(newValue);
1198 is >> x1 >> y1 >> x2 >> y2;
1200 Line2D* line2D =
new Line2D
1207 const G4String& currentSceneName = pScene -> GetName ();
1208 G4bool successful = pScene -> AddRunDurationModel (model, warn);
1211 G4cout <<
"A 2D line has been added to scene \""
1212 << currentSceneName <<
"\"."
1221G4VisCommandSceneAddLine2D::Line2D::Line2D
1225 fWidth(width), fColour(colour)
1227 fPolyline.push_back(
G4Point3D(x1,y1,0));
1228 fPolyline.push_back(
G4Point3D(x2,y2,0));
1232 fPolyline.SetVisAttributes(va);
1235void G4VisCommandSceneAddLine2D::Line2D::operator()
1238 sceneHandler.BeginPrimitives2D();
1239 sceneHandler.AddPrimitive(fPolyline);
1240 sceneHandler.EndPrimitives2D();
1247 fpCommand =
new G4UIcommand (
"/vis/scene/add/logicalVolume",
this);
1248 fpCommand -> SetGuidance (
"Adds a logical volume to the current scene,");
1249 fpCommand -> SetGuidance
1250 (
"Shows boolean components (if any), voxels (if any), readout geometry"
1251 "\n (if any), local axes and overlaps (if any), under control of the"
1252 "\n appropriate flag."
1253 "\n Note: voxels are not constructed until start of run -"
1254 "\n \"/run/beamOn\". (For voxels without a run, \"/run/beamOn 0\".)");
1256 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
false);
1257 fpCommand -> SetParameter (parameter);
1258 parameter =
new G4UIparameter (
"depth-of-descent",
'i', omitable =
true);
1259 parameter -> SetGuidance (
"Depth of descent of geometry hierarchy.");
1260 parameter -> SetDefaultValue (1);
1261 fpCommand -> SetParameter (parameter);
1262 parameter =
new G4UIparameter (
"booleans-flag",
'b', omitable =
true);
1263 parameter -> SetDefaultValue (
true);
1264 fpCommand -> SetParameter (parameter);
1265 parameter =
new G4UIparameter (
"voxels-flag",
'b', omitable =
true);
1266 parameter -> SetDefaultValue (
true);
1267 fpCommand -> SetParameter (parameter);
1268 parameter =
new G4UIparameter (
"readout-flag",
'b', omitable =
true);
1269 parameter -> SetDefaultValue (
true);
1270 fpCommand -> SetParameter (parameter);
1271 parameter =
new G4UIparameter (
"axes-flag",
'b', omitable =
true);
1272 parameter -> SetDefaultValue (
true);
1273 parameter -> SetGuidance (
"Set \"false\" to suppress axes.");
1274 fpCommand -> SetParameter (parameter);
1275 parameter =
new G4UIparameter(
"check-overlap-flag",
'b', omitable =
true);
1277 parameter -> SetGuidance (
"Set \"false\" to suppress overlap check.");
1298 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
1304 G4int requestedDepthOfDescent;
1305 G4String booleansString, voxelsString, readoutString, axesString;
1307 std::istringstream is (newValue);
1308 is >> name >> requestedDepthOfDescent
1309 >> booleansString >> voxelsString >> readoutString >> axesString
1318 int nLV = pLVStore -> size ();
1321 for (iLV = 0; iLV < nLV; iLV++ ) {
1322 pLV = (*pLVStore) [iLV];
1323 if (pLV -> GetName () == name)
break;
1327 G4cerr <<
"ERROR: Logical volume " << name
1328 <<
" not found in logical volume store." <<
G4endl;
1333 const std::vector<G4Scene::Model>& rdModelList =
1334 pScene -> GetRunDurationModelList();
1335 std::vector<G4Scene::Model>::const_iterator i;
1336 for (i = rdModelList.begin(); i != rdModelList.end(); ++i) {
1337 if (i->fpModel->GetGlobalDescription().find(
"Volume") != std::string::npos)
break;
1339 if (i != rdModelList.end()) {
1341 G4cout <<
"There is already a volume, \""
1342 << i->fpModel->GetGlobalDescription()
1343 <<
"\",\n in the run-duration model list of scene \""
1344 << pScene -> GetName()
1345 <<
"\".\n Your logical volume must be the only volume in the scene."
1346 <<
"\n Create a new scene and try again:"
1347 <<
"\n /vis/specify " << name
1349 <<
"\n /vis/scene/create"
1350 <<
"\n /vis/scene/add/logicalVolume " << name
1351 <<
"\n /vis/sceneHandler/attach"
1352 <<
"\n (and also, if necessary, /vis/viewer/flush)"
1359 (pLV, requestedDepthOfDescent, booleans, voxels, readout, checkOverlaps);
1360 const G4String& currentSceneName = pScene -> GetName ();
1361 G4bool successful = pScene -> AddRunDurationModel (model, warn);
1365 G4bool axesSuccessful =
false;
1368 const G4double axisLengthMax = radius / 2.;
1369 const G4double intLog10Length = std::floor(std::log10(axisLengthMax));
1370 G4double axisLength = std::pow(10,intLog10Length);
1371 if (5.*axisLength < axisLengthMax) axisLength *= 5.;
1372 else if (2.*axisLength < axisLengthMax) axisLength *= 2.;
1373 const G4double axisWidth = axisLength / 20.;
1375 axesSuccessful = pScene -> AddRunDurationModel (axesModel, warn);
1386 G4cout <<
"Logical volume \"" << pLV -> GetName ()
1387 <<
"\" with requested depth of descent "
1388 << requestedDepthOfDescent
1390 if (!booleans)
G4cout <<
"out";
1391 G4cout <<
" boolean components, with";
1392 if (!voxels)
G4cout <<
"out";
1393 G4cout <<
" voxels,\n with";
1394 if (!readout)
G4cout <<
"out";
1395 G4cout <<
" readout geometry and with";
1396 if (!checkOverlaps)
G4cout <<
"out";
1397 G4cout <<
" overlap checking"
1398 <<
"\n has been added to scene \"" << currentSceneName <<
"\".";
1400 if (axesSuccessful) {
1402 "\n Axes have also been added at the origin of local cooordinates.";
1405 "\n Axes have not been added for some reason possibly stated above.";
1424 fpCommand =
new G4UIcommand (
"/vis/scene/add/logo",
this);
1425 fpCommand -> SetGuidance (
"Adds a G4 logo to the current scene.");
1426 fpCommand -> SetGuidance
1427 (
"If \"unit\" is \"auto\", height is roughly one tenth of scene extent.");
1428 fpCommand -> SetGuidance
1429 (
"\"direction\" is that of outward-facing normal to front face of logo."
1430 "\nIf \"direction\" is \"auto\", logo faces the user in the current viewer.");
1431 fpCommand -> SetGuidance
1432 (
"\nIf \"placement\" is \"auto\", logo is placed at bottom right of screen"
1433 "\n when viewed from logo direction.");
1435 parameter =
new G4UIparameter (
"height",
'd', omitable =
true);
1438 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1441 parameter =
new G4UIparameter (
"direction",
's', omitable =
true);
1445 parameter =
new G4UIparameter (
"red",
'd', omitable =
true);
1448 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
1451 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
1454 parameter =
new G4UIparameter (
"placement",
's', omitable =
true);
1455 parameter -> SetParameterCandidates(
"auto manual");
1458 parameter =
new G4UIparameter (
"xmid",
'd', omitable =
true);
1461 parameter =
new G4UIparameter (
"ymid",
'd', omitable =
true);
1464 parameter =
new G4UIparameter (
"zmid",
'd', omitable =
true);
1467 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
1488 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
1495 <<
"ERROR: Scene has no extent. Add volumes or use \"/vis/scene/add/extent\"."
1506 "ERROR: G4VisCommandSceneAddLogo::SetNewValue: no viewer."
1507 "\n Auto direction needs a viewer."
1513 G4double userHeight, red, green, blue, xmid, ymid, zmid;
1514 G4String userHeightUnit, direction, auto_manual, positionUnit;
1515 std::istringstream is (newValue);
1516 is >> userHeight >> userHeightUnit >> direction
1517 >> red >> green >> blue
1519 >> xmid >> ymid >> zmid >> positionUnit;
1523 if (userHeightUnit ==
"auto") {
1530 xmid *= unit; ymid *= unit; zmid *= unit;
1532 Direction logoDirection = X;
1533 if (direction ==
"auto") {
1537 if (vp.
x() > vp.
y() && vp.
x() > vp.
z()) logoDirection = X;
1538 else if (vp.
x() < vp.
y() && vp.
x() < vp.
z()) logoDirection = minusX;
1539 else if (vp.
y() > vp.
x() && vp.
y() > vp.
z()) logoDirection = Y;
1540 else if (vp.
y() < vp.
x() && vp.
y() < vp.
z()) logoDirection = minusY;
1541 else if (vp.
z() > vp.
x() && vp.
z() > vp.
y()) logoDirection = Z;
1542 else if (vp.
z() < vp.
x() && vp.
z() < vp.
y()) logoDirection = minusZ;
1544 else if (direction(0) ==
'x') logoDirection = X;
1545 else if (direction(0) ==
'y') logoDirection = Y;
1546 else if (direction(0) ==
'z') logoDirection = Z;
1547 else if (direction(0) ==
'-') {
1548 if (direction(1) ==
'x') logoDirection = minusX;
1549 else if (direction(1) ==
'y') logoDirection = minusY;
1550 else if (direction(1) ==
'z') logoDirection = minusZ;
1553 G4cerr <<
"ERROR: Unrecogniseed direction: \""
1554 << direction <<
"\"." <<
G4endl;
1559 G4bool autoPlacing =
false;
if (auto_manual ==
"auto") autoPlacing =
true;
1576 "WARNING: Existing scene does not yet have any extent."
1577 "\n Maybe you have not yet added any geometrical object."
1583 const G4double halfHeight(height / 2.);
1585 const G4double freeHeightFraction (1. + 2. * comfort);
1589 switch (logoDirection) {
1592 if (freeHeightFraction * (xmax - xmin) < height) room =
false;
1596 if (freeHeightFraction * (ymax - ymin) < height) room =
false;
1600 if (freeHeightFraction * (zmax - zmin) < height) room =
false;
1607 "WARNING: Not enough room in existing scene. Maybe logo is too large."
1614 "WARNING: The logo you have asked for is bigger than the existing"
1615 "\n scene. Maybe you have added it too soon. It is recommended that"
1616 "\n you add the logo last so that it can be correctly auto-positioned"
1617 "\n so as not to be obscured by any existing object and so that the"
1618 "\n view parameters can be correctly recalculated."
1623 G4double sxmid(xmid), symid(ymid), szmid(zmid);
1627 const G4double xComfort = comfort * (xmax - xmin);
1628 const G4double yComfort = comfort * (ymax - ymin);
1629 const G4double zComfort = comfort * (zmax - zmin);
1630 switch (logoDirection) {
1632 sxmid = xmax + halfHeight + xComfort;
1633 symid = ymin - yComfort;
1634 szmid = zmin - zComfort;
1637 sxmid = xmin - halfHeight - xComfort;
1638 symid = ymin - yComfort;
1639 szmid = zmax + zComfort;
1642 sxmid = xmin - xComfort;
1643 symid = ymax + halfHeight + yComfort;
1644 szmid = zmin - zComfort;
1647 sxmid = xmax + xComfort;
1648 symid = ymin - halfHeight - yComfort;
1649 szmid = zmin - zComfort;
1652 sxmid = xmax + xComfort;
1653 symid = ymin - yComfort;
1654 szmid = zmax + halfHeight + zComfort;
1657 sxmid = xmin - xComfort;
1658 symid = ymin - yComfort;
1659 szmid = zmin - halfHeight - zComfort;
1665 switch (logoDirection) {
1690 G4Logo* logo =
new G4Logo(height,visAtts);
1705 const G4String& currentSceneName = pScene -> GetName ();
1706 G4bool successful = pScene -> AddRunDurationModel (model, warn);
1709 G4cout <<
"G4 Logo of height " << userHeight <<
' ' << userHeightUnit
1710 <<
", " << direction <<
"-direction, added to scene \""
1711 << currentSceneName <<
"\"";
1713 G4cout <<
"\n with extent " << extent
1725G4VisCommandSceneAddLogo::G4Logo::G4Logo
1741 const G4double xb = -h2, yb = f2 + w;
1742 const G4double dx = xt - xb, dy = yt - yb;
1743 const G4double angle = std::atan2(dy,dx);
1746 const G4double d = std::sqrt(dx * dx + dy * dy);
1749 const G4double x8 = ((-ss * d - dx * (yt - y8)) / dy) + xt;
1751 G4double x9 = ((-(ss - w) * d - dx * (yt - y8)) / dy) + xt;
1753 const G4double xtr = ss - f1, ytr = -ss - f2 -w;
1754 x9 += xtr; y9 += ytr;
1768 G4Tubs tG(
"tG",ri,ro,d2,0.15*pi,1.85*pi);
1769 G4Box bG(
"bG",w2,ro2,d2);
1771 fpG = logoG.CreatePolyhedron();
1772 fpG->SetVisAttributes(&fVisAtts);
1776 G4Box b1(
"b1",h2,h2,d2);
1777 G4Box bS(
"bS",ss,ss,d2+e);
1778 G4Box bS2(
"bS2",ss,ss,d2+2.*e);
1787 fp4 = logo4.CreatePolyhedron();
1796 fp4->SetVisAttributes(&fVisAtts);
1800G4VisCommandSceneAddLogo::G4Logo::~G4Logo() {
1805void G4VisCommandSceneAddLogo::G4Logo::operator()
1807 sceneHandler.BeginPrimitives(transform);
1808 sceneHandler.AddPrimitive(*fpG);
1809 sceneHandler.AddPrimitive(*fp4);
1810 sceneHandler.EndPrimitives();
1817 fpCommand =
new G4UIcommand (
"/vis/scene/add/logo2D",
this);
1818 fpCommand -> SetGuidance (
"Adds 2D logo to current scene.");
1820 parameter =
new G4UIparameter (
"size",
'i', omitable =
true);
1821 parameter -> SetGuidance (
"Screen size of text in pixels.");
1822 parameter -> SetDefaultValue (48);
1823 fpCommand -> SetParameter (parameter);
1824 parameter =
new G4UIparameter (
"x-position",
'd', omitable =
true);
1825 parameter -> SetGuidance (
"x screen position in range -1 < x < 1.");
1826 parameter -> SetDefaultValue (-0.9);
1827 fpCommand -> SetParameter (parameter);
1828 parameter =
new G4UIparameter (
"y-position",
'd', omitable =
true);
1829 parameter -> SetGuidance (
"y screen position in range -1 < y < 1.");
1830 parameter -> SetDefaultValue (-0.9);
1831 fpCommand -> SetParameter (parameter);
1832 parameter =
new G4UIparameter (
"layout",
's', omitable =
true);
1833 parameter -> SetGuidance (
"Layout, i.e., adjustment: left|centre|right.");
1834 parameter -> SetDefaultValue (
"left");
1835 fpCommand -> SetParameter (parameter);
1854 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
1862 std::istringstream is(newValue);
1863 is >> size >> x >> y >> layoutString;
1869 Logo2D* logo2D =
new Logo2D(
fpVisManager, size, x, y, layout);
1875 const G4String& currentSceneName = pScene -> GetName ();
1876 G4bool successful = pScene -> AddRunDurationModel (model, warn);
1879 G4cout <<
"2D logo has been added to scene \""
1880 << currentSceneName <<
"\"."
1889void G4VisCommandSceneAddLogo2D::Logo2D::operator()
1893 text.SetScreenSize(fSize);
1894 text.SetLayout(fLayout);
1896 text.SetVisAttributes(textAtts);
1897 sceneHandler.BeginPrimitives2D();
1898 sceneHandler.AddPrimitive(text);
1899 sceneHandler.EndPrimitives2D();
1905 fpCommand =
new G4UIcommand (
"/vis/scene/add/magneticField",
this);
1906 fpCommand -> SetGuidance
1907 (
"Adds magnetic field representation to current scene.");
1933 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
1938 G4int nDataPointsPerHalfScene;
1940 std::istringstream iss(newValue);
1941 iss >> nDataPointsPerHalfScene >> representation;
1944 if (representation ==
"lightArrow") {
1949 (nDataPointsPerHalfScene,modelRepresentation,
1953 const G4String& currentSceneName = pScene -> GetName ();
1954 G4bool successful = pScene -> AddRunDurationModel (model, warn);
1958 <<
"Magnetic field, if any, will be drawn in scene \""
1961 << nDataPointsPerHalfScene
1962 <<
" data points per half extent and with representation \""
1978 fpCommand -> SetGuidance
1979 (
"Adds Primitive Scorer Hits (PSHits) to current scene.");
1980 fpCommand -> SetGuidance
1981 (
"PSHits are drawn at end of run when the scene in which"
1982 "\nthey are added is current.");
1983 fpCommand -> SetGuidance
1984 (
"Optional parameter specifies name of scoring map. By default all"
1985 "\nscoring maps registered with the G4ScoringManager are drawn.");
1986 fpCommand -> SetParameterName (
"mapname", omitable =
true);
1987 fpCommand -> SetDefaultValue (
"all");
2007 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
2013 const G4String& currentSceneName = pScene -> GetName ();
2014 G4bool successful = pScene -> AddEndOfRunModel (model, warn);
2017 if (newValue ==
"all") {
2018 G4cout <<
"All Primitive Scorer hits";
2020 G4cout <<
"Hits of Primitive Scorer \"" << newValue <<
'"';
2022 G4cout <<
" will be drawn at end of run in scene \""
2023 << currentSceneName <<
"\"."
2036 fpCommand =
new G4UIcommand (
"/vis/scene/add/scale",
this);
2037 fpCommand -> SetGuidance
2038 (
"Adds an annotated scale line to the current scene.");
2039 fpCommand -> SetGuidance
2040 (
"If \"unit\" is \"auto\", length is roughly one tenth of the scene extent.");
2041 fpCommand -> SetGuidance
2042 (
"If \"direction\" is \"auto\", scale is roughly in the plane of the current view.");
2043 fpCommand -> SetGuidance
2044 (
"If \"placement\" is \"auto\", scale is placed at bottom left of current view."
2045 "\n Otherwise placed at (xmid,ymid,zmid).");
2048 parameter =
new G4UIparameter (
"length",
'd', omitable =
true);
2051 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
2054 parameter =
new G4UIparameter (
"direction",
's', omitable =
true);
2058 parameter =
new G4UIparameter (
"red",
'd', omitable =
true);
2061 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
2064 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
2067 parameter =
new G4UIparameter (
"placement",
's', omitable =
true);
2068 parameter -> SetParameterCandidates(
"auto manual");
2071 parameter =
new G4UIparameter (
"xmid",
'd', omitable =
true);
2074 parameter =
new G4UIparameter (
"ymid",
'd', omitable =
true);
2077 parameter =
new G4UIparameter (
"zmid",
'd', omitable =
true);
2080 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
2101 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
2108 <<
"ERROR: Scene has no extent. Add volumes or use \"/vis/scene/add/extent\"."
2115 G4double userLength, red, green, blue, xmid, ymid, zmid;
2116 G4String userLengthUnit, direction, auto_manual, positionUnit;
2117 std::istringstream is (newValue);
2118 is >> userLength >> userLengthUnit >> direction
2119 >> red >> green >> blue
2121 >> xmid >> ymid >> zmid >> positionUnit;
2125 if (userLengthUnit ==
"auto") {
2127 const G4double intLog10Length = std::floor(std::log10(lengthMax));
2128 length = std::pow(10,intLog10Length);
2129 if (5.*length < lengthMax) length *= 5.;
2130 else if (2.*length < lengthMax) length *= 2.;
2137 xmid *= unit; ymid *= unit; zmid *= unit;
2140 if (direction(0) ==
'y') scaleDirection =
G4Scale::y;
2141 if (direction(0) ==
'z') scaleDirection =
G4Scale::z;
2147 "ERROR: G4VisCommandSceneAddScale::SetNewValue: no viewer."
2148 "\n Auto direction needs a viewer."
2159 if (direction ==
"auto") {
2160 if (std::abs(vp.
x()) > std::abs(vp.
y()) &&
2161 std::abs(vp.
x()) > std::abs(vp.
z())) {
2162 if (std::abs(up.
y()) > std::abs(up.
z())) scaleDirection =
G4Scale::z;
2165 else if (std::abs(vp.
y()) > std::abs(vp.
x()) &&
2166 std::abs(vp.
y()) > std::abs(vp.
z())) {
2167 if (std::abs(up.
x()) > std::abs(up.
z())) scaleDirection =
G4Scale::z;
2170 else if (std::abs(vp.
z()) > std::abs(vp.
x()) &&
2171 std::abs(vp.
z()) > std::abs(vp.
y())) {
2172 if (std::abs(up.
y()) > std::abs(up.
x())) scaleDirection =
G4Scale::x;
2177 G4bool autoPlacing =
false;
if (auto_manual ==
"auto") autoPlacing =
true;
2181 const G4double halfLength(length / 2.);
2183 const G4double freeLengthFraction (1. + 2. * comfort);
2198 "WARNING: Existing scene does not yet have any extent."
2199 "\n Maybe you have not yet added any geometrical object."
2205 switch (scaleDirection) {
2207 if (freeLengthFraction * (xmax - xmin) < length) room =
false;
2210 if (freeLengthFraction * (ymax - ymin) < length) room =
false;
2213 if (freeLengthFraction * (zmax - zmin) < length) room =
false;
2220 "WARNING: Not enough room in existing scene. Maybe scale is too long."
2227 "WARNING: The scale you have asked for is bigger than the existing"
2228 "\n scene. Maybe you have added it too soon. It is recommended that"
2229 "\n you add the scale last so that it can be correctly auto-positioned"
2230 "\n so as not to be obscured by any existing object and so that the"
2231 "\n view parameters can be correctly recalculated."
2238 G4Scale scale(length, annotation, scaleDirection,
2239 false, xmid, ymid, zmid,
2245 globalDescription +=
" (" + newValue +
")";
2275 G4double sxmid(xmid), symid(ymid), szmid(zmid);
2279 const G4double xComfort = comfort * (xmax - xmin);
2280 const G4double yComfort = comfort * (ymax - ymin);
2281 const G4double zComfort = comfort * (zmax - zmin);
2282 switch (scaleDirection) {
2285 sxmid = xmax + xComfort;
2286 symid = ymin - yComfort;
2287 szmid = zmin - zComfort;
2289 sxmid = xmin - xComfort;
2290 symid = ymin - yComfort;
2291 szmid = zmax + zComfort;
2296 sxmid = xmin - xComfort;
2297 symid = ymax + yComfort;
2298 szmid = zmin - zComfort;
2300 sxmid = xmax + xComfort;
2301 symid = ymin - yComfort;
2302 szmid = zmin - zComfort;
2307 sxmid = xmax + xComfort;
2308 symid = ymin - yComfort;
2309 szmid = zmax + zComfort;
2311 sxmid = xmin - xComfort;
2312 symid = ymin - yComfort;
2313 szmid = zmax + zComfort;
2369 switch (scaleDirection) {
2371 scaleExtent =
G4VisExtent(-halfLength,halfLength,0,0,0,0);
2375 scaleExtent =
G4VisExtent(0,0,-halfLength,halfLength,0,0);
2379 scaleExtent =
G4VisExtent(0,0,0,0,-halfLength,halfLength);
2392 const G4String& currentSceneName = pScene -> GetName ();
2393 G4bool successful = pScene -> AddRunDurationModel (model, warn);
2396 G4cout <<
"Scale of " << annotation
2397 <<
" added to scene \"" << currentSceneName <<
"\".";
2399 G4cout <<
"\n with extent " << scaleExtent
2416 fpCommand =
new G4UIcommand (
"/vis/scene/add/text",
this);
2417 fpCommand -> SetGuidance (
"Adds text to current scene.");
2418 fpCommand -> SetGuidance
2419 (
"Use \"/vis/set/textColour\" to set colour.");
2420 fpCommand -> SetGuidance
2421 (
"Use \"/vis/set/textLayout\" to set layout:");
2432 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
2435 parameter =
new G4UIparameter (
"font_size",
'd', omitable =
true);
2439 parameter =
new G4UIparameter (
"x_offset",
'd', omitable =
true);
2443 parameter =
new G4UIparameter (
"y_offset",
'd', omitable =
true);
2447 parameter =
new G4UIparameter (
"text",
's', omitable =
true);
2448 parameter->
SetGuidance (
"The rest of the line is text.");
2469 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
2485 x *= unit; y *= unit; z *= unit;
2494 const G4String& currentSceneName = pScene -> GetName ();
2495 G4bool successful = pScene -> AddRunDurationModel (model, warn);
2498 G4cout <<
"Text \"" << text
2499 <<
"\" has been added to scene \"" << currentSceneName <<
"\"."
2513 fpCommand =
new G4UIcommand (
"/vis/scene/add/text2D",
this);
2514 fpCommand -> SetGuidance (
"Adds 2D text to current scene.");
2515 fpCommand -> SetGuidance
2516 (
"Use \"/vis/set/textColour\" to set colour.");
2517 fpCommand -> SetGuidance
2518 (
"Use \"/vis/set/textLayout\" to set layout:");
2526 parameter =
new G4UIparameter (
"font_size",
'd', omitable =
true);
2530 parameter =
new G4UIparameter (
"x_offset",
'd', omitable =
true);
2534 parameter =
new G4UIparameter (
"y_offset",
'd', omitable =
true);
2538 parameter =
new G4UIparameter (
"text",
's', omitable =
true);
2539 parameter->
SetGuidance (
"The rest of the line is text.");
2560 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
2579 G4Text2D* g4text2D =
new G4Text2D(g4text);
2585 const G4String& currentSceneName = pScene -> GetName ();
2586 G4bool successful = pScene -> AddRunDurationModel (model, warn);
2589 G4cout <<
"2D text \"" << text
2590 <<
"\" has been added to scene \"" << currentSceneName <<
"\"."
2599G4VisCommandSceneAddText2D::G4Text2D::G4Text2D(
const G4Text& text):
2603void G4VisCommandSceneAddText2D::G4Text2D::operator()
2605 sceneHandler.BeginPrimitives2D(transform);
2606 sceneHandler.AddPrimitive(fText);
2607 sceneHandler.EndPrimitives2D();
2616 (
"/vis/scene/add/trajectories",
this);
2617 fpCommand -> SetGuidance
2618 (
"Adds trajectories to current scene.");
2619 fpCommand -> SetGuidance
2620 (
"Causes trajectories, if any, to be drawn at the end of processing an"
2621 "\nevent. Switches on trajectory storing and sets the"
2622 "\ndefault trajectory type.");
2623 fpCommand -> SetGuidance
2624 (
"The command line parameter list determines the default trajectory type."
2625 "\nIf it contains the string \"smooth\", auxiliary inter-step points will"
2626 "\nbe inserted to improve the smoothness of the drawing of a curved"
2628 "\nIf it contains the string \"rich\", significant extra information will"
2629 "\nbe stored in the trajectory (G4RichTrajectory) amenable to modeling"
2630 "\nand filtering with \"/vis/modeling/trajectories/create/drawByAttribute\""
2631 "\nand \"/vis/filtering/trajectories/create/attributeFilter\" commands."
2632 "\nIt may contain both strings in any order.");
2633 fpCommand -> SetGuidance
2634 (
"\nTo switch off trajectory storing: \"/tracking/storeTrajectory 0\"."
2635 "\nSee also \"/vis/scene/endOfEventAction\".");
2636 fpCommand -> SetGuidance
2637 (
"Note: This only sets the default. Independently of the result of this"
2638 "\ncommand, a user may instantiate a trajectory that overrides this default"
2639 "\nin PreUserTrackingAction.");
2640 fpCommand -> SetParameterName (
"default-trajectory-type", omitable =
true);
2641 fpCommand -> SetDefaultValue (
"");
2661 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
2665 const G4String& currentSceneName = pScene -> GetName ();
2669 if (newValue.find(
"smooth") != std::string::npos) smooth =
true;
2670 if (newValue.find(
"rich") != std::string::npos) rich =
true;
2671 if (newValue.size() && !(rich || smooth)) {
2673 G4cerr <<
"ERROR: Unrecognised parameter \"" << newValue <<
"\""
2674 "\n No action taken."
2682 G4int newVerbose = 2;
2685 if (smooth && rich) {
2686 UImanager->
ApplyCommand(
"/tracking/storeTrajectory 4");
2687 defaultTrajectoryType =
"G4RichTrajectory configured for smooth steps";
2688 }
else if (smooth) {
2689 UImanager->
ApplyCommand(
"/tracking/storeTrajectory 2");
2690 defaultTrajectoryType =
"G4SmoothTrajectory";
2692 UImanager->
ApplyCommand(
"/tracking/storeTrajectory 3");
2693 defaultTrajectoryType =
"G4RichTrajectory";
2695 UImanager->
ApplyCommand(
"/tracking/storeTrajectory 1");
2696 defaultTrajectoryType =
"G4Trajectory";
2702 "Attributes available for modeling and filtering with"
2703 "\n \"/vis/modeling/trajectories/create/drawByAttribute\" and"
2704 "\n \"/vis/filtering/trajectories/create/attributeFilter\" commands:"
2710 }
else if (smooth) {
2720 auto eoeModel = eoeList.begin();
2721 for (; eoeModel != eoeList.end(); ++eoeModel) {
2722 const auto* actualModel = eoeModel->fpModel;
2725 if (eoeModel == eoeList.end()) {
2728 pScene -> AddEndOfEventModel (model, warn);
2734 G4cout <<
"Default trajectory type " << defaultTrajectoryType
2735 <<
"\n will be used to store trajectories for scene \""
2736 << currentSceneName <<
"\"."
2742 "WARNING: Trajectory storing has been requested. This action may be"
2743 "\n reversed with \"/tracking/storeTrajectory 0\"."
2755 fpCommand -> SetGuidance
2756 (
"Add named Vis User Action to current scene.");
2757 fpCommand -> SetGuidance
2758 (
"Attempts to match search string to name of action - use unique sub-string.");
2759 fpCommand -> SetGuidance
2760 (
"(Use /vis/list to see names of registered actions.)");
2761 fpCommand -> SetGuidance
2762 (
"If name == \"all\" (default), all actions are added.");
2763 fpCommand -> SetParameterName(
"action-name", omitable =
true);
2764 fpCommand -> SetDefaultValue(
"all");
2783 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
2790 const std::vector<G4VisManager::UserVisAction>& runDurationUserVisActions =
2792 for (
size_t i = 0; i < runDurationUserVisActions.size(); i++) {
2793 const G4String& name = runDurationUserVisActions[i].fName;
2794 G4VUserVisAction* visAction = runDurationUserVisActions[i].fpUserVisAction;
2795 if (newValue ==
"all" || name.find(newValue) != std::string::npos) {
2797 AddVisAction(name,visAction,pScene,runDuration,verbosity);
2801 const std::vector<G4VisManager::UserVisAction>& endOfEventUserVisActions =
2803 for (
size_t i = 0; i < endOfEventUserVisActions.size(); i++) {
2804 const G4String& name = endOfEventUserVisActions[i].fName;
2806 if (newValue ==
"all" || name.find(newValue) != std::string::npos) {
2808 AddVisAction(name,visAction,pScene,endOfEvent,verbosity);
2812 const std::vector<G4VisManager::UserVisAction>& endOfRunUserVisActions =
2814 for (
size_t i = 0; i < endOfRunUserVisActions.size(); i++) {
2815 const G4String& name = endOfRunUserVisActions[i].fName;
2817 if (newValue ==
"all" || name.find(newValue) != std::string::npos) {
2819 AddVisAction(name,visAction,pScene,endOfRun,verbosity);
2825 G4cout <<
"WARNING: No User Vis Action registered." <<
G4endl;
2833void G4VisCommandSceneAddUserAction::AddVisAction
2837 G4VisCommandSceneAddUserAction::ActionType type,
2842 const std::map<G4VUserVisAction*,G4VisExtent>& visExtentMap =
2845 std::map<G4VUserVisAction*,G4VisExtent>::const_iterator i =
2846 visExtentMap.find(visAction);
2847 if (i != visExtentMap.end()) extent = i->second;
2851 <<
"WARNING: User Vis Action \"" << name <<
"\" extent is null."
2857 model->
SetType(
"User Vis Action");
2861 G4bool successful =
false;;
2864 successful = pScene -> AddRunDurationModel (model, warn);
2867 successful = pScene -> AddEndOfEventModel (model, warn);
2870 successful = pScene -> AddEndOfRunModel (model, warn);
2875 const G4String& currentSceneName = pScene -> GetName ();
2876 G4cout <<
"User Vis Action added to scene \""
2877 << currentSceneName <<
"\"";
2879 G4cout <<
"\n with extent " << extent;
2891 fpCommand =
new G4UIcommand (
"/vis/scene/add/volume",
this);
2892 fpCommand -> SetGuidance
2893 (
"Adds a physical volume to current scene, with optional clipping volume.");
2894 fpCommand -> SetGuidance
2895 (
"If physical-volume-name is \"world\" (the default), the top of the"
2896 "\nmain geometry tree (material world) is added. If \"worlds\", the"
2897 "\ntops of all worlds - material world and parallel worlds, if any - are"
2898 "\nadded. Otherwise a search of all worlds is made.");
2899 fpCommand -> SetGuidance
2900 (
"In the last case the names of all volumes in all worlds are matched"
2901 "\nagainst physical-volume-name. If this is of the form \"/regexp/\","
2902 "\nwhere regexp is a regular expression (see C++ regex), the match uses"
2903 "\nthe usual rules of regular expression matching. Otherwise an exact"
2904 "\nmatch is required."
2905 "\nFor example, \"/Shap/\" adds \"Shape1\" and \"Shape2\".");
2906 fpCommand -> SetGuidance
2907 (
"It may help to see a textual representation of the geometry hierarchy of"
2908 "\nthe worlds. Try \"/vis/drawTree [worlds]\" or one of the driver/browser"
2909 "\ncombinations that have the required functionality, e.g., HepRepFile.");
2910 fpCommand -> SetGuidance
2911 (
"If clip-volume-type is specified, the subsequent parameters are used to"
2912 "\nto define a clipping volume. For example,"
2913 "\n\"/vis/scene/add/volume ! ! ! -box km 0 1 0 1 0 1\" will draw the world"
2914 "\nwith the positive octant cut away. (If the Boolean Processor issues"
2915 "\nwarnings try replacing 0 by 0.000000001 or something.)");
2916 fpCommand -> SetGuidance
2917 (
"If clip-volume-type is prepended with '-', the clip-volume is subtracted"
2918 "\n(cutaway). (This is the default if there is no prepended character.)"
2919 "\nIf '*' is prepended, the intersection of the physical-volume and the"
2920 "\nclip-volume is made. (You can make a section through the detector with"
2921 "\na thin box, for example).");
2922 fpCommand -> SetGuidance
2923 (
"For \"box\", the parameters are xmin,xmax,ymin,ymax,zmin,zmax."
2924 "\nOnly \"box\" is programmed at present.");
2926 parameter =
new G4UIparameter (
"physical-volume-name",
's', omitable =
true);
2927 parameter -> SetDefaultValue (
"world");
2928 fpCommand -> SetParameter (parameter);
2929 parameter =
new G4UIparameter (
"copy-no",
'i', omitable =
true);
2930 parameter -> SetGuidance (
"If negative, matches any copy no.");
2931 parameter -> SetDefaultValue (-1);
2932 fpCommand -> SetParameter (parameter);
2933 parameter =
new G4UIparameter (
"depth-of-descent",
'i', omitable =
true);
2934 parameter -> SetGuidance
2935 (
"Depth of descent of geometry hierarchy. Default = unlimited depth.");
2937 fpCommand -> SetParameter (parameter);
2938 parameter =
new G4UIparameter (
"clip-volume-type",
's', omitable =
true);
2939 parameter -> SetParameterCandidates(
"none box -box *box");
2940 parameter -> SetDefaultValue (
"none");
2941 parameter -> SetGuidance(
"[-|*]type. See general guidance.");
2942 fpCommand -> SetParameter (parameter);
2943 parameter =
new G4UIparameter (
"parameter-unit",
's', omitable =
true);
2944 parameter -> SetDefaultValue (
"m");
2945 fpCommand -> SetParameter (parameter);
2946 parameter =
new G4UIparameter (
"parameter-1",
'd', omitable =
true);
2947 parameter -> SetDefaultValue (0.);
2948 fpCommand -> SetParameter (parameter);
2949 parameter =
new G4UIparameter (
"parameter-2",
'd', omitable =
true);
2950 parameter -> SetDefaultValue (0.);
2951 fpCommand -> SetParameter (parameter);
2952 parameter =
new G4UIparameter (
"parameter-3",
'd', omitable =
true);
2953 parameter -> SetDefaultValue (0.);
2954 fpCommand -> SetParameter (parameter);
2955 parameter =
new G4UIparameter (
"parameter-4",
'd', omitable =
true);
2956 parameter -> SetDefaultValue (0.);
2957 fpCommand -> SetParameter (parameter);
2958 parameter =
new G4UIparameter (
"parameter-5",
'd', omitable =
true);
2959 parameter -> SetDefaultValue (0.);
2960 fpCommand -> SetParameter (parameter);
2961 parameter =
new G4UIparameter (
"parameter-6",
'd', omitable =
true);
2962 parameter -> SetDefaultValue (0.);
2963 fpCommand -> SetParameter (parameter);
2971 return "world 0 -1";
2983 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
2988 G4String name, clipVolumeType, parameterUnit;
2989 G4int copyNo, requestedDepthOfDescent;
2990 G4double param1, param2, param3, param4, param5, param6;
2991 std::istringstream is (newValue);
2992 is >> name >> copyNo >> requestedDepthOfDescent
2993 >> clipVolumeType >> parameterUnit
2994 >> param1 >> param2 >> param3 >> param4 >> param5 >> param6;
2997 if (clipVolumeType[
size_t(0)] ==
'-') {
2998 clipVolumeType = clipVolumeType.substr(1);
2999 }
else if (clipVolumeType[
size_t(0)] ==
'*') {
3001 clipVolumeType = clipVolumeType.substr(1);
3004 param1 *= unit; param2 *= unit; param3 *= unit;
3005 param4 *= unit; param5 *= unit; param6 *= unit;
3008 if (clipVolumeType ==
"box") {
3009 const G4double dX = (param2 - param1) / 2.;
3010 const G4double dY = (param4 - param3) / 2.;
3011 const G4double dZ = (param6 - param5) / 2.;
3012 const G4double x0 = (param2 + param1) / 2.;
3013 const G4double y0 = (param4 + param3) / 2.;
3014 const G4double z0 = (param6 + param5) / 2.;
3016 (
"_displaced_clipping_box",
3017 new G4Box(
"_clipping_box",dX,dY,dZ),
3024 size_t nWorlds = transportationManager->
GetNoWorlds();
3027 static G4bool warned =
false;
3028 if (!warned && name !=
"worlds") {
3030 "WARNING: Parallel worlds in operation. To visualise, specify"
3031 "\n \"worlds\" or the parallel world volume or sub-volume name"
3032 "\n and control visibility with /vis/geometry."
3034 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
3036 for (
size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
3037 G4cout <<
" World " << i <<
": " << (*iterWorld)->GetName()
3051 "ERROR: G4VisCommandSceneAddVolume::SetNewValue:"
3052 "\n No world. Maybe the geometry has not yet been defined."
3053 "\n Try \"/run/initialize\""
3059 std::vector<G4PhysicalVolumesSearchScene::Findings> findingsVector;
3061 if (name ==
"world") {
3063 findingsVector.push_back
3066 }
else if (name ==
"worlds") {
3071 "WARNING: G4VisCommandSceneAddVolume::SetNewValue:"
3072 "\n Parallel worlds requested but none exist."
3073 "\n Just adding material world."
3077 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
3079 for (
size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
3080 findingsVector.push_back
3082 (*iterWorld,*iterWorld));
3087 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
3089 for (
size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
3095 for (
const auto& findings: searchScene.
GetFindings()) {
3096 findingsVector.push_back(findings);
3101 for (
const auto& findings: findingsVector) {
3103 findings.fpFoundPV->SetCopyNo(findings.fFoundPVCopyNo);
3106 (findings.fpFoundPV,
3107 requestedDepthOfDescent,
3108 findings.fFoundObjectTransformation,
3111 findings.fFoundBasePVPath);
3112 if (clippingSolid) {
3116 if (!foundPVModel->
Validate(warn))
return;
3121 G4cout <<
"\"" << findings.fpFoundPV->GetName()
3122 <<
"\", copy no. " << findings.fFoundPVCopyNo
3123 <<
",\n found in searched volume \""
3124 << findings.fpSearchPV->GetName()
3125 <<
"\" at depth " << findings.fFoundDepth
3126 <<
",\n base path: \"" << findings.fFoundBasePVPath
3127 <<
"\",\n with a requested depth of further descent of ";
3128 if (requestedDepthOfDescent < 0) {
3129 G4cout <<
"<0 (unlimited)";
3132 G4cout << requestedDepthOfDescent;
3134 G4cout <<
",\n has been added to scene \"" << pScene->
GetName() <<
"\"."
3142 if (findingsVector.empty()) {
3144 G4cerr <<
"ERROR: Volume \"" << name <<
"\"";
3146 G4cerr <<
", copy no. " << copyNo <<
",";
HepGeom::Point3D< G4double > G4Point3D
CLHEP::Hep3Vector G4ThreeVector
HepGeom::Vector3D< G4double > G4Vector3D
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
HepRotation & rotateZ(double delta)
static G4LogicalVolumeStore * GetInstance()
void SetClippingSolid(G4VSolid *pClippingSolid)
G4bool Validate(G4bool warn)
void SetClippingMode(ClippingMode mode)
void DescribeYourselfTo(G4VGraphicsScene &)
const std::vector< Findings > & GetFindings() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
static G4RunManager * GetMasterRunManager()
const G4Run * GetCurrentRun() const
G4int GetNumberOfEventToBeProcessed() const
const std::vector< const G4Event * > * GetEventVector() const
static const G4String & GetGuidanceString()
G4bool AddRunDurationModel(G4VModel *, G4bool warn=false)
const G4VisExtent & GetExtent() const
const G4String & GetName() const
const std::vector< Model > & GetEndOfEventModelList() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
void SetOffset(double dx, double dy)
const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
static G4TransportationManager * GetTransportationManager()
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
size_t GetNoWorlds() const
G4UIcommand * FindPath(const char *commandPath) const
static G4double ValueOf(const char *unitName)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
static G4bool ConvertToBool(const char *st)
G4UIcommandTree * GetTree() const
G4int ApplyCommand(const char *aCommand)
G4int GetVerboseLevel() const
static G4UImanager * GetUIpointer()
void SetVerboseLevel(G4int val)
G4double StoD(G4String s)
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
void SetScreenSize(G4double)
void SetType(const G4String &)
void SetGlobalDescription(const G4String &)
void SetModelingParameters(const G4ModelingParameters *)
void SetGlobalTag(const G4String &)
void SetExtent(const G4VisExtent &)
const G4VisExtent & GetExtent() const
const G4String & GetGlobalDescription() const
void SetTransformation(const G4Transform3D &)
const G4ViewParameters & GetViewParameters() const
static G4double fCurrentTextSize
void G4VisCommandsSceneAddUnsuccessful(G4VisManager::Verbosity verbosity)
static G4Colour fCurrentTextColour
void CheckSceneAndNotifyHandlers(G4Scene *=nullptr)
static std::vector< G4PhysicalVolumesSearchScene::Findings > fCurrrentPVFindingsForField
void ConvertToColour(G4Colour &colour, const G4String &redOrString, G4double green, G4double blue, G4double opacity)
static G4VisManager * fpVisManager
static G4VisExtent fCurrentExtentForField
const G4String & ConvertToColourGuidance()
void CopyParametersFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd)
static G4int fCurrentArrow3DLineSegmentsPerCircle
static G4Text::Layout fCurrentTextLayout
static G4double fCurrentLineWidth
static G4Colour fCurrentColour
void CopyGuidanceFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd, G4int startLine=0)
const G4Vector3D & GetViewpointDirection() const
const G4Vector3D & GetUpVector() const
void SetColour(const G4Colour &)
void SetLineWidth(G4double)
void SetForceSolid(G4bool=true)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSceneAddArrow2D()
G4VisCommandSceneAddArrow2D()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddArrow()
virtual ~G4VisCommandSceneAddArrow()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddAxes()
virtual ~G4VisCommandSceneAddAxes()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddDate()
G4VisCommandSceneAddDate()
G4VisCommandSceneAddDigis()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddDigis()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddElectricField()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddElectricField()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddEventID()
virtual ~G4VisCommandSceneAddEventID()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSceneAddExtent()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddExtent()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddFrame()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddFrame()
virtual ~G4VisCommandSceneAddGPS()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddGPS()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSceneAddHits()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddHits()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddLine2D()
virtual ~G4VisCommandSceneAddLine2D()
G4VisCommandSceneAddLine()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddLine()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddLogicalVolume()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSceneAddLogicalVolume()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddLogo2D()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddLogo2D()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddLogo()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSceneAddLogo()
virtual ~G4VisCommandSceneAddMagneticField()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddMagneticField()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSceneAddPSHits()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddPSHits()
virtual ~G4VisCommandSceneAddScale()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddScale()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddText2D()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddText2D()
virtual ~G4VisCommandSceneAddText()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddText()
G4VisCommandSceneAddTrajectories()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSceneAddTrajectories()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddUserAction()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddUserAction()
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddVolume()
virtual ~G4VisCommandSceneAddVolume()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4double GetExtentRadius() const
G4Scene * GetCurrentScene() const
const std::vector< UserVisAction > & GetRunDurationUserVisActions() const
const std::map< G4VUserVisAction *, G4VisExtent > & GetUserVisActionExtents() const
const std::vector< UserVisAction > & GetEndOfRunUserVisActions() const
G4VViewer * GetCurrentViewer() const
const std::vector< UserVisAction > & GetEndOfEventUserVisActions() const
static Verbosity GetVerbosity()
void SetVisAttributes(const G4VisAttributes *)
BasicVector3D< T > unit() const