47 :
51{
54
57 ("Copies view parameters.");
59 ("Copies view parameters (except the autoRefresh status) from"
60 "\nfrom-viewer to current viewer.");
62
64 ("/vis/viewer/set/autoRefresh",this);
65 fpCommandAutoRefresh->
SetGuidance(
"Sets auto-refresh.");
67 ("If true, view is automatically refreshed after a change of"
68 "\nview parameters.");
71
73 ("/vis/viewer/set/auxiliaryEdge",this);
74 fpCommandAuxEdge->
SetGuidance(
"Sets visibility of auxiliary edges");
76 ("Auxiliary edges, i.e., those that are part of a curved surface,"
77 "\nsometimes called soft edges, become visible/invisible.");
80
82 ("/vis/viewer/set/background",this);
84 ("Set background colour and transparency (default black and opaque).");
86 ("Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or"
87 "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..."
88 "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\""
89 "\n or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters),"
90 "\n e.g. \"! ! ! 0.\" for a transparent background.");
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 ancester volumes in surface drawing mode,"
111 "\nand then only if the ancesters 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 (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);
136
137 fpCommandCutawayMode =
140 ("Sets cutaway mode - add (union) or multiply (intersection).");
142 fpCommandCutawayMode->
SetCandidates (
"add union multiply intersection");
144
146 ("/vis/viewer/set/defaultColour",this);
148 ("Set defaultColour colour and transparency (default white and opaque).");
150 ("Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or"
151 "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..."
152 "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\""
153 "\n or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters),"
154 "\n e.g. \"! ! ! 0.\" for a transparent colour.");
155 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
156 parameter -> SetDefaultValue ("1.");
157 fpCommandDefaultColour -> SetParameter (parameter);
158 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
159 parameter -> SetDefaultValue (1.);
160 fpCommandDefaultColour -> SetParameter (parameter);
161 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
162 parameter -> SetDefaultValue (1.);
163 fpCommandDefaultColour -> SetParameter (parameter);
164 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
165 parameter -> SetDefaultValue (1.);
166 fpCommandDefaultColour -> SetParameter (parameter);
167
169 ("/vis/viewer/set/defaultTextColour",this);
171 ("Set defaultTextColour colour and transparency (default white and opaque).");
173 ("Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or"
174 "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..."
175 "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\""
176 "\n or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters),"
177 "\n e.g. \"! ! ! 0.\" for a transparent colour.");
178 parameter =
new G4UIparameter(
"red_or_string",
's', omitable =
true);
179 parameter -> SetDefaultValue ("1.");
180 fpCommandDefaultTextColour -> SetParameter (parameter);
181 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
182 parameter -> SetDefaultValue (1.);
183 fpCommandDefaultTextColour -> SetParameter (parameter);
184 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
185 parameter -> SetDefaultValue (1.);
186 fpCommandDefaultTextColour -> SetParameter (parameter);
187 parameter =
new G4UIparameter (
"opacity",
'd', omitable =
true);
188 parameter -> SetDefaultValue (1.);
189 fpCommandDefaultTextColour -> SetParameter (parameter);
190
193 ("Edges become visible/invisible in surface mode.");
196
198 ("/vis/viewer/set/explodeFactor", this);
200 ("Moves top-level drawn volumes by this factor from this centre.");
201 parameter =
new G4UIparameter(
"explodeFactor",
'd', omitable=
true);
207 parameter->
SetGuidance (
"Coordinate of explode centre.");
211 parameter->
SetGuidance (
"Coordinate of explode centre.");
215 parameter->
SetGuidance (
"Coordinate of explode centre.");
219 parameter->
SetGuidance (
"Unit of explode centre.");
221
223 ("/vis/viewer/set/globalLineWidthScale", this);
225 ("Multiplies line widths by this factor.");
226 fpCommandGlobalLineWidthScale->
227 SetParameterName("scale-factor", omitable=true);
229
231 ("/vis/viewer/set/globalMarkerScale", this);
233 ("Multiplies marker sizes by this factor.");
234 fpCommandGlobalMarkerScale->
235 SetParameterName("scale-factor", omitable=true);
237
238 fpCommandHiddenEdge =
241 ("Edges become hidden/seen in wireframe or surface mode.");
244
245 fpCommandHiddenMarker =
248 ("If true, closer objects hide markers. Otherwise, markers always show.");
251
253 ("/vis/viewer/set/lightsMove",this);
255 ("Lights move with camera or with object");
258 ("cam camera with-camera obj object with-object");
259
261 ("/vis/viewer/set/lightsThetaPhi", this);
263 ("Set direction from target to lights.");
264 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
265 parameter -> SetDefaultValue(60.);
266 fpCommandLightsThetaPhi -> SetParameter (parameter);
268 parameter -> SetDefaultValue(45.);
269 fpCommandLightsThetaPhi -> SetParameter (parameter);
270 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
271 parameter -> SetDefaultValue ("deg");
272 fpCommandLightsThetaPhi -> SetParameter (parameter);
273
275 ("/vis/viewer/set/lightsVector", this);
277 ("Set direction from target to lights.");
279 parameter -> SetDefaultValue (1);
280 fpCommandLightsVector -> SetParameter (parameter);
282 parameter -> SetDefaultValue (1);
283 fpCommandLightsVector -> SetParameter (parameter);
285 parameter -> SetDefaultValue (1);
286 fpCommandLightsVector -> SetParameter (parameter);
287
289 ("/vis/viewer/set/lineSegmentsPerCircle",this);
291 ("Set number of sides per circle for polygon/polyhedron drawing.");
293 ("Refers to graphical representation of objects with curved lines/surfaces.");
296
298 ("/vis/viewer/set/picking",this);
299 fpCommandPicking->
SetGuidance(
"Sets picking, if available.");
301 ("If true, view is set up for picking, if available.");
303 ("You may need to issue \"/vis/viewer/update\".");
305 ("For required actions, watch for instructions for viewer.");
308
309 fpCommandProjection =
new G4UIcommand(
"/vis/viewer/set/projection",
this);
311 ("Orthogonal or perspective projection.");
312 parameter =
new G4UIparameter(
"projection",
's',omitable =
true);
316 parameter =
new G4UIparameter(
"field-half-angle",
'd',omitable =
true);
318
322
324
326 ("/vis/viewer/set/rotationStyle",this);
328 ("Set style of rotation - constrainUpDirection or freeRotation.");
330 ("constrainUpDirection: conventional HEP view.");
332 ("freeRotation: Google-like rotation, using mouse-grab.");
334 fpCommandRotationStyle->
SetCandidates(
"constrainUpDirection freeRotation");
335
336 fpCommandSectionPlane =
new G4UIcommand(
"/vis/viewer/set/sectionPlane",
this);
337 fpCommandSectionPlane -> SetGuidance
338 ("Set plane for drawing section (DCUT).");
339 fpCommandSectionPlane -> SetGuidance
340 ("E.g., for a y-z plane at x = 1 cm:"
341 "\n\"/vis/viewer/set/sectionPlane on 1 0 0 cm 1 0 0\"."
342 "\nTo turn off: /vis/viewer/set/sectionPlane off");
344 parameter -> SetDefaultValue ("on");
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 (0);
356 parameter -> SetGuidance ("Coordinate of point on the plane.");
359 parameter -> SetDefaultValue ("m");
360 parameter -> SetGuidance ("Unit of point on the plane.");
363 parameter -> SetDefaultValue (1);
364 parameter -> SetGuidance ("Component of plane normal.");
367 parameter -> SetDefaultValue (0);
368 parameter -> SetGuidance ("Component of plane normal.");
371 parameter -> SetDefaultValue (0);
372 parameter -> SetGuidance ("Component of plane normal.");
374
377 ("Set style of drawing - w[ireframe] or s[urface].");
379 ("(Hidden line drawing is controlled by \"/vis/viewer/set/hiddenEdge\".)");
381
383 ("/vis/viewer/set/targetPoint", this);
385 ("Set target point.");
387 ("This sets the \"Current Target Point\" relative to the \"Standard");
389 ("Target Point\" so that the actual target point is as requested.");
391 ("(See G4ViewParameters.hh for an explanation of target points.)");
394
396 ("/vis/viewer/set/upThetaPhi", this);
397 fpCommandUpThetaPhi -> SetGuidance ("Set up vector.");
398 fpCommandUpThetaPhi -> SetGuidance
399 ("Viewer will attempt always to show this direction upwards.");
400 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
401 parameter -> SetDefaultValue (90.);
402 fpCommandUpThetaPhi -> SetParameter (parameter);
404 parameter -> SetDefaultValue (90.);
405 fpCommandUpThetaPhi -> SetParameter (parameter);
406 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
407 parameter -> SetDefaultValue ("deg");
408 fpCommandUpThetaPhi -> SetParameter (parameter);
409
411 ("/vis/viewer/set/upVector", this);
412 fpCommandUpVector -> SetGuidance ("Set up vector.");
413 fpCommandUpVector -> SetGuidance
414 ("Viewer will attempt always to show this direction upwards.");
416 parameter -> SetDefaultValue (0.);
417 fpCommandUpVector -> SetParameter (parameter);
419 parameter -> SetDefaultValue (1.);
420 fpCommandUpVector -> SetParameter (parameter);
422 parameter -> SetDefaultValue (0.);
423 fpCommandUpVector -> SetParameter (parameter);
424
426 ("/vis/viewer/set/viewpointThetaPhi", this);
427 fpCommandViewpointThetaPhi -> SetGuidance
428 ("Set direction from target to camera.");
429 fpCommandViewpointThetaPhi -> SetGuidance
430 ("Also changes lightpoint direction if lights are set to move with camera.");
431 parameter =
new G4UIparameter(
"theta",
'd', omitable =
true);
432 parameter -> SetDefaultValue (60.);
433 fpCommandViewpointThetaPhi -> SetParameter (parameter);
435 parameter -> SetDefaultValue (45.);
436 fpCommandViewpointThetaPhi -> SetParameter (parameter);
437 parameter =
new G4UIparameter (
"unit",
's', omitable =
true);
438 parameter -> SetDefaultValue ("deg");
439 fpCommandViewpointThetaPhi -> SetParameter (parameter);
440
442 ("/vis/viewer/set/viewpointVector", this);
443 fpCommandViewpointVector -> SetGuidance
444 ("Set direction from target to camera.");
445 fpCommandViewpointVector -> SetGuidance
446 ("Also changes lightpoint direction if lights are set to move with camera.");
448 parameter -> SetDefaultValue (1.);
449 fpCommandViewpointVector -> SetParameter (parameter);
451 parameter -> SetDefaultValue (1.);
452 fpCommandViewpointVector -> SetParameter (parameter);
454 parameter -> SetDefaultValue (1.);
455 fpCommandViewpointVector -> SetParameter (parameter);
456}
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 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 SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
void SetParameterRange(const char *theRange)
void SetParameterCandidates(const char *theString)