49 :
53{
56
59 ("Copies view parameters.");
61 ("Copies ALL view parameters (except the autoRefresh status) from"
62 "\nfrom-viewer to current viewer. You may need \"/vis/viewer/rebuild\".");
64 ("Note: to copy only the camera-specific parameters use"
65 "\n\"/vis/viewer/copyfrom\".");
67
69 ("/vis/viewer/set/autoRefresh",this);
70 fpCommandAutoRefresh->
SetGuidance(
"Sets auto-refresh.");
72 ("If true, view is automatically refreshed after a change of"
73 "\nview parameters.");
76
78 ("/vis/viewer/set/auxiliaryEdge",this);
79 fpCommandAuxEdge->
SetGuidance(
"Sets visibility of auxiliary edges");
81 ("Auxiliary edges, i.e., those that are part of a curved surface,"
82 "\nsometimes called soft edges, become visible/invisible.");
85
87 ("/vis/viewer/set/background",this);
89 ("Set background colour and transparency (default black and opaque).");
91 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
92 parameter -> SetDefaultValue ("0.");
93 fpCommandBackground -> SetParameter (parameter);
95 parameter -> SetDefaultValue (0.);
96 fpCommandBackground -> SetParameter (parameter);
98 parameter -> SetDefaultValue (0.);
99 fpCommandBackground -> SetParameter (parameter);
100 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
101 parameter -> SetDefaultValue (1.);
102 fpCommandBackground -> SetParameter (parameter);
103
104 fpCommandCulling =
new G4UIcommand(
"/vis/viewer/set/culling",
this);
105 fpCommandCulling->
SetGuidance (
"Set culling options.");
107 ("\"global\": enables/disables all other culling options.");
109 ("\"coveredDaughters\": culls, i.e., eliminates, volumes that would not"
110 "\nbe seen because covered by ancestor volumes in surface drawing mode,"
111 "\nand then only if the ancestors are visible and opaque, and then only"
112 "\nif no sections or cutaways are in operation. Intended solely to"
113 "\nimprove the speed of rendering visible volumes.");
115 ("\"invisible\": culls objects with the invisible attribute set.");
117 ("\"density\": culls volumes with density lower than threshold. Useful"
118 "\nfor eliminating \"container volumes\" with no physical correspondence,"
119 "\nwhose material is usually air. If this is selected, provide threshold"
120 "\ndensity and unit (e.g., g/cm3, mg/cm3 or kg/m3)."
121 );
122 parameter =
new G4UIparameter(
"culling-option",
's',omitable =
false);
124 ("global coveredDaughters invisible density");
129 parameter =
new G4UIparameter(
"density-threshold",
'd',omitable =
true);
133
134
137
138 fpCommandCutawayMode =
141 ("Sets cutaway mode - add (union) or multiply (intersection).");
143 fpCommandCutawayMode->
SetCandidates (
"add union multiply intersection");
145
147 ("/vis/viewer/set/defaultColour",this);
149 ("Set defaultColour colour and transparency (default white and opaque).");
151 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
152 parameter -> SetDefaultValue ("1.");
153 fpCommandDefaultColour -> SetParameter (parameter);
154 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
155 parameter -> SetDefaultValue (1.);
156 fpCommandDefaultColour -> SetParameter (parameter);
157 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
158 parameter -> SetDefaultValue (1.);
159 fpCommandDefaultColour -> SetParameter (parameter);
160 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
161 parameter -> SetDefaultValue (1.);
162 fpCommandDefaultColour -> SetParameter (parameter);
163
165 ("/vis/viewer/set/defaultTextColour",this);
167 ("Set defaultTextColour colour and transparency (default blue and opaque).");
169 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
170 parameter -> SetDefaultValue ("0.");
171 fpCommandDefaultTextColour -> SetParameter (parameter);
172 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
173 parameter -> SetDefaultValue (0.);
174 fpCommandDefaultTextColour -> SetParameter (parameter);
175 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
176 parameter -> SetDefaultValue (1.);
177 fpCommandDefaultTextColour -> SetParameter (parameter);
178 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
179 parameter -> SetDefaultValue (1.);
180 fpCommandDefaultTextColour -> SetParameter (parameter);
181
184 ("Edges become visible/invisible in surface mode.");
187
189 ("/vis/viewer/set/explodeFactor", this);
191 ("Moves top-level drawn volumes by this factor from this centre.");
192 parameter =
new G4UIparameter(
"explodeFactor",
'd', omitable=
true);
198 parameter->
SetGuidance (
"Coordinate of explode centre.");
202 parameter->
SetGuidance (
"Coordinate of explode centre.");
206 parameter->
SetGuidance (
"Coordinate of explode centre.");
210 parameter->
SetGuidance (
"Unit of explode centre.");
212
214 ("/vis/viewer/set/globalLineWidthScale", this);
216 ("Multiplies line widths by this factor.");
217 fpCommandGlobalLineWidthScale->
218 SetParameterName("scale-factor", omitable=true);
220
222 ("/vis/viewer/set/globalMarkerScale", this);
224 ("Multiplies marker sizes by this factor.");
225 fpCommandGlobalMarkerScale->
226 SetParameterName("scale-factor", omitable=true);
228
229 fpCommandHiddenEdge =
232 ("Edges become hidden/seen in wireframe or surface mode.");
235
236 fpCommandHiddenMarker =
239 ("If true, closer objects hide markers. Otherwise, markers always show.");
242
244 ("/vis/viewer/set/lightsMove",this);
246 ("Lights move with camera or with object");
249 ("cam camera with-camera obj object with-object");
250
252 ("/vis/viewer/set/lightsThetaPhi", this);
254 ("Set direction from target to lights.");
255 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
256 parameter -> SetDefaultValue(60.);
257 fpCommandLightsThetaPhi -> SetParameter (parameter);
259 parameter -> SetDefaultValue(45.);
260 fpCommandLightsThetaPhi -> SetParameter (parameter);
261 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
262 parameter -> SetDefaultValue ("deg");
263 fpCommandLightsThetaPhi -> SetParameter (parameter);
264
266 ("/vis/viewer/set/lightsVector", this);
268 ("Set direction from target to lights.");
270 parameter -> SetDefaultValue (1);
271 fpCommandLightsVector -> SetParameter (parameter);
273 parameter -> SetDefaultValue (1);
274 fpCommandLightsVector -> SetParameter (parameter);
276 parameter -> SetDefaultValue (1);
277 fpCommandLightsVector -> SetParameter (parameter);
278
280 ("/vis/viewer/set/lineSegmentsPerCircle",this);
282 ("Set number of sides per circle for polygon/polyhedron drawing.");
284 ("Refers to graphical representation of objects with curved lines/surfaces.");
287
289 ("/vis/viewer/set/lineWidth",this);
291 ("Use \"/vis/viewer/set/globalLineWidthScale\" instead."
292 "\nFor trajectories use \"/vis/modeling/trajectories/*/default/setLineWidth\"."
293 "\nFor volumes use \"/vis/geometry/set/lineWidth\".");
294
296 ("/vis/viewer/set/numberOfCloudPoints",this);
298 ("Set number of points to be used for cloud representation of volumes.");
301
303 ("/vis/viewer/set/picking",this);
304 fpCommandPicking->
SetGuidance(
"Sets picking, if available.");
306 ("If true, view is set up for picking, if available.");
308 ("You may need to issue \"/vis/viewer/update\".");
310 ("For required actions, watch for instructions for viewer.");
313
314 fpCommandProjection =
new G4UIcommand(
"/vis/viewer/set/projection",
this);
316 ("Set projection style - o[rthogonal] or p[erspective]."
317 "\nIf p[erspective], also set field half angle.");
318 parameter =
new G4UIparameter(
"projection",
's',omitable =
true);
322 parameter =
new G4UIparameter(
"field-half-angle",
'd',omitable =
true);
324
328
330
332 ("/vis/viewer/set/rotationStyle",this);
334 ("Set style of rotation - constrainUpDirection or freeRotation.");
336 ("constrainUpDirection: conventional HEP view.");
338 ("freeRotation: Google-like rotation, using mouse-grab.");
340 fpCommandRotationStyle->
SetCandidates(
"constrainUpDirection freeRotation");
341
342 fpCommandSectionPlane =
new G4UIcommand(
"/vis/viewer/set/sectionPlane",
this);
343 fpCommandSectionPlane -> SetGuidance
344 ("Set plane for drawing section (DCUT).");
345 fpCommandSectionPlane -> SetGuidance
346 ("E.g., for a y-z plane at x = 1 cm:"
347 "\n\"/vis/viewer/set/sectionPlane on 1 0 0 cm 1 0 0\"."
348 "\nTo turn off: /vis/viewer/set/sectionPlane off");
350 parameter -> SetDefaultValue ("on");
353 parameter -> SetDefaultValue (0);
354 parameter -> SetGuidance ("Coordinate of point on the plane.");
357 parameter -> SetDefaultValue (0);
358 parameter -> SetGuidance ("Coordinate of point on the plane.");
361 parameter -> SetDefaultValue (0);
362 parameter -> SetGuidance ("Coordinate of point on the plane.");
365 parameter -> SetDefaultValue ("m");
366 parameter -> SetGuidance ("Unit of point on the plane.");
369 parameter -> SetDefaultValue (1);
370 parameter -> SetGuidance ("Component of plane normal.");
373 parameter -> SetDefaultValue (0);
374 parameter -> SetGuidance ("Component of plane normal.");
377 parameter -> SetDefaultValue (0);
378 parameter -> SetGuidance ("Component of plane normal.");
380
382 ("/vis/viewer/set/specialMeshRendering",this);
383 fpCommandSpecialMeshRendering -> SetGuidance
384 ("Request special rendering of volumes (meshes) that use G4VParameterisation.");
387
389 ("/vis/viewer/set/specialMeshRenderingOption",this);
391 ("Set special mesh rendering option - \"default\", \"dots\" or \"surfaces\".");
392 fpCommandSpecialMeshRenderingOption->
SetParameterName (
"option",omitable =
true);
393 fpCommandSpecialMeshRenderingOption->
SetCandidates(
"default dots surfaces");
395
397 ("/vis/viewer/set/specialMeshVolumes",this);
398 fpCommandSpecialMeshVolumes -> SetGuidance
399 ("Specify the volumes for special rendering. No arguments resets the list"
400 "\nand is interpreted to mean \"all found meshes\".");
402 ("Please provide a list of space-separated physical volume names and copy"
403 "\nnumber pairs. Negative copy number means \"all volumes of that name\".");
404 parameter =
new G4UIparameter(
"volumes",
's',omitable =
true);
406 ("List of physical volume names and copy number pairs");
408
411 ("Set style of drawing - w[ireframe] or s[urface] or c[loud].");
413 ("(Hidden line drawing is controlled by \"/vis/viewer/set/hiddenEdge\".)");
415 fpCommandStyle->
SetCandidates(
"w wireframe s surface c cloud");
416
418 ("/vis/viewer/set/targetPoint", this);
420 ("Set target point.");
422 ("This sets the \"Current Target Point\" relative to the \"Standard");
424 ("Target Point\" so that the actual target point is as requested.");
426 ("(See G4ViewParameters.hh for an explanation of target points.)");
429
431 ("/vis/viewer/set/upThetaPhi", this);
432 fpCommandUpThetaPhi -> SetGuidance ("Set up vector.");
433 fpCommandUpThetaPhi -> SetGuidance
434 ("Viewer will attempt always to show this direction upwards.");
435 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
436 parameter -> SetDefaultValue (90.);
437 fpCommandUpThetaPhi -> SetParameter (parameter);
439 parameter -> SetDefaultValue (90.);
440 fpCommandUpThetaPhi -> SetParameter (parameter);
441 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
442 parameter -> SetDefaultValue ("deg");
443 fpCommandUpThetaPhi -> SetParameter (parameter);
444
446 ("/vis/viewer/set/upVector", this);
447 fpCommandUpVector -> SetGuidance ("Set up vector.");
448 fpCommandUpVector -> SetGuidance
449 ("Viewer will attempt always to show this direction upwards.");
451 parameter -> SetDefaultValue (0.);
452 fpCommandUpVector -> SetParameter (parameter);
454 parameter -> SetDefaultValue (1.);
455 fpCommandUpVector -> SetParameter (parameter);
457 parameter -> SetDefaultValue (0.);
458 fpCommandUpVector -> SetParameter (parameter);
459
461 ("/vis/viewer/set/viewpointThetaPhi", this);
462 fpCommandViewpointThetaPhi -> SetGuidance
463 ("Set direction from target to camera.");
464 fpCommandViewpointThetaPhi -> SetGuidance
465 ("Also changes lightpoint direction if lights are set to move with camera.");
466 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
467 parameter -> SetDefaultValue (60.);
468 fpCommandViewpointThetaPhi -> SetParameter (parameter);
470 parameter -> SetDefaultValue (45.);
471 fpCommandViewpointThetaPhi -> SetParameter (parameter);
472 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
473 parameter -> SetDefaultValue ("deg");
474 fpCommandViewpointThetaPhi -> SetParameter (parameter);
475
477 ("/vis/viewer/set/viewpointVector", this);
478 fpCommandViewpointVector -> SetGuidance
479 ("Set direction from target to camera.");
480 fpCommandViewpointVector -> SetGuidance
481 ("Also changes lightpoint direction if lights are set to move with camera.");
483 parameter -> SetDefaultValue (1.);
484 fpCommandViewpointVector -> SetParameter (parameter);
486 parameter -> SetDefaultValue (1.);
487 fpCommandViewpointVector -> SetParameter (parameter);
489 parameter -> SetDefaultValue (1.);
490 fpCommandViewpointVector -> SetParameter (parameter);
491
492 fpTimeWindowDirectory =
new G4UIdirectory (
"/vis/viewer/set/timeWindow/");
493 fpTimeWindowDirectory -> SetGuidance ("Set time window parameters of current viewer.");
495 "For these commands use"
496 "\n /vis/scene/add/trajectories rich"
497 "\n /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.01 ns"
498 "\nthen typically"
499 "\n /vis/viewer/set/timeWindow/displayLightFront true 0 0 -50 cm -0.5 ns"
500 "\n /vis/viewer/set/timeWindow/displayHeadTime true"
501 "\n /vis/viewer/set/timeWindow/fadeFactor 1"
502 "\n /run/beamOn # or several until you get a good event or events"
503 "\n /vis/viewer/set/timeWindow/startTime 0 ns 1 ns"
504 "\n /vis/viewer/save"
505 "\n /vis/viewer/set/timeWindow/startTime 1 ns 1 ns"
506 "\nthen zoom, pan etc to a view of interest and"
507 "\n /vis/viewer/save"
508 "\nthen repeat with next start time, another view and a save, then try"
509 "\n /vis/viewer/interpolate";
510
511 fpCommandTimeWindowDisplayHeadTime =
512 new G4UIcommand(
"/vis/viewer/set/timeWindow/displayHeadTime",
this);
514 ("Display head time of range in 2D text.");
515 fpCommandTimeWindowDisplayHeadTime->
SetGuidance(timeWindowGuidance);
516 parameter =
new G4UIparameter (
"displayHeadTime",
'b', omitable =
false);
518 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
519 parameter =
new G4UIparameter (
"screenX",
'd', omitable =
true);
523 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
524 parameter =
new G4UIparameter (
"screenY",
'd', omitable =
true);
528 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
529 parameter =
new G4UIparameter (
"screenSize",
'd', omitable =
true);
531 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
535 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
536 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
539 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
540 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
543 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
544
545 fpCommandTimeWindowDisplayLightFront =
546 new G4UIcommand(
"/vis/viewer/set/timeWindow/displayLightFront",
this);
548 ("Display the light front at head time.");
550 ("Tip: The trajectories can appear of jump ahead of the light front"
551 "\nbecause their time range overlaps the viewer's time range. To"
552 "\naverage out this discrete time effect, advance the light front by"
553 "\nhalf the trajectories interval. E.g., if the trajectory time slice"
554 "\ninterval is 0.01 ns:"
555 "\n /vis/viewer/set/timeWindow/displayLightFront true -90 0 0 mm -0.005 ns"
556 "\nTo prevent them beating the light front at all:"
557 "\n /vis/viewer/set/timeWindow/displayLightFront true -90 0 0 mm -0.01 ns");
558 fpCommandTimeWindowDisplayLightFront->
SetGuidance(timeWindowGuidance);
559 parameter =
new G4UIparameter (
"displayLightFront",
'b', omitable =
true);
561 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
562 parameter =
new G4UIparameter (
"originX",
'd', omitable =
true);
564 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
565 parameter =
new G4UIparameter (
"originY",
'd', omitable =
true);
567 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
568 parameter =
new G4UIparameter (
"originZ",
'd', omitable =
true);
570 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
571 parameter =
new G4UIparameter (
"space_unit",
's', omitable =
true);
573 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
574 parameter =
new G4UIparameter (
"originT",
'd', omitable =
true);
576 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
577 parameter =
new G4UIparameter (
"time_unit",
's', omitable =
true);
579 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
583 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
584 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
587 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
588 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
591 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
592
593 fpCommandTimeWindowEndTime =
594 new G4UIcommand(
"/vis/viewer/set/timeWindow/endTime",
this);
595 fpCommandTimeWindowEndTime->
SetGuidance(
"Set end and range of track time.");
596 fpCommandTimeWindowEndTime->
SetGuidance(timeWindowGuidance);
597 parameter =
new G4UIparameter (
"end-time",
'd', omitable =
false);
600 parameter =
new G4UIparameter (
"end-time-unit",
's', omitable =
false);
603 parameter =
new G4UIparameter (
"time-range",
'd', omitable =
true);
606 parameter =
new G4UIparameter (
"time-range-unit",
's', omitable =
true);
609
610 fpCommandTimeWindowFadeFactor =
613 ("0: no fade; 1: maximum fade with time window.");
614 fpCommandTimeWindowFadeFactor->
SetGuidance(timeWindowGuidance);
615 fpCommandTimeWindowFadeFactor->
SetParameterName(
"fade_factor", omitable =
false);
616 fpCommandTimeWindowFadeFactor->
SetRange(
"fade_factor>=0.&&fade_factor<=1.");
618
619 fpCommandTimeWindowStartTime =
620 new G4UIcommand(
"/vis/viewer/set/timeWindow/startTime",
this);
621 fpCommandTimeWindowStartTime->
SetGuidance(
"Set start and range of track time.");
622 fpCommandTimeWindowStartTime->
SetGuidance(timeWindowGuidance);
623 parameter =
new G4UIparameter (
"start-time",
'd', omitable =
false);
626 parameter =
new G4UIparameter (
"start-time-unit",
's', omitable =
false);
629 parameter =
new G4UIparameter (
"time-range",
'd', omitable =
true);
632 parameter =
new G4UIparameter (
"time-range-unit",
's', omitable =
true);
635}
CLHEP::Hep3Vector G4ThreeVector
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetUnitCategory(const char *unitCategory)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4double defVal)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
void SetParameterRange(const char *theRange)
void SetParameterCandidates(const char *theString)
const G4String & ConvertToColourGuidance()
static constexpr G4double fVeryLongTime