56 (
"Copies view parameters.");
58 (
"Copies ALL view parameters (except the autoRefresh status) from"
59 "\nfrom-viewer to current viewer. You may need \"/vis/viewer/rebuild\".");
61 (
"Note: to copy only the camera-specific parameters use"
62 "\n\"/vis/viewer/copyfrom\".");
66 (
"/vis/viewer/set/autoRefresh",
this);
69 (
"If true, view is automatically refreshed after a change of"
70 "\nview parameters.");
75 (
"/vis/viewer/set/auxiliaryEdge",
this);
78 (
"Auxiliary edges, i.e., those that are part of a curved surface,"
79 "\nsometimes called soft edges, become visible/invisible.");
84 (
"/vis/viewer/set/background",
this);
86 (
"Set background colour and transparency (default black and opaque).");
88 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
89 parameter -> SetDefaultValue (
"0.");
92 parameter -> SetDefaultValue (0.);
95 parameter -> SetDefaultValue (0.);
97 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
98 parameter -> SetDefaultValue (1.);
104 (
"\"global\": enables/disables all other culling options.");
106 (
"\"coveredDaughters\": culls, i.e., eliminates, volumes that would not"
107 "\nbe seen because covered by ancestor volumes in surface drawing mode,"
108 "\nand then only if the ancestors are visible and opaque, and then only"
109 "\nif no sections or cutaways are in operation. Intended solely to"
110 "\nimprove the speed of rendering visible volumes.");
112 (
"\"invisible\": culls objects with the invisible attribute set.");
114 (
"\"density\": culls volumes with density lower than threshold. Useful"
115 "\nfor eliminating \"container volumes\" with no physical correspondence,"
116 "\nwhose material is usually air. If this is selected, provide threshold"
117 "\ndensity and unit (e.g., g/cm3, mg/cm3 or kg/m3)."
119 parameter =
new G4UIparameter(
"culling-option",
's',omitable =
false);
121 (
"global coveredDaughters invisible density");
126 parameter =
new G4UIparameter(
"density-threshold",
'd',omitable =
true);
138 (
"Sets cutaway mode - add (union) or multiply (intersection).");
144 (
"/vis/viewer/set/defaultColour",
this);
146 (
"Set defaultColour colour and transparency (default white and opaque).");
148 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
149 parameter -> SetDefaultValue (
"1.");
151 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
152 parameter -> SetDefaultValue (1.);
154 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
155 parameter -> SetDefaultValue (1.);
157 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
158 parameter -> SetDefaultValue (1.);
162 (
"/vis/viewer/set/defaultTextColour",
this);
164 (
"Set defaultTextColour colour and transparency (default blue and opaque).");
166 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
167 parameter -> SetDefaultValue (
"0.");
169 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
170 parameter -> SetDefaultValue (0.);
172 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
173 parameter -> SetDefaultValue (1.);
175 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
176 parameter -> SetDefaultValue (1.);
181 (
"Edges become visible/invisible in surface mode.");
186 (
"/vis/viewer/set/explodeFactor",
this);
188 (
"Moves top-level drawn volumes by this factor from this centre.");
189 parameter =
new G4UIparameter(
"explodeFactor",
'd', omitable=
true);
195 parameter->
SetGuidance (
"Coordinate of explode centre.");
199 parameter->
SetGuidance (
"Coordinate of explode centre.");
203 parameter->
SetGuidance (
"Coordinate of explode centre.");
207 parameter->
SetGuidance (
"Unit of explode centre.");
211 (
"/vis/viewer/set/globalLineWidthScale",
this);
213 (
"Multiplies line widths by this factor.");
215 SetParameterName(
"scale-factor", omitable=
true);
219 (
"/vis/viewer/set/globalMarkerScale",
this);
221 (
"Multiplies marker sizes by this factor.");
223 SetParameterName(
"scale-factor", omitable=
true);
229 (
"Edges become hidden/seen in wireframe or surface mode.");
236 (
"If true, closer objects hide markers. Otherwise, markers always show.");
241 (
"/vis/viewer/set/lightsMove",
this);
243 (
"Lights move with camera or with object");
246 (
"cam camera with-camera obj object with-object");
249 (
"/vis/viewer/set/lightsThetaPhi",
this);
251 (
"Set direction from target to lights.");
252 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
253 parameter -> SetDefaultValue(60.);
256 parameter -> SetDefaultValue(45.);
258 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
259 parameter -> SetDefaultValue (
"deg");
263 (
"/vis/viewer/set/lightsVector",
this);
265 (
"Set direction from target to lights.");
267 parameter -> SetDefaultValue (1);
270 parameter -> SetDefaultValue (1);
273 parameter -> SetDefaultValue (1);
277 (
"/vis/viewer/set/lineSegmentsPerCircle",
this);
279 (
"Set number of sides per circle for polygon/polyhedron drawing.");
281 (
"Refers to graphical representation of objects with curved lines/surfaces.");
286 (
"/vis/viewer/set/numberOfCloudPoints",
this);
288 (
"Set number of points to be used for cloud representation of volumes.");
293 (
"/vis/viewer/set/picking",
this);
296 (
"If true, view is set up for picking, if available.");
298 (
"You may need to issue \"/vis/viewer/update\".");
300 (
"For required actions, watch for instructions for viewer.");
306 (
"Set projection style - o[rthogonal] or p[erspective]."
307 "\nIf p[erspective], also set field half angle.");
308 parameter =
new G4UIparameter(
"projection",
's',omitable =
true);
312 parameter =
new G4UIparameter(
"field-half-angle",
'd',omitable =
true);
322 (
"/vis/viewer/set/rotationStyle",
this);
324 (
"Set style of rotation - constrainUpDirection or freeRotation.");
326 (
"constrainUpDirection: conventional HEP view.");
328 (
"freeRotation: Google-like rotation, using mouse-grab.");
334 (
"Set plane for drawing section (DCUT).");
336 (
"E.g., for a y-z plane at x = 1 cm:"
337 "\n\"/vis/viewer/set/sectionPlane on 1 0 0 cm 1 0 0\"."
338 "\nTo turn off: /vis/viewer/set/sectionPlane off");
340 parameter -> SetDefaultValue (
"on");
343 parameter -> SetDefaultValue (0);
344 parameter -> SetGuidance (
"Coordinate of point on the plane.");
347 parameter -> SetDefaultValue (0);
348 parameter -> SetGuidance (
"Coordinate of point on the plane.");
351 parameter -> SetDefaultValue (0);
352 parameter -> SetGuidance (
"Coordinate of point on the plane.");
355 parameter -> SetDefaultValue (
"m");
356 parameter -> SetGuidance (
"Unit of point on the plane.");
359 parameter -> SetDefaultValue (1);
360 parameter -> SetGuidance (
"Component of plane normal.");
363 parameter -> SetDefaultValue (0);
364 parameter -> SetGuidance (
"Component of plane normal.");
367 parameter -> SetDefaultValue (0);
368 parameter -> SetGuidance (
"Component of plane normal.");
373 (
"Set style of drawing - w[ireframe] or s[urface] or c[loud].");
375 (
"(Hidden line drawing is controlled by \"/vis/viewer/set/hiddenEdge\".)");
380 (
"/vis/viewer/set/targetPoint",
this);
382 (
"Set target point.");
384 (
"This sets the \"Current Target Point\" relative to the \"Standard");
386 (
"Target Point\" so that the actual target point is as requested.");
388 (
"(See G4ViewParameters.hh for an explanation of target points.)");
393 (
"/vis/viewer/set/upThetaPhi",
this);
396 (
"Viewer will attempt always to show this direction upwards.");
397 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
398 parameter -> SetDefaultValue (90.);
401 parameter -> SetDefaultValue (90.);
403 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
404 parameter -> SetDefaultValue (
"deg");
408 (
"/vis/viewer/set/upVector",
this);
411 (
"Viewer will attempt always to show this direction upwards.");
413 parameter -> SetDefaultValue (0.);
416 parameter -> SetDefaultValue (1.);
419 parameter -> SetDefaultValue (0.);
423 (
"/vis/viewer/set/viewpointThetaPhi",
this);
425 (
"Set direction from target to camera.");
427 (
"Also changes lightpoint direction if lights are set to move with camera.");
428 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
429 parameter -> SetDefaultValue (60.);
432 parameter -> SetDefaultValue (45.);
434 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
435 parameter -> SetDefaultValue (
"deg");
439 (
"/vis/viewer/set/viewpointVector",
this);
441 (
"Set direction from target to camera.");
443 (
"Also changes lightpoint direction if lights are set to move with camera.");
445 parameter -> SetDefaultValue (1.);
448 parameter -> SetDefaultValue (1.);
451 parameter -> SetDefaultValue (1.);
457 "For these commands use"
458 "\n /vis/scene/add/trajectories rich"
459 "\n /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.01 ns"
461 "\n /vis/viewer/set/timeWindow/displayLightFront true 0 0 -50 cm -0.5 ns"
462 "\n /vis/viewer/set/timeWindow/displayHeadTime true"
463 "\n /vis/viewer/set/timeWindow/fadeFactor 1"
464 "\n /run/beamOn # or several until you get a good event or events"
465 "\n /vis/viewer/set/timeWindow/startTime 0 ns 1 ns"
466 "\n /vis/viewer/save"
467 "\n /vis/viewer/set/timeWindow/startTime 1 ns 1 ns"
468 "\nthen zoom, pan etc to a view of interest and"
469 "\n /vis/viewer/save"
470 "\nthen repeat with next start time, another view and a save, then try"
471 "\n /vis/viewer/interpolate";
474 new G4UIcommand(
"/vis/viewer/set/timeWindow/displayHeadTime",
this);
476 (
"Display head time of range in 2D text.");
478 parameter =
new G4UIparameter (
"displayHeadTime",
'b', omitable =
false);
481 parameter =
new G4UIparameter (
"screenX",
'd', omitable =
true);
486 parameter =
new G4UIparameter (
"screenY",
'd', omitable =
true);
491 parameter =
new G4UIparameter (
"screenSize",
'd', omitable =
true);
498 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
502 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
508 new G4UIcommand(
"/vis/viewer/set/timeWindow/displayLightFront",
this);
510 (
"Display the light front at head time.");
512 (
"Tip: The trajectories can appear of jump ahead of the light front"
513 "\nbecause their time range overlaps the viewer's time range. To"
514 "\naverage out this discrete time effect, advance the light front by"
515 "\nhalf the trajectories interval. E.g., if the trajectory time slice"
516 "\ninterval is 0.01 ns:"
517 "\n /vis/viewer/set/timeWindow/displayLightFront true -90 0 0 mm -0.005 ns"
518 "\nTo prevent them beating the light front at all:"
519 "\n /vis/viewer/set/timeWindow/displayLightFront true -90 0 0 mm -0.01 ns");
521 parameter =
new G4UIparameter (
"displayLightFront",
'b', omitable =
true);
524 parameter =
new G4UIparameter (
"originX",
'd', omitable =
true);
527 parameter =
new G4UIparameter (
"originY",
'd', omitable =
true);
530 parameter =
new G4UIparameter (
"originZ",
'd', omitable =
true);
533 parameter =
new G4UIparameter (
"space_unit",
's', omitable =
true);
536 parameter =
new G4UIparameter (
"originT",
'd', omitable =
true);
539 parameter =
new G4UIparameter (
"time_unit",
's', omitable =
true);
546 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
550 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
556 new G4UIcommand(
"/vis/viewer/set/timeWindow/endTime",
this);
559 parameter =
new G4UIparameter (
"end-time",
'd', omitable =
false);
562 parameter =
new G4UIparameter (
"end-time-unit",
's', omitable =
false);
565 parameter =
new G4UIparameter (
"time-range",
'd', omitable =
true);
568 parameter =
new G4UIparameter (
"time-range-unit",
's', omitable =
true);
575 (
"0: no fade; 1: maximum fade with time window.");
582 new G4UIcommand(
"/vis/viewer/set/timeWindow/startTime",
this);
585 parameter =
new G4UIparameter (
"start-time",
'd', omitable =
false);
588 parameter =
new G4UIparameter (
"start-time-unit",
's', omitable =
false);
591 parameter =
new G4UIparameter (
"time-range",
'd', omitable =
true);
594 parameter =
new G4UIparameter (
"time-range-unit",
's', omitable =
true);
646 G4VViewer* currentViewer = fpVisManager->GetCurrentViewer();
647 if (!currentViewer) {
650 "ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer."
658 if (command == fpCommandAll) {
659 G4VViewer* fromViewer = fpVisManager->GetViewer(newValue);
663 "ERROR: G4VisCommandsViewerSet::SetNewValue: all:"
664 "\n unrecognised from-viewer."
669 if (fromViewer == currentViewer) {
672 "WARNING: G4VisCommandsViewerSet::SetNewValue: all:"
673 "\n from-viewer and current viewer are identical."
679 G4bool currentAutoRefresh =
684 const std::vector<G4ModelingParameters::VisAttributesModifier>*
687 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator i;
688 for (i = privateVAMs->begin(); i != privateVAMs->end(); ++i) {
693 G4cout <<
"View parameters of viewer \"" << currentViewer->
GetName()
694 <<
"\"\n set to those of viewer \"" << fromViewer->
GetName()
699 G4cout <<
"You may need \"/vis/viewer/rebuild\"."
704 else if (command == fpCommandAutoRefresh) {
712 << currentViewer->
GetName() <<
" is NOT auto-refesh by default"
713 <<
"\n so cannot be set to auto-refresh."
722 G4cout <<
"be automatically refreshed after a change of view parameters."
731 else if (command == fpCommandAuxEdge) {
734 G4cout <<
"Auxiliary edges will ";
740 else if (command == fpCommandBackground) {
743 std::istringstream iss(newValue);
744 iss >> redOrString >> green >> blue >> opacity;
746 ConvertToColour(colour, redOrString, green, blue, opacity);
749 G4cout <<
"Background colour "
756 else if (command == fpCommandCulling) {
757 G4String cullingOption, stringFlag, unit;
759 std::istringstream is (newValue);
760 is >> cullingOption >> stringFlag >> density >> unit;
762 if (cullingOption ==
"global") {
766 "G4VisCommandsViewerSet::SetNewValue: culling: global culling flag"
768 ".\n Does not change specific culling flags."
772 else if (cullingOption ==
"coveredDaughters") {
776 "G4VisCommandsViewerSet::SetNewValue: culling: culling covered"
777 "\n daughters flag set to "
779 ". Daughters covered by opaque mothers"
780 "\n will be culled, i.e., not drawn, if this flag is true."
781 "\n Note: this is only effective in surface drawing style,"
782 "\n and then only if the volumes are visible and opaque, and then"
783 "\n only if no sections or cutaways are in operation."
787 else if (cullingOption ==
"invisible") {
791 "G4VisCommandsViewerSet::SetNewValue: culling: culling invisible"
794 ". Volumes marked invisible will be culled,"
795 "\n i.e., not drawn, if this flag is true."
799 else if (cullingOption ==
"density") {
801 "G4VisCommandsViewerSet::SetNewValue: culling: culling by density";
805 if (ProvideValueOfUnit(where,unit,
"Volumic Mass",valueOfUnit)) {
808 density *= valueOfUnit;
822 <<
". Volumes with density less than "
824 <<
"\n will be culled, i.e., not drawn, if this flag is true."
831 "ERROR: G4VisCommandsViewerSet::SetNewValue: culling:"
832 "\n option not recognised."
838 else if (command == fpCommandCutawayMode) {
839 if (newValue ==
"add" || newValue ==
"union")
841 if (newValue ==
"multiply" || newValue ==
"intersection")
845 G4cout <<
"Cutaway mode set to ";
849 G4cout <<
"cutawayIntersection";
854 else if (command == fpCommandDefaultColour) {
857 std::istringstream iss(newValue);
858 iss >> redOrString >> green >> blue >> opacity;
860 ConvertToColour(colour, redOrString, green, blue, opacity);
865 G4cout <<
"Default colour "
872 else if (command == fpCommandDefaultTextColour) {
875 std::istringstream iss(newValue);
876 iss >> redOrString >> green >> blue >> opacity;
878 ConvertToColour(colour, redOrString, green, blue, opacity);
883 G4cout <<
"Default colour "
890 else if (command == fpCommandEdge) {
893 switch (existingStyle) {
908 switch (existingStyle) {
923 G4cout <<
"Drawing style of viewer \"" << currentViewer->
GetName()
929 else if (command == fpCommandExplodeFactor) {
932 std::istringstream is (newValue);
933 is >> explodeFactor >> x >> y >> z >> unitString;
944 else if (command == fpCommandGlobalLineWidthScale) {
946 = fpCommandGlobalLineWidthScale->GetNewDoubleValue(newValue);
949 G4cout <<
"Global Line Width Scale changed to "
954 else if (command == fpCommandGlobalMarkerScale) {
956 = fpCommandGlobalMarkerScale->GetNewDoubleValue(newValue);
959 G4cout <<
"Global Marker Scale changed to "
964 else if (command == fpCommandHiddenEdge) {
967 switch (existingStyle) {
983 switch (existingStyle) {
999 G4cout <<
"Drawing style of viewer \"" << currentViewer->
GetName()
1005 else if (command == fpCommandHiddenMarker) {
1010 G4cout <<
"Markers will ";
1016 else if (command == fpCommandLightsMove) {
1017 if (newValue.find(
"cam") != G4String::npos)
1019 else if(newValue.find(
"obj") != G4String::npos)
1023 G4cerr <<
"ERROR: \"" << newValue <<
"\" not recognised."
1024 " Looking for \"cam\" or \"obj\" in string." <<
G4endl;
1028 G4cout <<
"Lights move with ";
1030 G4cout <<
"camera (object appears to rotate).";
1031 else G4cout <<
"object (the viewer appears to be moving).";
1036 else if (command == fpCommandLightsThetaPhi) {
1038 if (ConvertToDoublePair(newValue, theta, phi)) {
1039 G4double x = std::sin (theta) * std::cos (phi);
1040 G4double y = std::sin (theta) * std::sin (phi);
1045 G4cout <<
"Lights direction set to "
1051 else if (command == fpCommandLightsVector) {
1055 G4cout <<
"Lights direction set to "
1060 else if (command == fpCommandLineSegments) {
1065 "Number of line segements per circle in polygon approximation is "
1070 else if (command == fpCommandNumberOfCloudPoints) {
1075 "Number of points to be used in cloud representation of volumes is "
1080 else if (command == fpCommandPicking) {
1085 else G4cout <<
"inhibited.";
1089 G4cout <<
"You may need to issue \"/vis/viewer/update\"."
1094 else if (command == fpCommandProjection) {
1096 const size_t iPos0 = 0;
1097 if (newValue[iPos0] ==
'o') {
1098 fieldHalfAngle = 0.;
1100 else if (newValue[iPos0] ==
'p') {
1103 std::istringstream is (newValue);
1104 is >> dummy >> fieldHalfAngle >> unit;
1106 if (fieldHalfAngle > 89.5 *
deg || fieldHalfAngle <= 0.0) {
1109 "ERROR: Field half angle should be 0 < angle <= 89.5 degrees.";
1117 G4cerr <<
"ERROR: \"" << newValue <<
"\" not recognised."
1118 " Looking for 'o' or 'p' first character." <<
G4endl;
1124 G4cout <<
"Projection style of viewer \"" << currentViewer->
GetName()
1126 if (fieldHalfAngle == 0.) {
1130 G4cout <<
"perspective\n with half angle " << fieldHalfAngle /
deg
1137 else if (command == fpCommandSectionPlane) {
1140 std::istringstream is (newValue);
1141 is >> choice >> x >> y >> z >> unit >> nx >> ny >> nz;
1142 G4int iSelector = -1;
1147 if (iSelector < 0) {
1149 G4cout <<
"Choice not recognised (on/true or off/false)." <<
G4endl;
1154 switch (iSelector) {
1160 x *= F; y *= F; z *= F;
1161 if (nx == 0. && ny == 0. && nz == 0.) {
1174 G4cout <<
"Section drawing is: ";
1177 G4cout <<
".\nSection plane is now: "
1183 else if (command == fpCommandRotationStyle) {
1185 if (newValue ==
"constrainUpDirection")
1187 else if (newValue ==
"freeRotation")
1191 G4cerr <<
"ERROR: \"" << newValue <<
"\" not recognised." <<
G4endl;
1197 G4cout <<
"Rotation style of viewer \"" << currentViewer->
GetName()
1203 else if (command == fpCommandStyle) {
1205 const size_t iPos0 = 0;
1206 if (newValue[iPos0] ==
'w') {
1207 switch (existingStyle) {
1223 else if (newValue[iPos0] ==
's') {
1224 switch (existingStyle) {
1240 else if (newValue[iPos0] ==
'c') {
1241 switch (existingStyle) {
1260 G4cerr <<
"ERROR: \"" << newValue <<
"\" not recognised."
1261 " Looking for 'w' or 's' or 'c' first character." <<
G4endl;
1266 G4cout <<
"Drawing style of viewer \"" << currentViewer->
GetName()
1272 else if (command == fpCommandTargetPoint) {
1274 fpCommandTargetPoint->GetNew3VectorValue(newValue);
1279 G4cout <<
"Target point set to "
1280 << fpCommandTargetPoint->ConvertToStringWithBestUnit
1282 <<
"\n\"Current Target Point\" set to "
1283 << fpCommandTargetPoint->ConvertToStringWithBestUnit
1285 <<
"\n\"Standard Target Point\" is "
1286 << fpCommandTargetPoint->ConvertToStringWithBestUnit
1287 (standardTargetPoint)
1292 else if (command == fpCommandUpThetaPhi) {
1294 if (ConvertToDoublePair(newValue, theta, phi)) {
1295 G4double x = std::sin (theta) * std::cos (phi);
1296 G4double y = std::sin (theta) * std::sin (phi);
1306 else if (command == fpCommandUpVector) {
1314 else if (command == fpCommandViewpointThetaPhi) {
1316 if (ConvertToDoublePair(newValue, theta, phi)) {
1317 G4double x = std::sin (theta) * std::cos (phi);
1318 G4double y = std::sin (theta) * std::sin (phi);
1323 G4cout <<
"Viewpoint direction set to "
1326 G4cout <<
"Lightpoint direction set to "
1333 else if (command == fpCommandViewpointVector) {
1335 if (viewpointVector.
mag2() <= 0.) {
1337 G4cerr <<
"ERROR: Null viewpoint vector. No action taken." <<
G4endl;
1340 fViewpointVector = viewpointVector.
unit();
1343 G4cout <<
"Viewpoint direction set to "
1346 G4cout <<
"Lightpoint direction set to "
1353 else if (command == fpCommandTimeWindowDisplayHeadTime)
1356 G4double screenX, screenY, screenSize, red, green, blue;
1357 std::istringstream iss(newValue);
1358 iss >> display >> screenX >> screenY
1359 >> screenSize >> red >> green >> blue;
1368 G4cout <<
"Display head time flag set: "
1374 else if (command == fpCommandTimeWindowDisplayLightFront)
1376 G4String display, originX, originY, originZ, unitS, originT, unitT;
1378 std::istringstream iss(newValue);
1380 >> originX >> originY >> originZ >> unitS
1382 >> red >> green >> blue;
1396 G4cout <<
"Display light front flag set: "
1402 else if (command == fpCommandTimeWindowEndTime)
1404 G4String end_time_string, end_time_unit,
1405 time_range_string, time_range_unit;
1406 std::istringstream iss(newValue);
1407 iss >> end_time_string >> end_time_unit
1408 >> time_range_string >> time_range_unit;
1411 (
G4String(end_time_string +
' ' + end_time_unit)));
1413 (
G4String(time_range_string +
' ' + time_range_unit));
1414 if (timeRange > 0.) {
1421 <<
", time window end time: " << vp.
GetEndTime()/
ns <<
" ns";
1422 if (timeRange > 0.) {
1423 G4cout <<
"\n (time range: " << timeRange/
ns <<
" ns)";
1429 else if (command == fpCommandTimeWindowFadeFactor) {
1437 else if (command == fpCommandTimeWindowStartTime)
1439 G4String start_time_string, start_time_unit,
1440 time_range_string, time_range_unit;
1441 std::istringstream iss(newValue);
1442 iss >> start_time_string >> start_time_unit
1443 >> time_range_string >> time_range_unit;
1446 (
G4String(start_time_string +
' ' + start_time_unit)));
1448 (
G4String(time_range_string +
' ' + time_range_unit));
1449 if (timeRange > 0.) {
1456 <<
", time window end time: " << vp.
GetEndTime()/
ns <<
" ns";
1457 if (timeRange > 0.) {
1458 G4cout <<
"\n (time range: " << timeRange/
ns <<
" ns)";
1467 "ERROR: G4VisCommandsViewerSet::SetNewValue: unrecognised command."
1473 SetViewParameters(currentViewer,vp);