46 :
50{
53
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\".");
64
66 ("/vis/viewer/set/autoRefresh",this);
67 fpCommandAutoRefresh->
SetGuidance(
"Sets auto-refresh.");
69 ("If true, view is automatically refreshed after a change of"
70 "\nview parameters.");
73
75 ("/vis/viewer/set/auxiliaryEdge",this);
76 fpCommandAuxEdge->
SetGuidance(
"Sets visibility of auxiliary edges");
78 ("Auxiliary edges, i.e., those that are part of a curved surface,"
79 "\nsometimes called soft edges, become visible/invisible.");
82
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.");
90 fpCommandBackground -> SetParameter (parameter);
92 parameter -> SetDefaultValue (0.);
93 fpCommandBackground -> SetParameter (parameter);
95 parameter -> SetDefaultValue (0.);
96 fpCommandBackground -> SetParameter (parameter);
97 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
98 parameter -> SetDefaultValue (1.);
99 fpCommandBackground -> SetParameter (parameter);
100
101 fpCommandCulling =
new G4UIcommand(
"/vis/viewer/set/culling",
this);
102 fpCommandCulling->
SetGuidance (
"Set culling options.");
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)."
118 );
119 parameter =
new G4UIparameter(
"culling-option",
's',omitable =
false);
121 ("global coveredDaughters invisible density");
126 parameter =
new G4UIparameter(
"density-threshold",
'd',omitable =
true);
130
131
134
135 fpCommandCutawayMode =
138 ("Sets cutaway mode - add (union) or multiply (intersection).");
140 fpCommandCutawayMode->
SetCandidates (
"add union multiply intersection");
142
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.");
150 fpCommandDefaultColour -> SetParameter (parameter);
151 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
152 parameter -> SetDefaultValue (1.);
153 fpCommandDefaultColour -> SetParameter (parameter);
154 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
155 parameter -> SetDefaultValue (1.);
156 fpCommandDefaultColour -> SetParameter (parameter);
157 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
158 parameter -> SetDefaultValue (1.);
159 fpCommandDefaultColour -> SetParameter (parameter);
160
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.");
168 fpCommandDefaultTextColour -> SetParameter (parameter);
169 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
170 parameter -> SetDefaultValue (0.);
171 fpCommandDefaultTextColour -> SetParameter (parameter);
172 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
173 parameter -> SetDefaultValue (1.);
174 fpCommandDefaultTextColour -> SetParameter (parameter);
175 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
176 parameter -> SetDefaultValue (1.);
177 fpCommandDefaultTextColour -> SetParameter (parameter);
178
181 ("Edges become visible/invisible in surface mode.");
184
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.");
209
211 ("/vis/viewer/set/globalLineWidthScale", this);
213 ("Multiplies line widths by this factor.");
214 fpCommandGlobalLineWidthScale->
215 SetParameterName("scale-factor", omitable=true);
217
219 ("/vis/viewer/set/globalMarkerScale", this);
221 ("Multiplies marker sizes by this factor.");
222 fpCommandGlobalMarkerScale->
223 SetParameterName("scale-factor", omitable=true);
225
226 fpCommandHiddenEdge =
229 ("Edges become hidden/seen in wireframe or surface mode.");
232
233 fpCommandHiddenMarker =
236 ("If true, closer objects hide markers. Otherwise, markers always show.");
239
241 ("/vis/viewer/set/lightsMove",this);
243 ("Lights move with camera or with object");
246 ("cam camera with-camera obj object with-object");
247
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.);
254 fpCommandLightsThetaPhi -> SetParameter (parameter);
256 parameter -> SetDefaultValue(45.);
257 fpCommandLightsThetaPhi -> SetParameter (parameter);
258 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
259 parameter -> SetDefaultValue ("deg");
260 fpCommandLightsThetaPhi -> SetParameter (parameter);
261
263 ("/vis/viewer/set/lightsVector", this);
265 ("Set direction from target to lights.");
267 parameter -> SetDefaultValue (1);
268 fpCommandLightsVector -> SetParameter (parameter);
270 parameter -> SetDefaultValue (1);
271 fpCommandLightsVector -> SetParameter (parameter);
273 parameter -> SetDefaultValue (1);
274 fpCommandLightsVector -> SetParameter (parameter);
275
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.");
284
286 ("/vis/viewer/set/numberOfCloudPoints",this);
288 ("Set number of points to be used for cloud representation of volumes.");
291
293 ("/vis/viewer/set/picking",this);
294 fpCommandPicking->
SetGuidance(
"Sets picking, if available.");
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.");
303
304 fpCommandProjection =
new G4UIcommand(
"/vis/viewer/set/projection",
this);
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);
314
318
320
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.");
330 fpCommandRotationStyle->
SetCandidates(
"constrainUpDirection freeRotation");
331
332 fpCommandSectionPlane =
new G4UIcommand(
"/vis/viewer/set/sectionPlane",
this);
333 fpCommandSectionPlane -> SetGuidance
334 ("Set plane for drawing section (DCUT).");
335 fpCommandSectionPlane -> SetGuidance
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.");
370
373 ("Set style of drawing - w[ireframe] or s[urface] or c[loud].");
375 ("(Hidden line drawing is controlled by \"/vis/viewer/set/hiddenEdge\".)");
377 fpCommandStyle->
SetCandidates(
"w wireframe s surface c cloud");
378
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.)");
391
393 ("/vis/viewer/set/upThetaPhi", this);
394 fpCommandUpThetaPhi -> SetGuidance ("Set up vector.");
395 fpCommandUpThetaPhi -> SetGuidance
396 ("Viewer will attempt always to show this direction upwards.");
397 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
398 parameter -> SetDefaultValue (90.);
399 fpCommandUpThetaPhi -> SetParameter (parameter);
401 parameter -> SetDefaultValue (90.);
402 fpCommandUpThetaPhi -> SetParameter (parameter);
403 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
404 parameter -> SetDefaultValue ("deg");
405 fpCommandUpThetaPhi -> SetParameter (parameter);
406
408 ("/vis/viewer/set/upVector", this);
409 fpCommandUpVector -> SetGuidance ("Set up vector.");
410 fpCommandUpVector -> SetGuidance
411 ("Viewer will attempt always to show this direction upwards.");
413 parameter -> SetDefaultValue (0.);
414 fpCommandUpVector -> SetParameter (parameter);
416 parameter -> SetDefaultValue (1.);
417 fpCommandUpVector -> SetParameter (parameter);
419 parameter -> SetDefaultValue (0.);
420 fpCommandUpVector -> SetParameter (parameter);
421
423 ("/vis/viewer/set/viewpointThetaPhi", this);
424 fpCommandViewpointThetaPhi -> SetGuidance
425 ("Set direction from target to camera.");
426 fpCommandViewpointThetaPhi -> SetGuidance
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.);
430 fpCommandViewpointThetaPhi -> SetParameter (parameter);
432 parameter -> SetDefaultValue (45.);
433 fpCommandViewpointThetaPhi -> SetParameter (parameter);
434 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
435 parameter -> SetDefaultValue ("deg");
436 fpCommandViewpointThetaPhi -> SetParameter (parameter);
437
439 ("/vis/viewer/set/viewpointVector", this);
440 fpCommandViewpointVector -> SetGuidance
441 ("Set direction from target to camera.");
442 fpCommandViewpointVector -> SetGuidance
443 ("Also changes lightpoint direction if lights are set to move with camera.");
445 parameter -> SetDefaultValue (1.);
446 fpCommandViewpointVector -> SetParameter (parameter);
448 parameter -> SetDefaultValue (1.);
449 fpCommandViewpointVector -> SetParameter (parameter);
451 parameter -> SetDefaultValue (1.);
452 fpCommandViewpointVector -> SetParameter (parameter);
453
454 fpTimeWindowDirectory =
new G4UIdirectory (
"/vis/viewer/set/timeWindow/");
455 fpTimeWindowDirectory -> SetGuidance ("Set time window parameters of current viewer.");
457 "For these commands use"
458 "\n /vis/scene/add/trajectories rich"
459 "\n /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.01 ns"
460 "\nthen typically"
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";
472
473 fpCommandTimeWindowDisplayHeadTime =
474 new G4UIcommand(
"/vis/viewer/set/timeWindow/displayHeadTime",
this);
476 ("Display head time of range in 2D text.");
477 fpCommandTimeWindowDisplayHeadTime->
SetGuidance(timeWindowGuidance);
478 parameter =
new G4UIparameter (
"displayHeadTime",
'b', omitable =
false);
480 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
481 parameter =
new G4UIparameter (
"screenX",
'd', omitable =
true);
485 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
486 parameter =
new G4UIparameter (
"screenY",
'd', omitable =
true);
490 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
491 parameter =
new G4UIparameter (
"screenSize",
'd', omitable =
true);
493 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
497 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
498 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
501 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
502 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
505 fpCommandTimeWindowDisplayHeadTime->
SetParameter(parameter);
506
507 fpCommandTimeWindowDisplayLightFront =
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");
520 fpCommandTimeWindowDisplayLightFront->
SetGuidance(timeWindowGuidance);
521 parameter =
new G4UIparameter (
"displayLightFront",
'b', omitable =
true);
523 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
524 parameter =
new G4UIparameter (
"originX",
'd', omitable =
true);
526 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
527 parameter =
new G4UIparameter (
"originY",
'd', omitable =
true);
529 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
530 parameter =
new G4UIparameter (
"originZ",
'd', omitable =
true);
532 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
533 parameter =
new G4UIparameter (
"space_unit",
's', omitable =
true);
535 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
536 parameter =
new G4UIparameter (
"originT",
'd', omitable =
true);
538 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
539 parameter =
new G4UIparameter (
"time_unit",
's', omitable =
true);
541 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
545 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
546 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
549 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
550 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
553 fpCommandTimeWindowDisplayLightFront->
SetParameter(parameter);
554
555 fpCommandTimeWindowEndTime =
556 new G4UIcommand(
"/vis/viewer/set/timeWindow/endTime",
this);
557 fpCommandTimeWindowEndTime->
SetGuidance(
"Set end and range of track time.");
558 fpCommandTimeWindowEndTime->
SetGuidance(timeWindowGuidance);
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);
571
572 fpCommandTimeWindowFadeFactor =
575 ("0: no fade; 1: maximum fade with time window.");
576 fpCommandTimeWindowFadeFactor->
SetGuidance(timeWindowGuidance);
577 fpCommandTimeWindowFadeFactor->
SetParameterName(
"fade_factor", omitable =
false);
578 fpCommandTimeWindowFadeFactor->
SetRange(
"fade_factor>=0.&&fade_factor<=1.");
580
581 fpCommandTimeWindowStartTime =
582 new G4UIcommand(
"/vis/viewer/set/timeWindow/startTime",
this);
583 fpCommandTimeWindowStartTime->
SetGuidance(
"Set start and range of track time.");
584 fpCommandTimeWindowStartTime->
SetGuidance(timeWindowGuidance);
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);
597}
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