Geant4-11
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes
G4VisCommandsViewerSet Class Reference

#include <G4VisCommandsViewerSet.hh>

Inheritance diagram for G4VisCommandsViewerSet:
G4VVisCommand G4UImessenger

Public Member Functions

G4bool CommandsShouldBeInMaster () const
 
 G4VisCommandsViewerSet ()
 
G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator!= (const G4UImessenger &messenger) const
 
G4bool operator== (const G4UImessenger &messenger) const
 
void SetNewValue (G4UIcommand *command, G4String newValue)
 
virtual ~G4VisCommandsViewerSet ()
 

Static Public Member Functions

static const G4ColourGetCurrentTextColour ()
 
static G4VisManagerGetVisManager ()
 
static void SetVisManager (G4VisManager *pVisManager)
 

Protected Member Functions

void AddUIcommand (G4UIcommand *newCommand)
 
G4String BtoS (G4bool b)
 
void CheckSceneAndNotifyHandlers (G4Scene *=nullptr)
 
G4bool CheckView ()
 
void ConvertToColour (G4Colour &colour, const G4String &redOrString, G4double green, G4double blue, G4double opacity)
 
const G4StringConvertToColourGuidance ()
 
void CopyCameraParameters (G4ViewParameters &target, const G4ViewParameters &from)
 
void CopyGuidanceFrom (const G4UIcommand *fromCmd, G4UIcommand *toCmd, G4int startLine=0)
 
void CopyMostViewParameters (G4ViewParameters &target, const G4ViewParameters &from)
 
void CopyParametersFrom (const G4UIcommand *fromCmd, G4UIcommand *toCmd)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
void DrawExtent (const G4VisExtent &)
 
G4String DtoS (G4double a)
 
void G4VisCommandsSceneAddUnsuccessful (G4VisManager::Verbosity verbosity)
 
void InterpolateToNewView (G4VViewer *currentViewer, const G4ViewParameters &oldVP, const G4ViewParameters &newVP, const G4int nInterpolationPoints=50, const G4int waitTimePerPointmilliseconds=20, const G4String exportString="")
 
void InterpolateViews (G4VViewer *currentViewer, std::vector< G4ViewParameters > viewVector, const G4int nInterpolationPoints=50, const G4int waitTimePerPointmilliseconds=20, const G4String exportString="")
 
G4String ItoS (G4int i)
 
G4bool ProvideValueOfUnit (const G4String &where, const G4String &unit, const G4String &category, G4double &value)
 
void RefreshIfRequired (G4VViewer *viewer)
 
void SetViewParameters (G4VViewer *viewer, const G4ViewParameters &viewParams)
 
G4bool StoB (G4String s)
 
G4double StoD (G4String s)
 
G4int StoI (G4String s)
 
G4long StoL (G4String s)
 

Static Protected Member Functions

static G4bool ConvertToDoublePair (const G4String &paramString, G4double &xval, G4double &yval)
 
static G4String ConvertToString (G4double x, G4double y, const char *unitName)
 

Protected Attributes

G4UIdirectorybaseDir = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 

Static Protected Attributes

static G4int fCurrentArrow3DLineSegmentsPerCircle = 6
 
static G4Colour fCurrentColour = G4Colour::White()
 
static G4VisExtent fCurrentExtentForField
 
static G4double fCurrentLineWidth = 1.
 
static G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentTextSize = 12.
 
static G4PhysicalVolumeModel::TouchableProperties fCurrentTouchableProperties
 
static std::vector< G4PhysicalVolumesSearchScene::FindingsfCurrrentPVFindingsForField
 
static G4VisManagerfpVisManager = nullptr
 
static G4bool fThereWasAViewer = false
 
static G4ViewParameters fVPExistingViewer
 

Private Member Functions

 G4VisCommandsViewerSet (const G4VisCommandsViewerSet &)
 
G4VisCommandsViewerSetoperator= (const G4VisCommandsViewerSet &)
 

Private Attributes

G4ThreeVector fLightsVector
 
G4UIcmdWithAStringfpCommandAll
 
G4UIcmdWithABoolfpCommandAutoRefresh
 
G4UIcmdWithABoolfpCommandAuxEdge
 
G4UIcommandfpCommandBackground
 
G4UIcommandfpCommandCulling
 
G4UIcmdWithAStringfpCommandCutawayMode
 
G4UIcommandfpCommandDefaultColour
 
G4UIcommandfpCommandDefaultTextColour
 
G4UIcmdWithABoolfpCommandEdge
 
G4UIcommandfpCommandExplodeFactor
 
G4UIcmdWithADoublefpCommandGlobalLineWidthScale
 
G4UIcmdWithADoublefpCommandGlobalMarkerScale
 
G4UIcmdWithABoolfpCommandHiddenEdge
 
G4UIcmdWithABoolfpCommandHiddenMarker
 
G4UIcmdWithAStringfpCommandLightsMove
 
G4UIcommandfpCommandLightsThetaPhi
 
G4UIcommandfpCommandLightsVector
 
G4UIcmdWithAnIntegerfpCommandLineSegments
 
G4UIcmdWithAnIntegerfpCommandNumberOfCloudPoints
 
G4UIcmdWithABoolfpCommandPicking
 
G4UIcommandfpCommandProjection
 
G4UIcmdWithAStringfpCommandRotationStyle
 
G4UIcommandfpCommandSectionPlane
 
G4UIcmdWithABoolfpCommandSpecialMeshRendering
 
G4UIcommandfpCommandSpecialMeshVolumes
 
G4UIcmdWithAStringfpCommandStyle
 
G4UIcmdWith3VectorAndUnitfpCommandTargetPoint
 
G4UIcommandfpCommandTimeWindowDisplayHeadTime
 
G4UIcommandfpCommandTimeWindowDisplayLightFront
 
G4UIcommandfpCommandTimeWindowEndTime
 
G4UIcmdWithADoublefpCommandTimeWindowFadeFactor
 
G4UIcommandfpCommandTimeWindowStartTime
 
G4UIcommandfpCommandUpThetaPhi
 
G4UIcommandfpCommandUpVector
 
G4UIcommandfpCommandViewpointThetaPhi
 
G4UIcommandfpCommandViewpointVector
 
G4UIdirectoryfpTimeWindowDirectory
 
G4ThreeVector fUpVector
 
G4ThreeVector fViewpointVector
 

Detailed Description

Definition at line 45 of file G4VisCommandsViewerSet.hh.

Constructor & Destructor Documentation

◆ G4VisCommandsViewerSet() [1/2]

G4VisCommandsViewerSet::G4VisCommandsViewerSet ( )

Definition at line 46 of file G4VisCommandsViewerSet.cc.

46 :
48fUpVector (G4ThreeVector(0.,1.,0.)),
50{
51 G4bool omitable;
52 G4UIparameter* parameter;
53
54 fpCommandAll = new G4UIcmdWithAString ("/vis/viewer/set/all",this);
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\".");
63 fpCommandAll->SetParameterName ("from-viewer-name",omitable = false);
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.");
71 fpCommandAutoRefresh->SetParameterName("auto-refresh",omitable = true);
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.");
80 fpCommandAuxEdge->SetParameterName("edge",omitable = true);
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);
91 parameter = new G4UIparameter("green", 'd', omitable = true);
92 parameter -> SetDefaultValue (0.);
93 fpCommandBackground -> SetParameter (parameter);
94 parameter = new G4UIparameter ("blue", 'd', omitable = true);
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);
120 parameter->SetParameterCandidates
121 ("global coveredDaughters invisible density");
122 fpCommandCulling->SetParameter(parameter);
123 parameter = new G4UIparameter("action",'b',omitable = true);
124 parameter->SetDefaultValue(1);
125 fpCommandCulling->SetParameter(parameter);
126 parameter = new G4UIparameter("density-threshold",'d',omitable = true);
127 parameter->SetDefaultValue("0.01");
128 fpCommandCulling->SetParameter(parameter);
129 parameter = new G4UIparameter("unit",'s',omitable = true);
130 // parameter->SetParameterCandidates ("g/cm3 mg/cm3 kg/m3");
131 // Instead of the above, SetNewValue accepts *any* density unit.
132 parameter->SetDefaultValue("g/cm3");
133 fpCommandCulling->SetParameter(parameter);
134
136 new G4UIcmdWithAString ("/vis/viewer/set/cutawayMode", this);
138 ("Sets cutaway mode - add (union) or multiply (intersection).");
139 fpCommandCutawayMode->SetParameterName ("cutaway-mode",omitable = false);
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
179 fpCommandEdge = new G4UIcmdWithABool("/vis/viewer/set/edge",this);
181 ("Edges become visible/invisible in surface mode.");
182 fpCommandEdge->SetParameterName("edge",omitable = true);
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);
190 parameter->SetParameterRange("explodeFactor>=1.");
191 parameter->SetDefaultValue(1.);
193 parameter = new G4UIparameter("x",'d',omitable = true);
194 parameter->SetDefaultValue (0);
195 parameter->SetGuidance ("Coordinate of explode centre.");
197 parameter = new G4UIparameter("y",'d',omitable = true);
198 parameter->SetDefaultValue (0);
199 parameter->SetGuidance ("Coordinate of explode centre.");
201 parameter = new G4UIparameter("z",'d',omitable = true);
202 parameter->SetDefaultValue (0);
203 parameter->SetGuidance ("Coordinate of explode centre.");
205 parameter = new G4UIparameter("unit",'s',omitable = true);
206 parameter->SetDefaultValue ("m");
207 parameter->SetGuidance ("Unit of explode centre.");
209
211 ("/vis/viewer/set/globalLineWidthScale", this);
213 ("Multiplies line widths by this factor.");
215 SetParameterName("scale-factor", omitable=true);
217
219 ("/vis/viewer/set/globalMarkerScale", this);
221 ("Multiplies marker sizes by this factor.");
223 SetParameterName("scale-factor", omitable=true);
225
227 new G4UIcmdWithABool("/vis/viewer/set/hiddenEdge",this);
229 ("Edges become hidden/seen in wireframe or surface mode.");
230 fpCommandHiddenEdge->SetParameterName("hidden-edge",omitable = true);
232
234 new G4UIcmdWithABool("/vis/viewer/set/hiddenMarker",this);
236 ("If true, closer objects hide markers. Otherwise, markers always show.");
237 fpCommandHiddenMarker->SetParameterName("hidden-marker",omitable = true);
239
241 ("/vis/viewer/set/lightsMove",this);
243 ("Lights move with camera or with object");
244 fpCommandLightsMove->SetParameterName("lightsMove",omitable = false);
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);
255 parameter = new G4UIparameter("phi", 'd', omitable = true);
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.");
266 parameter = new G4UIparameter("x", 'd', omitable = true);
267 parameter -> SetDefaultValue (1);
268 fpCommandLightsVector -> SetParameter (parameter);
269 parameter = new G4UIparameter("y", 'd', omitable = true);
270 parameter -> SetDefaultValue (1);
271 fpCommandLightsVector -> SetParameter (parameter);
272 parameter = new G4UIparameter ("z", 'd', omitable = true);
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.");
282 fpCommandLineSegments->SetParameterName("line-segments",omitable = true);
284
286 ("/vis/viewer/set/numberOfCloudPoints",this);
288 ("Set number of points to be used for cloud representation of volumes.");
289 fpCommandNumberOfCloudPoints->SetParameterName("points",omitable = true);
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.");
301 fpCommandPicking->SetParameterName("picking",omitable = true);
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);
309 parameter->SetParameterCandidates("o orthogonal p perspective");
310 parameter->SetDefaultValue("orthogonal");
312 parameter = new G4UIparameter("field-half-angle",'d',omitable = true);
313 parameter->SetDefaultValue(30.);
314 //parameter->SetCurrentAsDefault(true);
316 parameter = new G4UIparameter("unit",'s',omitable = true);
317 parameter->SetDefaultValue("deg");
318 //parameter->SetCurrentAsDefault(true);
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.");
329 fpCommandRotationStyle->SetParameterName ("style",omitable = false);
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");
339 parameter = new G4UIparameter("Selector",'c',true);
340 parameter -> SetDefaultValue ("on");
342 parameter = new G4UIparameter("x",'d',omitable = true);
343 parameter -> SetDefaultValue (0);
344 parameter -> SetGuidance ("Coordinate of point on the plane.");
346 parameter = new G4UIparameter("y",'d',omitable = true);
347 parameter -> SetDefaultValue (0);
348 parameter -> SetGuidance ("Coordinate of point on the plane.");
350 parameter = new G4UIparameter("z",'d',omitable = true);
351 parameter -> SetDefaultValue (0);
352 parameter -> SetGuidance ("Coordinate of point on the plane.");
354 parameter = new G4UIparameter("unit",'s',omitable = true);
355 parameter -> SetDefaultValue ("m");
356 parameter -> SetGuidance ("Unit of point on the plane.");
358 parameter = new G4UIparameter("nx",'d',omitable = true);
359 parameter -> SetDefaultValue (1);
360 parameter -> SetGuidance ("Component of plane normal.");
362 parameter = new G4UIparameter("ny",'d',omitable = true);
363 parameter -> SetDefaultValue (0);
364 parameter -> SetGuidance ("Component of plane normal.");
366 parameter = new G4UIparameter("nz",'d',omitable = true);
367 parameter -> SetDefaultValue (0);
368 parameter -> SetGuidance ("Component of plane normal.");
370
372 ("/vis/viewer/set/specialMeshRendering",this);
373 fpCommandSpecialMeshRendering -> SetGuidance
374 ("Request special rendering of volumes (meshes) that use G4VNestedParameterisation.");
375 fpCommandSpecialMeshRendering->SetParameterName("render",omitable = true);
377
379 ("/vis/viewer/set/specialMeshVolumes",this);
380 fpCommandSpecialMeshVolumes -> SetGuidance
381 ("Specify the volumes for special rendering. No arguments resets the list"
382 "\nand is interpreted to mean \"all found meshes\".");
384 ("Please provide a list of space-separated physical volume names and copy"
385 "\nnumber pairs. Negative copy number means \"all volumes of that name\".");
386 parameter = new G4UIparameter("volumes",'s',omitable = true);
387 parameter->SetGuidance
388 ("List of physical volume names and copy number pairs");
390
391 fpCommandStyle = new G4UIcmdWithAString ("/vis/viewer/set/style",this);
393 ("Set style of drawing - w[ireframe] or s[urface] or c[loud].");
395 ("(Hidden line drawing is controlled by \"/vis/viewer/set/hiddenEdge\".)");
396 fpCommandStyle->SetParameterName ("style",omitable = false);
397 fpCommandStyle->SetCandidates("w wireframe s surface c cloud");
398
400 ("/vis/viewer/set/targetPoint", this);
402 ("Set target point.");
404 ("This sets the \"Current Target Point\" relative to the \"Standard");
406 ("Target Point\" so that the actual target point is as requested.");
408 ("(See G4ViewParameters.hh for an explanation of target points.)");
409 fpCommandTargetPoint->SetParameterName("x", "y", "z", omitable = false);
411
413 ("/vis/viewer/set/upThetaPhi", this);
414 fpCommandUpThetaPhi -> SetGuidance ("Set up vector.");
415 fpCommandUpThetaPhi -> SetGuidance
416 ("Viewer will attempt always to show this direction upwards.");
417 parameter = new G4UIparameter("theta", 'd', omitable = true);
418 parameter -> SetDefaultValue (90.);
419 fpCommandUpThetaPhi -> SetParameter (parameter);
420 parameter = new G4UIparameter("phi", 'd', omitable = true);
421 parameter -> SetDefaultValue (90.);
422 fpCommandUpThetaPhi -> SetParameter (parameter);
423 parameter = new G4UIparameter ("unit", 's', omitable = true);
424 parameter -> SetDefaultValue ("deg");
425 fpCommandUpThetaPhi -> SetParameter (parameter);
426
428 ("/vis/viewer/set/upVector", this);
429 fpCommandUpVector -> SetGuidance ("Set up vector.");
430 fpCommandUpVector -> SetGuidance
431 ("Viewer will attempt always to show this direction upwards.");
432 parameter = new G4UIparameter("x", 'd', omitable = true);
433 parameter -> SetDefaultValue (0.);
434 fpCommandUpVector -> SetParameter (parameter);
435 parameter = new G4UIparameter("y", 'd', omitable = true);
436 parameter -> SetDefaultValue (1.);
437 fpCommandUpVector -> SetParameter (parameter);
438 parameter = new G4UIparameter ("z", 'd', omitable = true);
439 parameter -> SetDefaultValue (0.);
440 fpCommandUpVector -> SetParameter (parameter);
441
443 ("/vis/viewer/set/viewpointThetaPhi", this);
444 fpCommandViewpointThetaPhi -> SetGuidance
445 ("Set direction from target to camera.");
446 fpCommandViewpointThetaPhi -> SetGuidance
447 ("Also changes lightpoint direction if lights are set to move with camera.");
448 parameter = new G4UIparameter("theta", 'd', omitable = true);
449 parameter -> SetDefaultValue (60.);
450 fpCommandViewpointThetaPhi -> SetParameter (parameter);
451 parameter = new G4UIparameter("phi", 'd', omitable = true);
452 parameter -> SetDefaultValue (45.);
453 fpCommandViewpointThetaPhi -> SetParameter (parameter);
454 parameter = new G4UIparameter ("unit", 's', omitable = true);
455 parameter -> SetDefaultValue ("deg");
456 fpCommandViewpointThetaPhi -> SetParameter (parameter);
457
459 ("/vis/viewer/set/viewpointVector", this);
460 fpCommandViewpointVector -> SetGuidance
461 ("Set direction from target to camera.");
462 fpCommandViewpointVector -> SetGuidance
463 ("Also changes lightpoint direction if lights are set to move with camera.");
464 parameter = new G4UIparameter("x", 'd', omitable = true);
465 parameter -> SetDefaultValue (1.);
466 fpCommandViewpointVector -> SetParameter (parameter);
467 parameter = new G4UIparameter("y", 'd', omitable = true);
468 parameter -> SetDefaultValue (1.);
469 fpCommandViewpointVector -> SetParameter (parameter);
470 parameter = new G4UIparameter ("z", 'd', omitable = true);
471 parameter -> SetDefaultValue (1.);
472 fpCommandViewpointVector -> SetParameter (parameter);
473
474 fpTimeWindowDirectory = new G4UIdirectory ("/vis/viewer/set/timeWindow/");
475 fpTimeWindowDirectory -> SetGuidance ("Set time window parameters of current viewer.");
476 G4String timeWindowGuidance =
477 "For these commands use"
478 "\n /vis/scene/add/trajectories rich"
479 "\n /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.01 ns"
480 "\nthen typically"
481 "\n /vis/viewer/set/timeWindow/displayLightFront true 0 0 -50 cm -0.5 ns"
482 "\n /vis/viewer/set/timeWindow/displayHeadTime true"
483 "\n /vis/viewer/set/timeWindow/fadeFactor 1"
484 "\n /run/beamOn # or several until you get a good event or events"
485 "\n /vis/viewer/set/timeWindow/startTime 0 ns 1 ns"
486 "\n /vis/viewer/save"
487 "\n /vis/viewer/set/timeWindow/startTime 1 ns 1 ns"
488 "\nthen zoom, pan etc to a view of interest and"
489 "\n /vis/viewer/save"
490 "\nthen repeat with next start time, another view and a save, then try"
491 "\n /vis/viewer/interpolate";
492
494 new G4UIcommand("/vis/viewer/set/timeWindow/displayHeadTime", this);
496 ("Display head time of range in 2D text.");
498 parameter = new G4UIparameter ("displayHeadTime", 'b', omitable = false);
499 parameter->SetDefaultValue(false);
501 parameter = new G4UIparameter ("screenX", 'd', omitable = true);
502 parameter->SetGuidance("-1 < screenX < 1");
503 parameter->SetParameterRange("screenX >= -1. && screenX <= 1.");
504 parameter->SetDefaultValue(-0.9);
506 parameter = new G4UIparameter ("screenY", 'd', omitable = true);
507 parameter->SetGuidance("-1 < screenY < 1");
508 parameter->SetParameterRange("screenY >= -1. && screenY <= 1.");
509 parameter->SetDefaultValue(-0.9);
511 parameter = new G4UIparameter ("screenSize", 'd', omitable = true);
512 parameter->SetDefaultValue(24.);
514 parameter = new G4UIparameter ("red", 'd', omitable = true);
515 parameter->SetParameterRange("red >= 0. && red <= 1.");
516 parameter->SetDefaultValue(0.);
518 parameter = new G4UIparameter ("green", 'd', omitable = true);
519 parameter->SetParameterRange("green >= 0. && green <= 1.");
520 parameter->SetDefaultValue(1.);
522 parameter = new G4UIparameter ("blue", 'd', omitable = true);
523 parameter->SetParameterRange("blue >= 0. && blue <= 1.");
524 parameter->SetDefaultValue(1.);
526
528 new G4UIcommand("/vis/viewer/set/timeWindow/displayLightFront", this);
530 ("Display the light front at head time.");
532 ("Tip: The trajectories can appear of jump ahead of the light front"
533 "\nbecause their time range overlaps the viewer's time range. To"
534 "\naverage out this discrete time effect, advance the light front by"
535 "\nhalf the trajectories interval. E.g., if the trajectory time slice"
536 "\ninterval is 0.01 ns:"
537 "\n /vis/viewer/set/timeWindow/displayLightFront true -90 0 0 mm -0.005 ns"
538 "\nTo prevent them beating the light front at all:"
539 "\n /vis/viewer/set/timeWindow/displayLightFront true -90 0 0 mm -0.01 ns");
541 parameter = new G4UIparameter ("displayLightFront", 'b', omitable = true);
542 parameter->SetDefaultValue(true);
544 parameter = new G4UIparameter ("originX", 'd', omitable = true);
545 parameter->SetDefaultValue(0.);
547 parameter = new G4UIparameter ("originY", 'd', omitable = true);
548 parameter->SetDefaultValue(0.);
550 parameter = new G4UIparameter ("originZ", 'd', omitable = true);
551 parameter->SetDefaultValue(0.);
553 parameter = new G4UIparameter ("space_unit", 's', omitable = true);
554 parameter->SetDefaultValue("m");
556 parameter = new G4UIparameter ("originT", 'd', omitable = true);
557 parameter->SetDefaultValue(0.);
559 parameter = new G4UIparameter ("time_unit", 's', omitable = true);
560 parameter->SetDefaultValue("s");
562 parameter = new G4UIparameter ("red", 'd', omitable = true);
563 parameter->SetParameterRange("red >= 0. && red <= 1.");
564 parameter->SetDefaultValue(0.);
566 parameter = new G4UIparameter ("green", 'd', omitable = true);
567 parameter->SetParameterRange("green >= 0. && green <= 1.");
568 parameter->SetDefaultValue(1.);
570 parameter = new G4UIparameter ("blue", 'd', omitable = true);
571 parameter->SetParameterRange("blue >= 0. && blue <= 1.");
572 parameter->SetDefaultValue(0.);
574
576 new G4UIcommand("/vis/viewer/set/timeWindow/endTime", this);
577 fpCommandTimeWindowEndTime->SetGuidance("Set end and range of track time.");
578 fpCommandTimeWindowEndTime->SetGuidance(timeWindowGuidance);
579 parameter = new G4UIparameter ("end-time", 'd', omitable = false);
582 parameter = new G4UIparameter ("end-time-unit", 's', omitable = false);
583 parameter->SetDefaultValue("ns");
585 parameter = new G4UIparameter ("time-range", 'd', omitable = true);
586 parameter->SetDefaultValue(-1.);
588 parameter = new G4UIparameter ("time-range-unit", 's', omitable = true);
589 parameter->SetDefaultValue("ns");
591
593 new G4UIcmdWithADouble("/vis/viewer/set/timeWindow/fadeFactor", this);
595 ("0: no fade; 1: maximum fade with time window.");
596 fpCommandTimeWindowFadeFactor->SetGuidance(timeWindowGuidance);
597 fpCommandTimeWindowFadeFactor->SetParameterName("fade_factor", omitable = false);
598 fpCommandTimeWindowFadeFactor->SetRange("fade_factor>=0.&&fade_factor<=1.");
600
602 new G4UIcommand("/vis/viewer/set/timeWindow/startTime", this);
603 fpCommandTimeWindowStartTime->SetGuidance("Set start and range of track time.");
604 fpCommandTimeWindowStartTime->SetGuidance(timeWindowGuidance);
605 parameter = new G4UIparameter ("start-time", 'd', omitable = false);
608 parameter = new G4UIparameter ("start-time-unit", 's', omitable = false);
609 parameter->SetDefaultValue("ns");
611 parameter = new G4UIparameter ("time-range", 'd', omitable = true);
612 parameter->SetDefaultValue(-1.);
614 parameter = new G4UIparameter ("time-range-unit", 's', omitable = true);
615 parameter->SetDefaultValue("ns");
617}
CLHEP::Hep3Vector G4ThreeVector
bool G4bool
Definition: G4Types.hh:86
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)
Definition: G4UIcommand.hh:146
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120
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
G4UIcmdWith3VectorAndUnit * fpCommandTargetPoint
G4UIcmdWithABool * fpCommandHiddenEdge
G4UIcmdWithABool * fpCommandPicking
G4UIcmdWithABool * fpCommandAutoRefresh
G4UIcmdWithADouble * fpCommandGlobalLineWidthScale
G4UIcmdWithABool * fpCommandAuxEdge
G4UIcommand * fpCommandViewpointThetaPhi
G4UIcmdWithAnInteger * fpCommandLineSegments
G4UIcommand * fpCommandTimeWindowDisplayHeadTime
G4UIcmdWithABool * fpCommandHiddenMarker
G4UIdirectory * fpTimeWindowDirectory
G4UIcmdWithAString * fpCommandCutawayMode
G4UIcmdWithADouble * fpCommandTimeWindowFadeFactor
G4UIcmdWithAString * fpCommandStyle
G4UIcmdWithADouble * fpCommandGlobalMarkerScale
G4UIcommand * fpCommandDefaultTextColour
G4UIcommand * fpCommandSpecialMeshVolumes
G4UIcmdWithABool * fpCommandEdge
G4UIcmdWithAnInteger * fpCommandNumberOfCloudPoints
G4UIcmdWithAString * fpCommandRotationStyle
G4UIcmdWithABool * fpCommandSpecialMeshRendering
G4UIcommand * fpCommandTimeWindowStartTime
G4UIcmdWithAString * fpCommandLightsMove
G4UIcommand * fpCommandTimeWindowDisplayLightFront
G4UIcommand * fpCommandTimeWindowEndTime
G4UIcmdWithAString * fpCommandAll

References G4VVisCommand::ConvertToColourGuidance(), fpCommandAll, fpCommandAutoRefresh, fpCommandAuxEdge, fpCommandBackground, fpCommandCulling, fpCommandCutawayMode, fpCommandDefaultColour, fpCommandDefaultTextColour, fpCommandEdge, fpCommandExplodeFactor, fpCommandGlobalLineWidthScale, fpCommandGlobalMarkerScale, fpCommandHiddenEdge, fpCommandHiddenMarker, fpCommandLightsMove, fpCommandLightsThetaPhi, fpCommandLightsVector, fpCommandLineSegments, fpCommandNumberOfCloudPoints, fpCommandPicking, fpCommandProjection, fpCommandRotationStyle, fpCommandSectionPlane, fpCommandSpecialMeshRendering, fpCommandSpecialMeshVolumes, fpCommandStyle, fpCommandTargetPoint, fpCommandTimeWindowDisplayHeadTime, fpCommandTimeWindowDisplayLightFront, fpCommandTimeWindowEndTime, fpCommandTimeWindowFadeFactor, fpCommandTimeWindowStartTime, fpCommandUpThetaPhi, fpCommandUpVector, fpCommandViewpointThetaPhi, fpCommandViewpointVector, fpTimeWindowDirectory, G4VisAttributes::fVeryLongTime, G4UIcmdWithAString::SetCandidates(), G4UIcmdWithAString::SetDefaultValue(), G4UIparameter::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIparameter::SetGuidance(), G4UIcommand::SetParameter(), G4UIparameter::SetParameterCandidates(), G4UIcmdWithABool::SetParameterName(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWith3VectorAndUnit::SetParameterName(), G4UIparameter::SetParameterRange(), G4UIcommand::SetRange(), and G4UIcmdWith3VectorAndUnit::SetUnitCategory().

◆ ~G4VisCommandsViewerSet()

G4VisCommandsViewerSet::~G4VisCommandsViewerSet ( )
virtual

Definition at line 619 of file G4VisCommandsViewerSet.cc.

References fpCommandAll, fpCommandAutoRefresh, fpCommandAuxEdge, fpCommandBackground, fpCommandCulling, fpCommandCutawayMode, fpCommandDefaultColour, fpCommandDefaultTextColour, fpCommandEdge, fpCommandExplodeFactor, fpCommandGlobalLineWidthScale, fpCommandGlobalMarkerScale, fpCommandHiddenEdge, fpCommandHiddenMarker, fpCommandLightsMove, fpCommandLightsThetaPhi, fpCommandLightsVector, fpCommandLineSegments, fpCommandNumberOfCloudPoints, fpCommandPicking, fpCommandProjection, fpCommandRotationStyle, fpCommandSectionPlane, fpCommandSpecialMeshRendering, fpCommandSpecialMeshVolumes, fpCommandStyle, fpCommandTargetPoint, fpCommandTimeWindowDisplayHeadTime, fpCommandTimeWindowDisplayLightFront, fpCommandTimeWindowEndTime, fpCommandTimeWindowFadeFactor, fpCommandTimeWindowStartTime, fpCommandUpThetaPhi, fpCommandUpVector, fpCommandViewpointThetaPhi, fpCommandViewpointVector, and fpTimeWindowDirectory.

◆ G4VisCommandsViewerSet() [2/2]

G4VisCommandsViewerSet::G4VisCommandsViewerSet ( const G4VisCommandsViewerSet )
private

Member Function Documentation

◆ AddUIcommand()

void G4UImessenger::AddUIcommand ( G4UIcommand newCommand)
protectedinherited

Definition at line 149 of file G4UImessenger.cc.

150{
151 G4cerr << "Warning : Old style definition of G4UIcommand <"
152 << newCommand->GetCommandPath() << ">." << G4endl;
153}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:136

References G4cerr, G4endl, and G4UIcommand::GetCommandPath().

◆ BtoS()

G4String G4UImessenger::BtoS ( G4bool  b)
protectedinherited

Definition at line 98 of file G4UImessenger.cc.

99{
100 G4String vl = "0";
101 if(b)
102 vl = "true";
103 return vl;
104}

◆ CheckSceneAndNotifyHandlers()

void G4VVisCommand::CheckSceneAndNotifyHandlers ( G4Scene pScene = nullptr)
protectedinherited

Definition at line 207 of file G4VVisCommand.cc.

208{
210
211 if (!pScene) {
212 if (verbosity >= G4VisManager::warnings) {
213 G4cout << "WARNING: Scene pointer is null."
214 << G4endl;
215 }
216 return;
217 }
218
219 G4VSceneHandler* pSceneHandler = fpVisManager -> GetCurrentSceneHandler();
220 if (!pSceneHandler) {
221 if (verbosity >= G4VisManager::warnings) {
222 G4cout << "WARNING: Scene handler not found." << G4endl;
223 }
224 return;
225 }
226
227 // Scene has changed. If it is the scene of the currrent scene handler
228 // refresh viewers of all scene handlers using this scene. If not, it may be
229 // a scene that the user is building up before attaching to a scene handler,
230 // so do nothing.
231 if (pScene == pSceneHandler->GetScene()) {
232 G4UImanager::GetUIpointer () -> ApplyCommand ("/vis/scene/notifyHandlers");
233 }
234
235}
G4GLOB_DLL std::ostream G4cout
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
G4Scene * GetScene() const
static G4VisManager * fpVisManager
static Verbosity GetVerbosity()

References G4VVisCommand::fpVisManager, G4cout, G4endl, G4VSceneHandler::GetScene(), G4UImanager::GetUIpointer(), G4VisManager::GetVerbosity(), and G4VisManager::warnings.

Referenced by G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandSceneRemoveModel::SetNewValue(), G4VisCommandSceneSelect::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddExtent::SetNewValue(), G4VisCommandSceneAddElectricField::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddGPS::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLocalAxes::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddMagneticField::SetNewValue(), G4VisCommandSceneAddPSHits::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), G4VisCommandSceneAddUserAction::SetNewValue(), G4VisCommandSceneAddVolume::SetNewValue(), G4VisCommandSceneAddPlotter::SetNewValue(), and G4VisCommandViewerRefresh::SetNewValue().

◆ CheckView()

G4bool G4VVisCommand::CheckView ( )
protectedinherited

Definition at line 237 of file G4VVisCommand.cc.

238{
240 G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
241
242 if (!viewer) {
243 if (verbosity >= G4VisManager::errors) {
244 G4cerr <<
245 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
246 << G4endl;
247 }
248 return false;
249 }
250
251 return true;
252}

References G4VisManager::errors, G4VVisCommand::fpVisManager, G4cerr, G4endl, and G4VisManager::GetVerbosity().

◆ CommandsShouldBeInMaster()

G4bool G4UImessenger::CommandsShouldBeInMaster ( ) const
inlineinherited

Definition at line 77 of file G4UImessenger.hh.

78 {
80 }
G4bool commandsShouldBeInMaster

References G4UImessenger::commandsShouldBeInMaster.

Referenced by G4UIcommand::G4UIcommandCommonConstructorCode().

◆ ConvertToColour()

void G4VVisCommand::ConvertToColour ( G4Colour colour,
const G4String redOrString,
G4double  green,
G4double  blue,
G4double  opacity 
)
protectedinherited

Definition at line 119 of file G4VVisCommand.cc.

122{
123 // Note: colour is supplied by the caller and some or all of its components
124 // may act as default.
125 //
126 // Note: redOrString is either a number or string. If a string it must be
127 // one of the recognised colours.
128 //
129 // Thus the arguments can be, for example:
130 // (colour,"red",...,...,0.5): will give the colour red with opacity 0.5 (the
131 // third and fourth arguments are ignored), or
132 // (1.,0.,0.,0.5): this also will be red with opacity 0.5.
133
135
136 const size_t iPos0 = 0;
137 if (std::isalpha(redOrString[iPos0])) {
138
139 // redOrString is probably alphabetic characters defining the colour
140 if (!G4Colour::GetColour(redOrString, colour)) {
141 // Not a recognised string
142 if (verbosity >= G4VisManager::warnings) {
143 G4cout << "WARNING: Colour \"" << redOrString
144 << "\" not found. Defaulting to " << colour
145 << G4endl;
146 }
147 return;
148 } else {
149 // It was a recognised string. Now add opacity.
150 colour.SetAlpha(opacity);
151 return;
152 }
153
154 } else {
155
156 // redOrString is probably numeric defining the red component
157 std::istringstream iss(redOrString);
158 G4double red;
159 iss >> red;
160 if (iss.fail()) {
161 if (verbosity >= G4VisManager::warnings) {
162 G4cout << "WARNING: String \"" << redOrString
163 << "\" cannot be parsed. Defaulting to " << colour
164 << G4endl;
165 }
166 return;
167 } else {
168 colour = G4Colour(red,green,blue,opacity);
169 return;
170 }
171
172 }
173}
double G4double
Definition: G4Types.hh:83
static G4bool GetColour(const G4String &key, G4Colour &result)
Definition: G4Colour.cc:161
void SetAlpha(G4double)
Definition: G4Colour.cc:70

References G4VVisCommand::fpVisManager, G4cout, G4endl, G4Colour::GetColour(), G4VisManager::GetVerbosity(), G4Colour::SetAlpha(), and G4VisManager::warnings.

Referenced by G4VisCommandGeometrySetColour::SetNewValue(), G4VisCommandSceneAddGPS::SetNewValue(), G4VisCommandSetColour::SetNewValue(), G4VisCommandSetTextColour::SetNewValue(), G4VisCommandsTouchableSet::SetNewValue(), and SetNewValue().

◆ ConvertToColourGuidance()

const G4String & G4VVisCommand::ConvertToColourGuidance ( )
protectedinherited

Definition at line 109 of file G4VVisCommand.cc.

110{
111 static G4String guidance
112 ("Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or"
113 "\n (b) string such as \"white\", \"black\", \"grey\", \"red\"...or"
114 "\n (c) an additional number for opacity, e.g., \".3 .4 .5 .6\""
115 "\n or \"grey ! ! .6\" (note \"!\"'s for unused parameters).");
116 return guidance;
117}

Referenced by G4VisCommandSceneAddGPS::G4VisCommandSceneAddGPS(), G4VisCommandSetColour::G4VisCommandSetColour(), G4VisCommandSetTextColour::G4VisCommandSetTextColour(), G4VisCommandsTouchableSet::G4VisCommandsTouchableSet(), and G4VisCommandsViewerSet().

◆ ConvertToDoublePair()

G4bool G4VVisCommand::ConvertToDoublePair ( const G4String paramString,
G4double xval,
G4double yval 
)
staticprotectedinherited

Definition at line 85 of file G4VVisCommand.cc.

88{
89 G4double x, y;
90 G4String unit;
91
92 std::istringstream is(paramString);
93 is >> x >> y >> unit;
94
96 xval = x*G4UIcommand::ValueOf(unit);
97 yval = y*G4UIcommand::ValueOf(unit);
98 } else {
100 if (verbosity >= G4VisManager::errors) {
101 G4cout << "ERROR: Unrecognised unit" << G4endl;
102 }
103 return false;
104 }
105
106 return true;
107}
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:363
static G4bool IsUnitDefined(const G4String &)

References G4VisManager::errors, G4VVisCommand::fpVisManager, G4cout, G4endl, G4VisManager::GetVerbosity(), G4UnitDefinition::IsUnitDefined(), and G4UIcommand::ValueOf().

Referenced by G4VisCommandViewerPan::SetNewValue(), and SetNewValue().

◆ ConvertToString()

G4String G4VVisCommand::ConvertToString ( G4double  x,
G4double  y,
const char *  unitName 
)
staticprotectedinherited

Definition at line 75 of file G4VVisCommand.cc.

77{
78 G4double uv = G4UIcommand::ValueOf(unitName);
79
80 std::ostringstream oss;
81 oss << x/uv << " " << y/uv << " " << unitName;
82 return oss.str();
83}

References G4UIcommand::ValueOf().

Referenced by G4VisCommandViewerPan::GetCurrentValue().

◆ CopyCameraParameters()

void G4VVisCommand::CopyCameraParameters ( G4ViewParameters target,
const G4ViewParameters from 
)
protectedinherited

Definition at line 385 of file G4VVisCommand.cc.

387{
388 // Copy view parameters pertaining only to camera
392 target.SetUpVector (from.GetUpVector());
393 target.SetFieldHalfAngle (from.GetFieldHalfAngle());
394 target.SetZoomFactor (from.GetZoomFactor());
395 target.SetScaleFactor (from.GetScaleFactor());
397 target.SetDolly (from.GetDolly());
398}
void SetViewpointDirection(const G4Vector3D &viewpointDirection)
void SetScaleFactor(const G4Vector3D &scaleFactor)
const G4Vector3D & GetScaleFactor() const
void SetCurrentTargetPoint(const G4Point3D &currentTargetPoint)
const G4Vector3D & GetLightpointDirection() const
void SetFieldHalfAngle(G4double fieldHalfAngle)
const G4Vector3D & GetViewpointDirection() const
const G4Point3D & GetCurrentTargetPoint() const
G4double GetFieldHalfAngle() const
G4double GetZoomFactor() const
void SetDolly(G4double dolly)
const G4Vector3D & GetUpVector() const
void SetZoomFactor(G4double zoomFactor)
void SetUpVector(const G4Vector3D &upVector)
void SetLightpointDirection(const G4Vector3D &lightpointDirection)
void SetLightsMoveWithCamera(G4bool moves)
G4bool GetLightsMoveWithCamera() const
G4double GetDolly() const

References G4ViewParameters::GetCurrentTargetPoint(), G4ViewParameters::GetDolly(), G4ViewParameters::GetFieldHalfAngle(), G4ViewParameters::GetLightpointDirection(), G4ViewParameters::GetLightsMoveWithCamera(), G4ViewParameters::GetScaleFactor(), G4ViewParameters::GetUpVector(), G4ViewParameters::GetViewpointDirection(), G4ViewParameters::GetZoomFactor(), G4ViewParameters::SetCurrentTargetPoint(), G4ViewParameters::SetDolly(), G4ViewParameters::SetFieldHalfAngle(), G4ViewParameters::SetLightpointDirection(), G4ViewParameters::SetLightsMoveWithCamera(), G4ViewParameters::SetScaleFactor(), G4ViewParameters::SetUpVector(), G4ViewParameters::SetViewpointDirection(), and G4ViewParameters::SetZoomFactor().

Referenced by G4VisCommandViewerCopyViewFrom::SetNewValue().

◆ CopyGuidanceFrom()

void G4VVisCommand::CopyGuidanceFrom ( const G4UIcommand fromCmd,
G4UIcommand toCmd,
G4int  startLine = 0 
)
protectedinherited

Definition at line 335 of file G4VVisCommand.cc.

337{
338 if (fromCmd && toCmd) {
339 const G4int nGuideEntries = fromCmd->GetGuidanceEntries();
340 for (G4int i = startLine; i < nGuideEntries; ++i) {
341 const G4String& guidance = fromCmd->GetGuidanceLine(i);
342 toCmd->SetGuidance(guidance);
343 }
344 }
345}
int G4int
Definition: G4Types.hh:85
const G4String & GetGuidanceLine(G4int i) const
Definition: G4UIcommand.hh:132
std::size_t GetGuidanceEntries() const
Definition: G4UIcommand.hh:128

References G4UIcommand::GetGuidanceEntries(), G4UIcommand::GetGuidanceLine(), and G4UIcommand::SetGuidance().

Referenced by G4VisCommandDrawLogicalVolume::G4VisCommandDrawLogicalVolume(), G4VisCommandDrawVolume::G4VisCommandDrawVolume(), G4VisCommandSceneAddMagneticField::G4VisCommandSceneAddMagneticField(), G4VisCommandsTouchable::G4VisCommandsTouchable(), and G4VisCommandViewerCentreOn::G4VisCommandViewerCentreOn().

◆ CopyMostViewParameters()

void G4VVisCommand::CopyMostViewParameters ( G4ViewParameters target,
const G4ViewParameters from 
)
protectedinherited

Definition at line 374 of file G4VVisCommand.cc.

376{
377 // Copy view parameters except for autoRefresh and background...
378 auto targetAutoRefresh = target.IsAutoRefresh();
379 auto targetBackground = target.GetBackgroundColour();
380 target = from;
381 target.SetAutoRefresh(targetAutoRefresh);
382 target.SetBackgroundColour(targetBackground);
383}
void SetAutoRefresh(G4bool)
void SetBackgroundColour(const G4Colour &)
const G4Colour & GetBackgroundColour() const
G4bool IsAutoRefresh() const

References G4ViewParameters::GetBackgroundColour(), G4ViewParameters::IsAutoRefresh(), G4ViewParameters::SetAutoRefresh(), and G4ViewParameters::SetBackgroundColour().

Referenced by G4VisCommandViewerCreate::SetNewValue(), and SetNewValue().

◆ CopyParametersFrom()

void G4VVisCommand::CopyParametersFrom ( const G4UIcommand fromCmd,
G4UIcommand toCmd 
)
protectedinherited

Definition at line 347 of file G4VVisCommand.cc.

349{
350 if (fromCmd && toCmd) {
351 const G4int nParEntries = fromCmd->GetParameterEntries();
352 for (G4int i = 0; i < nParEntries; ++i) {
353 G4UIparameter* parameter = new G4UIparameter(*(fromCmd->GetParameter(i)));
354 toCmd->SetParameter(parameter);
355 }
356 }
357}
std::size_t GetParameterEntries() const
Definition: G4UIcommand.hh:138
G4UIparameter * GetParameter(G4int i) const
Definition: G4UIcommand.hh:139

References G4UIcommand::GetParameter(), G4UIcommand::GetParameterEntries(), and G4UIcommand::SetParameter().

Referenced by G4VisCommandDrawLogicalVolume::G4VisCommandDrawLogicalVolume(), G4VisCommandDrawVolume::G4VisCommandDrawVolume(), G4VisCommandSceneAddMagneticField::G4VisCommandSceneAddMagneticField(), and G4VisCommandViewerCentreOn::G4VisCommandViewerCentreOn().

◆ CreateCommand()

template<typename T >
T * G4UImessenger::CreateCommand ( const G4String cname,
const G4String dsc 
)
protectedinherited

Definition at line 110 of file G4UImessenger.hh.

111{
112 G4String path;
113 if(cname[0] != '/')
114 {
115 path = baseDirName + cname;
116 if(path[0] != '/')
117 path = "/" + path;
118 }
119
120 T* command = new T(path.c_str(), this);
121 command->SetGuidance(dsc.c_str());
122
123 return command;
124}
G4String baseDirName

References G4UImessenger::baseDirName.

◆ CreateDirectory()

void G4UImessenger::CreateDirectory ( const G4String path,
const G4String dsc,
G4bool  commandsToBeBroadcasted = true 
)
protectedinherited

Definition at line 156 of file G4UImessenger.cc.

158{
160
161 G4String fullpath = path;
162 if(fullpath.back() != '/')
163 fullpath.append("/");
164
165 G4UIcommandTree* tree = ui->GetTree()->FindCommandTree(fullpath.c_str());
166 if(tree != nullptr)
167 {
168 baseDirName = tree->GetPathName();
169 }
170 else
171 {
172 baseDir = new G4UIdirectory(fullpath.c_str(), commandsToBeBroadcasted);
173 baseDirName = fullpath;
174 baseDir->SetGuidance(dsc.c_str());
175 }
176}
const G4String & GetPathName() const
G4UIcommandTree * FindCommandTree(const char *commandPath)
G4UIcommandTree * GetTree() const
Definition: G4UImanager.hh:186
G4UIdirectory * baseDir

References G4UImessenger::baseDir, G4UImessenger::baseDirName, G4UIcommandTree::FindCommandTree(), G4UIcommandTree::GetPathName(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), and G4UIcommand::SetGuidance().

Referenced by G4MoleculeShootMessenger::G4MoleculeShootMessenger(), and G4UImessenger::G4UImessenger().

◆ DrawExtent()

void G4VVisCommand::DrawExtent ( const G4VisExtent extent)
protectedinherited

Definition at line 359 of file G4VVisCommand.cc.

360{
361 if (fpVisManager) {
362 const G4double halfX = (extent.GetXmax() - extent.GetXmin()) / 2.;
363 const G4double halfY = (extent.GetYmax() - extent.GetYmin()) / 2.;
364 const G4double halfZ = (extent.GetZmax() - extent.GetZmin()) / 2.;
365 if (halfX > 0. && halfY > 0. && halfZ > 0.) {
366 const G4Box box("vis_extent",halfX,halfY,halfZ);
367 const G4VisAttributes visAtts(G4Color::Red());
368 const G4Point3D& centre = extent.GetExtentCenter();
369 fpVisManager->Draw(box,visAtts,G4Translate3D(centre));
370 }
371 }
372}
HepGeom::Translate3D G4Translate3D
Definition: G4Box.hh:56
static G4Colour Red()
Definition: G4Colour.hh:161
G4double GetYmin() const
Definition: G4VisExtent.hh:101
G4double GetXmax() const
Definition: G4VisExtent.hh:100
const G4Point3D & GetExtentCenter() const
Definition: G4VisExtent.hh:106
G4double GetYmax() const
Definition: G4VisExtent.hh:102
G4double GetZmax() const
Definition: G4VisExtent.hh:104
G4double GetZmin() const
Definition: G4VisExtent.hh:103
G4double GetXmin() const
Definition: G4VisExtent.hh:99
void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())

References G4VisManager::Draw(), G4VVisCommand::fpVisManager, G4VisExtent::GetExtentCenter(), G4VisExtent::GetXmax(), G4VisExtent::GetXmin(), G4VisExtent::GetYmax(), G4VisExtent::GetYmin(), G4VisExtent::GetZmax(), G4VisExtent::GetZmin(), and G4Colour::Red().

Referenced by G4VisCommandSceneShowExtents::SetNewValue(), G4VisCommandSetVolumeForField::SetNewValue(), and G4VisCommandsTouchable::SetNewValue().

◆ DtoS()

G4String G4UImessenger::DtoS ( G4double  a)
protectedinherited

Definition at line 90 of file G4UImessenger.cc.

91{
92 std::ostringstream os;
93 os << a;
94 return G4String(os.str());
95}

Referenced by G4ScoreQuantityMessenger::FilterCommands(), and G4UIcontrolMessenger::SetNewValue().

◆ G4VisCommandsSceneAddUnsuccessful()

void G4VVisCommand::G4VisCommandsSceneAddUnsuccessful ( G4VisManager::Verbosity  verbosity)
protectedinherited

Definition at line 254 of file G4VVisCommand.cc.

255 {
256 // Some frequently used error printing...
257 if (verbosity >= G4VisManager::warnings) {
258 G4cout <<
259 "WARNING: For some reason, possibly mentioned above, it has not been"
260 "\n possible to add to the scene."
261 << G4endl;
262 }
263}

References G4cout, G4endl, and G4VisManager::warnings.

Referenced by G4VisCommandSceneAddUserAction::AddVisAction(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddExtent::SetNewValue(), G4VisCommandSceneAddElectricField::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddGPS::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLocalAxes::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddMagneticField::SetNewValue(), G4VisCommandSceneAddPSHits::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddVolume::SetNewValue(), G4VisCommandSceneAddPlotter::SetNewValue(), and G4VisCommandsTouchable::SetNewValue().

◆ GetCurrentTextColour()

const G4Colour & G4VVisCommand::GetCurrentTextColour ( )
staticinherited

Definition at line 70 of file G4VVisCommand.cc.

71{
72 return fCurrentTextColour;
73}
static G4Colour fCurrentTextColour

References G4VVisCommand::fCurrentTextColour.

◆ GetCurrentValue()

G4String G4VisCommandsViewerSet::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 659 of file G4VisCommandsViewerSet.cc.

659 {
660 return "";
661}

◆ GetVisManager()

G4VisManager * G4VVisCommand::GetVisManager ( )
staticinherited

Definition at line 60 of file G4VVisCommand.cc.

61{
62 return fpVisManager;
63}

References G4VVisCommand::fpVisManager.

◆ InterpolateToNewView()

void G4VVisCommand::InterpolateToNewView ( G4VViewer currentViewer,
const G4ViewParameters oldVP,
const G4ViewParameters newVP,
const G4int  nInterpolationPoints = 50,
const G4int  waitTimePerPointmilliseconds = 20,
const G4String  exportString = "" 
)
protectedinherited

Definition at line 313 of file G4VVisCommand.cc.

320{
321 std::vector<G4ViewParameters> viewVector;
322 viewVector.push_back(oldVP);
323 viewVector.push_back(oldVP);
324 viewVector.push_back(newVP);
325 viewVector.push_back(newVP);
326
328 (currentViewer,
329 viewVector,
330 nInterpolationPoints,
331 waitTimePerPointmilliseconds,
332 exportString);
333}
void InterpolateViews(G4VViewer *currentViewer, std::vector< G4ViewParameters > viewVector, const G4int nInterpolationPoints=50, const G4int waitTimePerPointmilliseconds=20, const G4String exportString="")

References G4VVisCommand::InterpolateViews().

Referenced by G4VisCommandsTouchable::SetNewValue(), and G4VisCommandViewerCentreOn::SetNewValue().

◆ InterpolateViews()

void G4VVisCommand::InterpolateViews ( G4VViewer currentViewer,
std::vector< G4ViewParameters viewVector,
const G4int  nInterpolationPoints = 50,
const G4int  waitTimePerPointmilliseconds = 20,
const G4String  exportString = "" 
)
protectedinherited

Definition at line 288 of file G4VVisCommand.cc.

294{
295 const G4int safety = viewVector.size()*nInterpolationPoints;
296 G4int safetyCount = 0;
297 do {
298 G4ViewParameters* vp =
299 G4ViewParameters::CatmullRomCubicSplineInterpolation(viewVector,nInterpolationPoints);
300 if (!vp) break; // Finished.
301 currentViewer->SetViewParameters(*vp);
302 currentViewer->RefreshView();
303 if (exportString == "export" &&
304 G4StrUtil::contains(currentViewer->GetName(), "OpenGL")) {
305 G4UImanager::GetUIpointer()->ApplyCommand("/vis/ogl/export");
306 }
307 currentViewer->ShowView();
308 if (waitTimePerPointmilliseconds > 0)
309 std::this_thread::sleep_for(std::chrono::milliseconds(waitTimePerPointmilliseconds));
310 } while (safetyCount++ < safety); // Loop checking, 16.02.2016, J.Allison
311}
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:485
const G4String & GetName() const
void SetViewParameters(const G4ViewParameters &vp)
Definition: G4VViewer.cc:120
void RefreshView()
virtual void ShowView()
Definition: G4VViewer.cc:103
static G4ViewParameters * CatmullRomCubicSplineInterpolation(const std::vector< G4ViewParameters > &views, G4int nInterpolationPoints=50)
G4bool contains(const G4String &str, std::string_view ss)
Check if a string contains a given substring.

References G4UImanager::ApplyCommand(), G4ViewParameters::CatmullRomCubicSplineInterpolation(), G4StrUtil::contains(), G4VViewer::GetName(), G4UImanager::GetUIpointer(), G4VViewer::RefreshView(), G4VViewer::SetViewParameters(), and G4VViewer::ShowView().

Referenced by G4VVisCommand::InterpolateToNewView(), and G4VisCommandViewerInterpolate::SetNewValue().

◆ ItoS()

G4String G4UImessenger::ItoS ( G4int  i)
protectedinherited

Definition at line 82 of file G4UImessenger.cc.

83{
84 std::ostringstream os;
85 os << i;
86 return G4String(os.str());
87}

Referenced by G4GenericMessenger::DeclareMethod(), and G4ParticleGunMessenger::GetCurrentValue().

◆ operator!=()

G4bool G4UImessenger::operator!= ( const G4UImessenger messenger) const
inherited

Definition at line 76 of file G4UImessenger.cc.

77{
78 return this != &messenger;
79}

◆ operator=()

G4VisCommandsViewerSet & G4VisCommandsViewerSet::operator= ( const G4VisCommandsViewerSet )
private

◆ operator==()

G4bool G4UImessenger::operator== ( const G4UImessenger messenger) const
inherited

Definition at line 70 of file G4UImessenger.cc.

71{
72 return this == &messenger;
73}

◆ ProvideValueOfUnit()

G4bool G4VVisCommand::ProvideValueOfUnit ( const G4String where,
const G4String unit,
const G4String category,
G4double value 
)
protectedinherited

Definition at line 175 of file G4VVisCommand.cc.

180{
181 // Return false if there's a problem
182
184
185 G4bool success = true;
187 if (verbosity >= G4VisManager::warnings) {
188 G4cerr << where
189 << "\n Unit \"" << unit << "\" not defined"
190 << G4endl;
191 }
192 success = false;
193 } else if (G4UnitDefinition::GetCategory(unit) != category) {
194 if (verbosity >= G4VisManager::warnings) {
195 G4cerr << where
196 << "\n Unit \"" << unit << "\" not a unit of " << category;
197 if (category == "Volumic Mass") G4cerr << " (density)";
198 G4cerr << G4endl;
199 }
200 success = false;
201 } else {
202 value = G4UnitDefinition::GetValueOf(unit);
203 }
204 return success;
205}
static G4double GetValueOf(const G4String &)
static G4String GetCategory(const G4String &)

References G4VVisCommand::fpVisManager, G4cerr, G4endl, G4UnitDefinition::GetCategory(), G4UnitDefinition::GetValueOf(), G4VisManager::GetVerbosity(), G4UnitDefinition::IsUnitDefined(), and G4VisManager::warnings.

Referenced by G4VisCommandViewerColourByDensity::SetNewValue(), and SetNewValue().

◆ RefreshIfRequired()

void G4VVisCommand::RefreshIfRequired ( G4VViewer viewer)
protectedinherited

Definition at line 271 of file G4VVisCommand.cc.

271 {
273 G4VSceneHandler* sceneHandler = viewer->GetSceneHandler();
274 const G4ViewParameters& viewParams = viewer->GetViewParameters();
275 if (sceneHandler && sceneHandler->GetScene()) {
276 if (viewParams.IsAutoRefresh()) {
277 G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/refresh");
278 }
279 else {
280 if (verbosity >= G4VisManager::warnings) {
281 G4cout << "Issue /vis/viewer/refresh or flush to see effect."
282 << G4endl;
283 }
284 }
285 }
286}
const G4ViewParameters & GetViewParameters() const
G4VSceneHandler * GetSceneHandler() const

References G4UImanager::ApplyCommand(), G4VVisCommand::fpVisManager, G4cout, G4endl, G4VSceneHandler::GetScene(), G4VViewer::GetSceneHandler(), G4UImanager::GetUIpointer(), G4VisManager::GetVerbosity(), G4VViewer::GetViewParameters(), G4ViewParameters::IsAutoRefresh(), and G4VisManager::warnings.

Referenced by G4VisCommandViewerReset::SetNewValue(), G4VisCommandViewerRebuild::SetNewValue(), G4VisCommandViewerSelect::SetNewValue(), and G4VVisCommand::SetViewParameters().

◆ SetNewValue()

void G4VisCommandsViewerSet::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 663 of file G4VisCommandsViewerSet.cc.

664 {
665
667
668 G4VViewer* currentViewer = fpVisManager->GetCurrentViewer();
669 if (!currentViewer) {
670 if (verbosity >= G4VisManager::errors) {
671 G4cerr <<
672 "ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer."
673 << G4endl;
674 }
675 return;
676 }
677
678 G4ViewParameters vp = currentViewer->GetViewParameters();
679
680 if (command == fpCommandAll) {
681 G4VViewer* fromViewer = fpVisManager->GetViewer(newValue);
682 if (!fromViewer) {
683 if (verbosity >= G4VisManager::errors) {
684 G4cerr <<
685 "ERROR: G4VisCommandsViewerSet::SetNewValue: all:"
686 "\n unrecognised from-viewer."
687 << G4endl;
688 }
689 return;
690 }
691 if (fromViewer == currentViewer) {
692 if (verbosity >= G4VisManager::warnings) {
693 G4cout <<
694 "WARNING: G4VisCommandsViewerSet::SetNewValue: all:"
695 "\n from-viewer and current viewer are identical."
696 << G4endl;
697 }
698 return;
699 }
700 // Copy view parameters except for autoRefresh and background...
701 CopyMostViewParameters(vp, fromViewer->GetViewParameters());
702 // Concatenate any private vis attributes modifiers...
703 const std::vector<G4ModelingParameters::VisAttributesModifier>*
704 privateVAMs = fromViewer->GetPrivateVisAttributesModifiers();
705 if (privateVAMs) {
706 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator i;
707 for (i = privateVAMs->begin(); i != privateVAMs->end(); ++i) {
709 }
710 }
711 if (verbosity >= G4VisManager::confirmations) {
712 G4cout << "View parameters of viewer \"" << currentViewer->GetName()
713 << "\"\n set to those of viewer \"" << fromViewer->GetName()
714 << "\"."
715 << G4endl;
716 }
717 if (verbosity >= G4VisManager::warnings) {
718 G4cout << "You may need \"/vis/viewer/rebuild\"."
719 << G4endl;
720 }
721 }
722
723 else if (command == fpCommandAutoRefresh) {
724 G4bool autoRefresh = G4UIcommand::ConvertToBool(newValue);
725 const G4ViewParameters& defaultVP =
726 currentViewer->GetDefaultViewParameters();
727 if (autoRefresh && !defaultVP.IsAutoRefresh()) {
728 if (verbosity >= G4VisManager::warnings) {
729 G4cout
730 << "WARNING: "
731 << currentViewer->GetName() << " is NOT auto-refesh by default"
732 << "\n so cannot be set to auto-refresh."
733 << G4endl;
734 }
735 return;
736 }
737 vp.SetAutoRefresh(autoRefresh);
738 if (verbosity >= G4VisManager::confirmations) {
739 G4cout << "Views will ";
740 if (!vp.IsAutoRefresh()) G4cout << "not ";
741 G4cout << "be automatically refreshed after a change of view parameters."
742 << G4endl;
743 }
744 if (!vp.IsAutoRefresh()) {
745 currentViewer->SetViewParameters(vp);
746 return; // Avoid a refresh if auto-refresh has been set to off...
747 } // ...otherwise take normal action.
748 }
749
750 else if (command == fpCommandAuxEdge) {
752 if (verbosity >= G4VisManager::confirmations) {
753 G4cout << "Auxiliary edges will ";
754 if (!vp.IsAuxEdgeVisible()) G4cout << "not ";
755 G4cout << "be visible." << G4endl;
756 }
757 }
758
759 else if (command == fpCommandBackground) {
760 G4String redOrString;
761 G4double green, blue, opacity;
762 std::istringstream iss(newValue);
763 iss >> redOrString >> green >> blue >> opacity;
764 G4Colour colour(0.,0.,0.); // Default black and opaque.
765 ConvertToColour(colour, redOrString, green, blue, opacity);
766 vp.SetBackgroundColour(colour);
767 if (verbosity >= G4VisManager::confirmations) {
768 G4cout << "Background colour "
769 << vp.GetBackgroundColour()
770 << " requested."
771 << G4endl;
772 }
773 }
774
775 else if (command == fpCommandCulling) {
776 G4String cullingOption, stringFlag, unit;
777 G4double density;
778 std::istringstream is (newValue);
779 is >> cullingOption >> stringFlag >> density >> unit;
780 G4bool boolFlag = G4UIcommand::ConvertToBool(stringFlag);
781 if (cullingOption == "global") {
782 vp.SetCulling(boolFlag);
783 if (verbosity >= G4VisManager::confirmations) {
784 G4cout <<
785 "G4VisCommandsViewerSet::SetNewValue: culling: global culling flag"
786 " set to " << G4UIcommand::ConvertToString(boolFlag) <<
787 ".\n Does not change specific culling flags."
788 << G4endl;
789 }
790 }
791 else if (cullingOption == "coveredDaughters") {
792 vp.SetCullingCovered(boolFlag);
793 if (verbosity >= G4VisManager::confirmations) {
794 G4cout <<
795 "G4VisCommandsViewerSet::SetNewValue: culling: culling covered"
796 "\n daughters flag set to "
797 << G4UIcommand::ConvertToString(boolFlag) <<
798 ". Daughters covered by opaque mothers"
799 "\n will be culled, i.e., not drawn, if this flag is true."
800 "\n Note: this is only effective in surface drawing style,"
801 "\n and then only if the volumes are visible and opaque, and then"
802 "\n only if no sections or cutaways are in operation."
803 << G4endl;
804 }
805 }
806 else if (cullingOption == "invisible") {
807 vp.SetCullingInvisible(boolFlag);
808 if (verbosity >= G4VisManager::confirmations) {
809 G4cout <<
810 "G4VisCommandsViewerSet::SetNewValue: culling: culling invisible"
811 "\n flag set to "
812 << boolFlag << G4UIcommand::ConvertToString(boolFlag) <<
813 ". Volumes marked invisible will be culled,"
814 "\n i.e., not drawn, if this flag is true."
815 << G4endl;
816 }
817 }
818 else if (cullingOption == "density") {
819 const G4String where =
820 "G4VisCommandsViewerSet::SetNewValue: culling: culling by density";
821 if (boolFlag) {
822 G4double valueOfUnit;
823 // "Volumic Mass" is Michel's phrase for "Density"
824 if (ProvideValueOfUnit(where,unit,"Volumic Mass",valueOfUnit)) {
825 // Successful outcome of unit search
826 vp.SetDensityCulling(boolFlag);
827 density *= valueOfUnit;
828 vp.SetVisibleDensity(density);
829 } else {
830 // Unsuccessful outcome of unit search. Flag and density unchanged.
831 density = vp.GetVisibleDensity();
832 }
833 } else { // Reset flag but density unchanged.
834 vp.SetDensityCulling(boolFlag);
835 }
836 if (verbosity >= G4VisManager::confirmations) {
837 G4cout
838 << where
839 << "\n flag set to "
840 << std::boolalpha << vp.IsDensityCulling()
841 << ". Volumes with density less than "
842 << G4BestUnit(density,"Volumic Mass")
843 << "\n will be culled, i.e., not drawn, if this flag is true."
844 << G4endl;
845 }
846 }
847 else {
848 if (verbosity >= G4VisManager::errors) {
849 G4cerr <<
850 "ERROR: G4VisCommandsViewerSet::SetNewValue: culling:"
851 "\n option not recognised."
852 << G4endl;
853 }
854 }
855 }
856
857 else if (command == fpCommandCutawayMode) {
858 if (newValue == "add" || newValue == "union")
860 if (newValue == "multiply" || newValue == "intersection")
862
863 if (verbosity >= G4VisManager::confirmations) {
864 G4cout << "Cutaway mode set to ";
866 G4cout << "cutawayUnion";
868 G4cout << "cutawayIntersection";
869 G4cout << G4endl;
870 }
871 }
872
873 else if (command == fpCommandDefaultColour) {
874 G4String redOrString;
875 G4double green, blue, opacity;
876 std::istringstream iss(newValue);
877 iss >> redOrString >> green >> blue >> opacity;
878 G4Colour colour(1.,1.,1.); // Default white and opaque.
879 ConvertToColour(colour, redOrString, green, blue, opacity);
881 va.SetColour(colour);
883 if (verbosity >= G4VisManager::confirmations) {
884 G4cout << "Default colour "
886 << " requested."
887 << G4endl;
888 }
889 }
890
891 else if (command == fpCommandDefaultTextColour) {
892 G4String redOrString;
893 G4double green, blue, opacity;
894 std::istringstream iss(newValue);
895 iss >> redOrString >> green >> blue >> opacity;
896 G4Colour colour(1.,1.,1.); // Default white and opaque.
897 ConvertToColour(colour, redOrString, green, blue, opacity);
899 va.SetColour(colour);
901 if (verbosity >= G4VisManager::confirmations) {
902 G4cout << "Default colour "
904 << " requested."
905 << G4endl;
906 }
907 }
908
909 else if (command == fpCommandEdge) {
911 if (G4UIcommand::ConvertToBool(newValue)) { // true
912 switch (existingStyle) {
914 break;
916 break;
919 break;
921 break;
923 break;
924 }
925 }
926 else { // false
927 switch (existingStyle) {
929 break;
931 break;
933 break;
936 break;
938 break;
939 }
940 }
941 if (verbosity >= G4VisManager::confirmations) {
942 G4cout << "Drawing style of viewer \"" << currentViewer->GetName()
943 << "\" set to " << vp.GetDrawingStyle()
944 << G4endl;
945 }
946 }
947
948 else if (command == fpCommandExplodeFactor) {
949 G4double explodeFactor, x, y, z;
950 G4String unitString;
951 std::istringstream is (newValue);
952 is >> explodeFactor >> x >> y >> z >> unitString;
953 G4double unit = G4UIcommand::ValueOf(unitString);
954 vp.SetExplodeFactor(explodeFactor);
955 vp.SetExplodeCentre(G4Point3D(x * unit, y * unit, z * unit));
956 if (verbosity >= G4VisManager::confirmations) {
957 G4cout << "Explode factor changed to " << vp.GetExplodeFactor()
958 << " from centre " << vp.GetExplodeCentre()
959 << G4endl;
960 }
961 }
962
963 else if (command == fpCommandGlobalLineWidthScale) {
964 G4double globalLineWidthScale
966 vp.SetGlobalLineWidthScale(globalLineWidthScale);
967 if (verbosity >= G4VisManager::confirmations) {
968 G4cout << "Global Line Width Scale changed to "
970 }
971 }
972
973 else if (command == fpCommandGlobalMarkerScale) {
974 G4double globalMarkerScale
976 vp.SetGlobalMarkerScale(globalMarkerScale);
977 if (verbosity >= G4VisManager::confirmations) {
978 G4cout << "Global Marker Scale changed to "
979 << vp.GetGlobalMarkerScale() << G4endl;
980 }
981 }
982
983 else if (command == fpCommandHiddenEdge) {
985 if (G4UIcommand::ConvertToBool(newValue)) {
986 switch (existingStyle) {
989 break;
991 break;
994 break;
996 break;
998 break;
999 }
1000 }
1001 else {
1002 switch (existingStyle) {
1004 break;
1007 break;
1009 break;
1012 break;
1014 break;
1015 }
1016 }
1017 if (verbosity >= G4VisManager::confirmations) {
1018 G4cout << "Drawing style of viewer \"" << currentViewer->GetName()
1019 << "\" set to " << vp.GetDrawingStyle()
1020 << G4endl;
1021 }
1022 }
1023
1024 else if (command == fpCommandHiddenMarker) {
1025 G4bool hidden = G4UIcommand::ConvertToBool(newValue);
1026 if (hidden) vp.SetMarkerHidden();
1027 else vp.SetMarkerNotHidden();
1028 if (verbosity >= G4VisManager::confirmations) {
1029 G4cout << "Markers will ";
1030 if (vp.IsMarkerNotHidden()) G4cout << "not ";
1031 G4cout << "be hidden under solid objects." << G4endl;
1032 }
1033 }
1034
1035 else if (command == fpCommandLightsMove) {
1036 if (newValue.find("cam") != G4String::npos)
1037 vp.SetLightsMoveWithCamera(true);
1038 else if(newValue.find("obj") != G4String::npos)
1039 vp.SetLightsMoveWithCamera(false);
1040 else {
1041 if (verbosity >= G4VisManager::errors) {
1042 G4cerr << "ERROR: \"" << newValue << "\" not recognised."
1043 " Looking for \"cam\" or \"obj\" in string." << G4endl;
1044 }
1045 }
1046 if (verbosity >= G4VisManager::confirmations) {
1047 G4cout << "Lights move with ";
1048 if (vp.GetLightsMoveWithCamera())
1049 G4cout << "camera (object appears to rotate).";
1050 else G4cout << "object (the viewer appears to be moving).";
1051 G4cout << G4endl;
1052 }
1053 }
1054
1055 else if (command == fpCommandLightsThetaPhi) {
1056 G4double theta, phi;
1057 if (ConvertToDoublePair(newValue, theta, phi)) {
1058 G4double x = std::sin (theta) * std::cos (phi);
1059 G4double y = std::sin (theta) * std::sin (phi);
1060 G4double z = std::cos (theta);
1061 fLightsVector = G4ThreeVector (x, y, z);
1063 if (verbosity >= G4VisManager::confirmations) {
1064 G4cout << "Lights direction set to "
1065 << vp.GetLightpointDirection() << G4endl;
1066 }
1067 }
1068 }
1069
1070 else if (command == fpCommandLightsVector) {
1073 if (verbosity >= G4VisManager::confirmations) {
1074 G4cout << "Lights direction set to "
1075 << vp.GetLightpointDirection() << G4endl;
1076 }
1077 }
1078
1079 else if (command == fpCommandLineSegments) {
1080 G4int nSides = G4UIcommand::ConvertToInt(newValue);
1081 nSides = vp.SetNoOfSides(nSides);
1082 if (verbosity >= G4VisManager::confirmations) {
1083 G4cout <<
1084 "Number of line segments per circle in polygon approximation is "
1085 << nSides << G4endl;
1086 }
1087 }
1088
1089 else if (command == fpCommandNumberOfCloudPoints) {
1090 G4int nPoints = G4UIcommand::ConvertToInt(newValue);
1091 nPoints = vp.SetNumberOfCloudPoints(nPoints);
1092 if (verbosity >= G4VisManager::confirmations) {
1093 G4cout <<
1094 "Number of points to be used in cloud representation of volumes is "
1095 << nPoints << G4endl;
1096 }
1097 }
1098
1099 else if (command == fpCommandPicking) {
1101 if (verbosity >= G4VisManager::confirmations) {
1102 G4cout << "Picking ";
1103 if (vp.IsPicking()) G4cout << "requested.";
1104 else G4cout << "inhibited.";
1105 G4cout << G4endl;
1106 }
1107 if (verbosity >= G4VisManager::warnings) {
1108 G4cout << "You may need to issue \"/vis/viewer/update\"."
1109 << G4endl;
1110 }
1111 }
1112
1113 else if (command == fpCommandProjection) {
1114 G4double fieldHalfAngle;
1115 const size_t iPos0 = 0;
1116 if (newValue[iPos0] == 'o') { // "orthogonal"
1117 fieldHalfAngle = 0.;
1118 }
1119 else if (newValue[iPos0] == 'p') { // "perspective"
1120 G4String dummy;
1121 G4String unit;
1122 std::istringstream is (newValue);
1123 is >> dummy >> fieldHalfAngle >> unit;
1124 fieldHalfAngle *= G4UIcommand::ValueOf(unit);
1125 if (fieldHalfAngle > 89.5 * deg || fieldHalfAngle <= 0.0) {
1126 if (verbosity >= G4VisManager::errors) {
1127 G4cerr <<
1128 "ERROR: Field half angle should be 0 < angle <= 89.5 degrees.";
1129 G4cout << G4endl;
1130 }
1131 return;
1132 }
1133 }
1134 else {
1135 if (verbosity >= G4VisManager::errors) {
1136 G4cerr << "ERROR: \"" << newValue << "\" not recognised."
1137 " Looking for 'o' or 'p' first character." << G4endl;
1138 }
1139 return;
1140 }
1141 vp.SetFieldHalfAngle(fieldHalfAngle);
1142 if (verbosity >= G4VisManager::confirmations) {
1143 G4cout << "Projection style of viewer \"" << currentViewer->GetName()
1144 << "\" set to ";
1145 if (fieldHalfAngle == 0.) {
1146 G4cout << "orthogonal.";
1147 }
1148 else {
1149 G4cout << "perspective\n with half angle " << fieldHalfAngle / deg
1150 << " degrees.";
1151 }
1152 G4cout << G4endl;
1153 }
1154 }
1155
1156 else if (command == fpCommandRotationStyle) {
1158 if (newValue == "constrainUpDirection")
1160 else if (newValue == "freeRotation")
1162 else {
1163 if (verbosity >= G4VisManager::errors) {
1164 G4cerr << "ERROR: \"" << newValue << "\" not recognised." << G4endl;
1165 }
1166 return;
1167 }
1168 vp.SetRotationStyle(style);
1169 if (verbosity >= G4VisManager::confirmations) {
1170 G4cout << "Rotation style of viewer \"" << currentViewer->GetName()
1171 << "\" set to " << vp.GetRotationStyle()
1172 << G4endl;
1173 }
1174 }
1175
1176 else if (command == fpCommandSectionPlane) {
1177 G4String choice, unit;
1178 G4double x, y, z, nx, ny, nz, F = 1.;
1179 std::istringstream is (newValue);
1180 is >> choice >> x >> y >> z >> unit >> nx >> ny >> nz;
1181 G4int iSelector = -1;
1182 if (G4StrUtil::icompare(choice, "off") == 0 ||
1183 !G4UIcommand::ConvertToBool(choice)) iSelector = 0;
1184 if (G4StrUtil::icompare(choice, "on") == 0 ||
1185 G4UIcommand::ConvertToBool(choice)) iSelector = 1;
1186 if (iSelector < 0) {
1187 if (verbosity >= G4VisManager::errors) {
1188 G4cout << "Choice not recognised (on/true or off/false)." << G4endl;
1189 }
1190 goto write_result;
1191 }
1192 // iSelector can only be 0 or 1
1193 switch (iSelector) {
1194 case 0:
1195 vp.UnsetSectionPlane();
1196 break;
1197 case 1:
1198 F = G4UIcommand::ValueOf(unit);
1199 x *= F; y *= F; z *= F;
1200 if (nx == 0. && ny == 0. && nz == 0.) {
1201 if (verbosity >= G4VisManager::errors) {
1202 G4cout << "Null normal." << G4endl;
1203 }
1204 break;;
1205 }
1206 const G4Normal3D& normal = G4Normal3D(nx,ny,nz).unit();
1209 break;
1210 }
1211 write_result:
1212 if (verbosity >= G4VisManager::confirmations) {
1213 G4cout << "Section drawing is: ";
1214 if (vp.IsSection ()) G4cout << "on";
1215 else G4cout << "off";
1216 G4cout << ".\nSection plane is now: "
1217 << vp.GetSectionPlane ();
1218 G4cout << G4endl;
1219 }
1220 }
1221
1222 else if (command == fpCommandSpecialMeshRendering) {
1224 if (verbosity >= G4VisManager::confirmations) {
1225 G4cout << "Special mesh rendering ";
1226 if (vp.IsSpecialMeshRendering()) G4cout << "requested.";
1227 else G4cout << "inhibited.";
1228 G4cout << G4endl;
1229 }
1230 }
1231
1232 else if (command == fpCommandSpecialMeshVolumes) {
1233 std::vector<G4ModelingParameters::PVNameCopyNo> requestedMeshes;
1234 if (newValue.empty()) {
1235 vp.SetSpecialMeshVolumes(requestedMeshes); // Empty list
1236 } else {
1237 // Algorithm from Josuttis p.476.
1238 G4String::size_type iBegin, iEnd;
1239 iBegin = newValue.find_first_not_of(' ');
1240 while (iBegin != G4String::npos) {
1241 iEnd = newValue.find_first_of(' ',iBegin);
1242 if (iEnd == G4String::npos) {
1243 iEnd = newValue.length();
1244 }
1245 G4String name(newValue.substr(iBegin,iEnd-iBegin));
1246 iBegin = newValue.find_first_not_of(' ',iEnd);
1247 if (iBegin == G4String::npos) {
1248 if (verbosity >= G4VisManager::warnings) {
1249 G4cout <<
1250 "WARNING: G4VisCommandsViewerSet::SetNewValue: /vis/viewer/set/specialMeshVolumes"
1251 "\n A pair not found. (There should be an even number of parameters.)"
1252 "\n Command ignored."
1253 << G4endl;
1254 return;
1255 }
1256 }
1257 iEnd = newValue.find_first_of(' ',iBegin);
1258 if (iEnd == G4String::npos) {
1259 iEnd = newValue.length();
1260 }
1261 G4int copyNo;
1262 std::istringstream iss(newValue.substr(iBegin,iEnd-iBegin));
1263 if (!(iss >> copyNo)) {
1264 if (verbosity >= G4VisManager::warnings) {
1265 G4cout <<
1266 "WARNING: G4VisCommandsViewerSet::SetNewValue: /vis/viewer/set/specialMeshVolumes"
1267 "\n Error reading copy number - it was not numeric?"
1268 "\n Command ignored."
1269 << G4endl;
1270 return;
1271 }
1272 }
1273 requestedMeshes.push_back(G4ModelingParameters::PVNameCopyNo(name,copyNo));
1274 iBegin = newValue.find_first_not_of(' ',iEnd);
1275 }
1276 vp.SetSpecialMeshVolumes(requestedMeshes);
1277 }
1278 if (verbosity >= G4VisManager::confirmations) {
1279 if (vp.GetSpecialMeshVolumes().empty()) {
1280 G4cout <<
1281 "Special mesh list empty, which means \"all meshes\"."
1282 << G4endl;
1283 } else {
1284 G4cout << "Selected special mesh volumes are:";
1285 for (const auto& pvNameCopyNo: vp.GetSpecialMeshVolumes()) {
1286 G4cout << "\n " << pvNameCopyNo.GetName();
1287 if (pvNameCopyNo.GetCopyNo() >= 0) G4cout << ':' << pvNameCopyNo.GetCopyNo();
1288 }
1289 G4cout << G4endl;
1290 }
1291 }
1292 }
1293
1294 else if (command == fpCommandStyle) {
1296 const size_t iPos0 = 0;
1297 if (newValue[iPos0] == 'w') { // "wireframe"
1298 switch (existingStyle) {
1300 break;
1302 break;
1305 break;
1308 break;
1311 break;
1312 }
1313 }
1314 else if (newValue[iPos0] == 's') { // "surface"
1315 switch (existingStyle) {
1318 break;
1321 break;
1323 break;
1325 break;
1328 break;
1329 }
1330 }
1331 else if (newValue[iPos0] == 'c') { // "cloud"
1332 switch (existingStyle) {
1335 break;
1338 break;
1341 break;
1344 break;
1346 break;
1347 }
1348 }
1349 else {
1350 if (verbosity >= G4VisManager::errors) {
1351 G4cerr << "ERROR: \"" << newValue << "\" not recognised."
1352 " Looking for 'w' or 's' or 'c' first character." << G4endl;
1353 }
1354 return;
1355 }
1356 if (verbosity >= G4VisManager::confirmations) {
1357 G4cout << "Drawing style of viewer \"" << currentViewer->GetName()
1358 << "\" set to " << vp.GetDrawingStyle()
1359 << G4endl;
1360 }
1361 }
1362
1363 else if (command == fpCommandTargetPoint) {
1364 G4ThreeVector targetPoint =
1366 const G4Point3D& standardTargetPoint =
1367 currentViewer->GetSceneHandler()->GetScene()->GetStandardTargetPoint();
1368 vp.SetCurrentTargetPoint(targetPoint - standardTargetPoint);
1369 if (verbosity >= G4VisManager::confirmations) {
1370 G4cout << "Target point set to "
1372 (targetPoint)
1373 << "\n\"Current Target Point\" set to "
1376 << "\n\"Standard Target Point\" is "
1378 (standardTargetPoint)
1379 << G4endl;
1380 }
1381 }
1382
1383 else if (command == fpCommandUpThetaPhi) {
1384 G4double theta, phi;
1385 if (ConvertToDoublePair(newValue, theta, phi)) {
1386 G4double x = std::sin (theta) * std::cos (phi);
1387 G4double y = std::sin (theta) * std::sin (phi);
1388 G4double z = std::cos (theta);
1389 fUpVector = G4ThreeVector (x, y, z);
1391 if (verbosity >= G4VisManager::confirmations) {
1392 G4cout << "Up direction set to " << vp.GetUpVector() << G4endl;
1393 }
1394 }
1395 }
1396
1397 else if (command == fpCommandUpVector) {
1400 if (verbosity >= G4VisManager::confirmations) {
1401 G4cout << "Up direction set to " << vp.GetUpVector() << G4endl;
1402 }
1403 }
1404
1405 else if (command == fpCommandViewpointThetaPhi) {
1406 G4double theta, phi;
1407 if (ConvertToDoublePair(newValue, theta, phi)) {
1408 G4double x = std::sin (theta) * std::cos (phi);
1409 G4double y = std::sin (theta) * std::sin (phi);
1410 G4double z = std::cos (theta);
1411 fViewpointVector = G4ThreeVector (x, y, z);
1413 if (verbosity >= G4VisManager::confirmations) {
1414 G4cout << "Viewpoint direction set to "
1415 << vp.GetViewpointDirection() << G4endl;
1416 if (vp.GetLightsMoveWithCamera ()) {
1417 G4cout << "Lightpoint direction set to "
1419 }
1420 }
1421 }
1422 }
1423
1424 else if (command == fpCommandViewpointVector) {
1425 G4ThreeVector viewpointVector = G4UIcommand::ConvertTo3Vector(newValue);
1426 if (viewpointVector.mag2() <= 0.) {
1427 if (verbosity >= G4VisManager::errors) {
1428 G4cerr << "ERROR: Null viewpoint vector. No action taken." << G4endl;
1429 }
1430 } else {
1431 fViewpointVector = viewpointVector.unit();
1433 if (verbosity >= G4VisManager::confirmations) {
1434 G4cout << "Viewpoint direction set to "
1435 << vp.GetViewpointDirection() << G4endl;
1436 if (vp.GetLightsMoveWithCamera ()) {
1437 G4cout << "Lightpoint direction set to "
1439 }
1440 }
1441 }
1442 }
1443
1444 else if (command == fpCommandTimeWindowDisplayHeadTime)
1445 {
1446 G4String display;
1447 G4double screenX, screenY, screenSize, red, green, blue;
1448 std::istringstream iss(newValue);
1449 iss >> display >> screenX >> screenY
1450 >> screenSize >> red >> green >> blue;
1451 vp.SetDisplayHeadTime(command->ConvertToBool(display));
1452 vp.SetDisplayHeadTimeX(screenX);
1453 vp.SetDisplayHeadTimeY(screenY);
1454 vp.SetDisplayHeadTimeSize(screenSize);
1455 vp.SetDisplayHeadTimeRed(red);
1456 vp.SetDisplayHeadTimeGreen(green);
1457 vp.SetDisplayHeadTimeBlue(blue);
1458 if (verbosity >= G4VisManager::confirmations) {
1459 G4cout << "Display head time flag set: "
1460 << vp
1461 << G4endl;
1462 }
1463 }
1464
1465 else if (command == fpCommandTimeWindowDisplayLightFront)
1466 {
1467 G4String display, originX, originY, originZ, unitS, originT, unitT;
1468 G4double red, green, blue;
1469 std::istringstream iss(newValue);
1470 iss >> display
1471 >> originX >> originY >> originZ >> unitS
1472 >> originT >> unitT
1473 >> red >> green >> blue;
1474 vp.SetDisplayLightFront(command->ConvertToBool(display));
1476 (command->ConvertToDimensionedDouble(G4String(originX + ' ' + unitS)));
1478 (command->ConvertToDimensionedDouble(G4String(originY + ' ' + unitS)));
1480 (command->ConvertToDimensionedDouble(G4String(originZ + ' ' + unitS)));
1482 (command->ConvertToDimensionedDouble(G4String(originT + ' ' + unitT)));
1484 vp.SetDisplayLightFrontGreen(green);
1485 vp.SetDisplayLightFrontBlue(blue);
1486 if (verbosity >= G4VisManager::confirmations) {
1487 G4cout << "Display light front flag set: "
1488 << vp
1489 << G4endl;
1490 }
1491 }
1492
1493 else if (command == fpCommandTimeWindowEndTime)
1494 {
1495 G4String end_time_string, end_time_unit,
1496 time_range_string, time_range_unit;
1497 std::istringstream iss(newValue);
1498 iss >> end_time_string >> end_time_unit
1499 >> time_range_string >> time_range_unit;
1500 vp.SetEndTime
1502 (G4String(end_time_string + ' ' + end_time_unit)));
1503 G4double timeRange = command->ConvertToDimensionedDouble
1504 (G4String(time_range_string + ' ' + time_range_unit));
1505 if (timeRange > 0.) {
1506 vp.SetStartTime
1507 (vp.GetEndTime() - timeRange);
1508 }
1509 if (verbosity >= G4VisManager::confirmations) {
1510 G4cout
1511 << "Time window start time: " << vp.GetStartTime()/ns << " ns"
1512 << ", time window end time: " << vp.GetEndTime()/ns << " ns";
1513 if (timeRange > 0.) {
1514 G4cout << "\n (time range: " << timeRange/ns << " ns)";
1515 }
1516 G4cout << G4endl;
1517 }
1518 }
1519
1520 else if (command == fpCommandTimeWindowFadeFactor) {
1521 vp.SetFadeFactor(command->ConvertToDouble(newValue));
1522 if (verbosity >= G4VisManager::confirmations) {
1523 G4cout << "Time window fade factor changed to " << vp.GetFadeFactor()
1524 << G4endl;
1525 }
1526 }
1527
1528 else if (command == fpCommandTimeWindowStartTime)
1529 {
1530 G4String start_time_string, start_time_unit,
1531 time_range_string, time_range_unit;
1532 std::istringstream iss(newValue);
1533 iss >> start_time_string >> start_time_unit
1534 >> time_range_string >> time_range_unit;
1535 vp.SetStartTime
1537 (G4String(start_time_string + ' ' + start_time_unit)));
1538 G4double timeRange = command->ConvertToDimensionedDouble
1539 (G4String(time_range_string + ' ' + time_range_unit));
1540 if (timeRange > 0.) {
1541 vp.SetEndTime
1542 (vp.GetStartTime() + timeRange);
1543 }
1544 if (verbosity >= G4VisManager::confirmations) {
1545 G4cout
1546 << "Time window start time: " << vp.GetStartTime()/ns << " ns"
1547 << ", time window end time: " << vp.GetEndTime()/ns << " ns";
1548 if (timeRange > 0.) {
1549 G4cout << "\n (time range: " << timeRange/ns << " ns)";
1550 }
1551 G4cout << G4endl;
1552 }
1553 }
1554
1555 else {
1556 if (verbosity >= G4VisManager::errors) {
1557 G4cerr <<
1558 "ERROR: G4VisCommandsViewerSet::SetNewValue: unrecognised command."
1559 << G4endl;
1560 }
1561 return;
1562 }
1563
1564 SetViewParameters(currentViewer,vp);
1565}
HepGeom::Normal3D< G4double > G4Normal3D
Definition: G4Normal3D.hh:34
HepGeom::Plane3D< G4double > G4Plane3D
Definition: G4Plane3D.hh:36
HepGeom::Point3D< G4double > G4Point3D
Definition: G4Point3D.hh:34
static constexpr double deg
Definition: G4SIunits.hh:132
#define G4BestUnit(a, b)
Hep3Vector unit() const
double mag2() const
const G4Point3D & GetStandardTargetPoint() const
G4String ConvertToStringWithBestUnit(G4ThreeVector vec)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4ThreeVector ConvertTo3Vector(const char *st)
Definition: G4UIcommand.cc:597
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:445
static G4int ConvertToInt(const char *st)
Definition: G4UIcommand.cc:557
static G4bool ConvertToBool(const char *st)
Definition: G4UIcommand.cc:545
static G4double ConvertToDouble(const char *st)
Definition: G4UIcommand.cc:575
static G4double ConvertToDimensionedDouble(const char *st)
Definition: G4UIcommand.cc:584
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers() const
const G4ViewParameters & GetDefaultViewParameters() const
void ConvertToColour(G4Colour &colour, const G4String &redOrString, G4double green, G4double blue, G4double opacity)
static G4bool ConvertToDoublePair(const G4String &paramString, G4double &xval, G4double &yval)
void SetViewParameters(G4VViewer *viewer, const G4ViewParameters &viewParams)
G4bool ProvideValueOfUnit(const G4String &where, const G4String &unit, const G4String &category, G4double &value)
void CopyMostViewParameters(G4ViewParameters &target, const G4ViewParameters &from)
G4int SetNumberOfCloudPoints(G4int)
G4int SetNoOfSides(G4int nSides)
void SetViewAndLights(const G4Vector3D &viewpointDirection)
void SetGlobalMarkerScale(G4double globalMarkerScale)
void SetExplodeCentre(const G4Point3D &explodeCentre)
void SetDisplayLightFrontY(G4double)
G4bool IsSpecialMeshRendering() const
CutawayMode GetCutawayMode() const
G4double GetExplodeFactor() const
G4bool IsMarkerNotHidden() const
void SetDisplayHeadTimeBlue(G4double)
void SetVisibleDensity(G4double visibleDensity)
G4double GetGlobalLineWidthScale() const
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
G4Vector3D & GetActualLightpointDirection()
void SetCulling(G4bool)
void SetDisplayLightFrontT(G4double)
void UnsetSectionPlane()
void SetDrawingStyle(G4ViewParameters::DrawingStyle style)
void SetDisplayHeadTimeX(G4double)
void SetDefaultVisAttributes(const G4VisAttributes &)
void SetCullingCovered(G4bool)
G4bool IsSection() const
void SetExplodeFactor(G4double explodeFactor)
void SetGlobalLineWidthScale(G4double globalLineWidthScale)
G4bool IsPicking() const
void SetStartTime(G4double)
void SetSpecialMeshVolumes(const std::vector< G4ModelingParameters::PVNameCopyNo > &)
void SetPicking(G4bool)
void SetDisplayLightFrontBlue(G4double)
void SetMarkerHidden()
void SetDisplayHeadTime(G4bool)
const G4VisAttributes * GetDefaultTextVisAttributes() const
void SetDisplayHeadTimeY(G4double)
void SetDensityCulling(G4bool)
void SetDisplayLightFrontZ(G4double)
G4double GetStartTime() const
void SetDisplayLightFront(G4bool)
void SetDisplayLightFrontRed(G4double)
void SetDisplayHeadTimeSize(G4double)
void SetMarkerNotHidden()
void SetDisplayHeadTimeRed(G4double)
G4double GetEndTime() const
const std::vector< G4ModelingParameters::PVNameCopyNo > & GetSpecialMeshVolumes() const
G4double GetFadeFactor() const
G4double GetGlobalMarkerScale() const
const G4VisAttributes * GetDefaultVisAttributes() const
void SetCullingInvisible(G4bool)
void SetEndTime(G4double)
void SetFadeFactor(G4double)
RotationStyle GetRotationStyle() const
void SetCutawayMode(CutawayMode)
void SetSpecialMeshRendering(G4bool)
G4bool IsDensityCulling() const
void SetDefaultTextVisAttributes(const G4VisAttributes &)
void SetDisplayLightFrontX(G4double)
void SetDisplayHeadTimeGreen(G4double)
void SetRotationStyle(RotationStyle)
G4double GetVisibleDensity() const
void SetSectionPlane(const G4Plane3D &sectionPlane)
void SetAuxEdgeVisible(G4bool)
void SetDisplayLightFrontGreen(G4double)
const G4Point3D & GetExplodeCentre() const
const G4Plane3D & GetSectionPlane() const
DrawingStyle GetDrawingStyle() const
G4bool IsAuxEdgeVisible() const
void SetColour(const G4Colour &)
const G4Colour & GetColour() const
G4VViewer * GetCurrentViewer() const
G4VViewer * GetViewer(const G4String &viewerName) const
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:79
const char * name(G4int ptype)
G4int icompare(std::string_view lhs, std::string_view rhs)
Case insensitive comparison of two strings.
#define ns
Definition: xmlparse.cc:614

References G4ViewParameters::AddVisAttributesModifier(), G4ViewParameters::cloud, G4VisManager::confirmations, G4ViewParameters::constrainUpDirection, G4UIcommand::ConvertTo3Vector(), G4UIcommand::ConvertToBool(), G4VVisCommand::ConvertToColour(), G4UIcommand::ConvertToDimensionedDouble(), G4UIcommand::ConvertToDouble(), G4VVisCommand::ConvertToDoublePair(), G4UIcommand::ConvertToInt(), G4UIcommand::ConvertToString(), G4UIcmdWith3VectorAndUnit::ConvertToStringWithBestUnit(), G4VVisCommand::CopyMostViewParameters(), G4ViewParameters::cutawayIntersection, G4ViewParameters::cutawayUnion, deg, G4VisManager::errors, fLightsVector, fpCommandAll, fpCommandAutoRefresh, fpCommandAuxEdge, fpCommandBackground, fpCommandCulling, fpCommandCutawayMode, fpCommandDefaultColour, fpCommandDefaultTextColour, fpCommandEdge, fpCommandExplodeFactor, fpCommandGlobalLineWidthScale, fpCommandGlobalMarkerScale, fpCommandHiddenEdge, fpCommandHiddenMarker, fpCommandLightsMove, fpCommandLightsThetaPhi, fpCommandLightsVector, fpCommandLineSegments, fpCommandNumberOfCloudPoints, fpCommandPicking, fpCommandProjection, fpCommandRotationStyle, fpCommandSectionPlane, fpCommandSpecialMeshRendering, fpCommandSpecialMeshVolumes, fpCommandStyle, fpCommandTargetPoint, fpCommandTimeWindowDisplayHeadTime, fpCommandTimeWindowDisplayLightFront, fpCommandTimeWindowEndTime, fpCommandTimeWindowFadeFactor, fpCommandTimeWindowStartTime, fpCommandUpThetaPhi, fpCommandUpVector, fpCommandViewpointThetaPhi, fpCommandViewpointVector, G4VVisCommand::fpVisManager, G4ViewParameters::freeRotation, fUpVector, fViewpointVector, G4BestUnit, G4cerr, G4cout, G4endl, G4ViewParameters::GetActualLightpointDirection(), G4ViewParameters::GetBackgroundColour(), G4VisAttributes::GetColour(), G4ViewParameters::GetCurrentTargetPoint(), G4VisManager::GetCurrentViewer(), G4ViewParameters::GetCutawayMode(), G4ViewParameters::GetDefaultTextVisAttributes(), G4VViewer::GetDefaultViewParameters(), G4ViewParameters::GetDefaultVisAttributes(), G4ViewParameters::GetDrawingStyle(), G4ViewParameters::GetEndTime(), G4ViewParameters::GetExplodeCentre(), G4ViewParameters::GetExplodeFactor(), G4ViewParameters::GetFadeFactor(), G4ViewParameters::GetGlobalLineWidthScale(), G4ViewParameters::GetGlobalMarkerScale(), G4ViewParameters::GetLightpointDirection(), G4ViewParameters::GetLightsMoveWithCamera(), G4VViewer::GetName(), G4UIcmdWith3VectorAndUnit::GetNew3VectorValue(), G4UIcmdWithADouble::GetNewDoubleValue(), G4VViewer::GetPrivateVisAttributesModifiers(), G4ViewParameters::GetRotationStyle(), G4VSceneHandler::GetScene(), G4VViewer::GetSceneHandler(), G4ViewParameters::GetSectionPlane(), G4ViewParameters::GetSpecialMeshVolumes(), G4Scene::GetStandardTargetPoint(), G4ViewParameters::GetStartTime(), G4ViewParameters::GetUpVector(), G4VisManager::GetVerbosity(), G4VisManager::GetViewer(), G4VViewer::GetViewParameters(), G4ViewParameters::GetViewpointDirection(), G4ViewParameters::GetVisibleDensity(), G4ViewParameters::hlhsr, G4ViewParameters::hlr, G4ViewParameters::hsr, G4StrUtil::icompare(), G4ViewParameters::IsAutoRefresh(), G4ViewParameters::IsAuxEdgeVisible(), G4ViewParameters::IsDensityCulling(), G4ViewParameters::IsMarkerNotHidden(), G4ViewParameters::IsPicking(), G4ViewParameters::IsSection(), G4ViewParameters::IsSpecialMeshRendering(), CLHEP::Hep3Vector::mag2(), G4InuclParticleNames::name(), CLHEP::normal(), ns, G4VVisCommand::ProvideValueOfUnit(), G4ViewParameters::SetAutoRefresh(), G4ViewParameters::SetAuxEdgeVisible(), G4ViewParameters::SetBackgroundColour(), G4VisAttributes::SetColour(), G4ViewParameters::SetCulling(), G4ViewParameters::SetCullingCovered(), G4ViewParameters::SetCullingInvisible(), G4ViewParameters::SetCurrentTargetPoint(), G4ViewParameters::SetCutawayMode(), G4ViewParameters::SetDefaultTextVisAttributes(), G4ViewParameters::SetDefaultVisAttributes(), G4ViewParameters::SetDensityCulling(), G4ViewParameters::SetDisplayHeadTime(), G4ViewParameters::SetDisplayHeadTimeBlue(), G4ViewParameters::SetDisplayHeadTimeGreen(), G4ViewParameters::SetDisplayHeadTimeRed(), G4ViewParameters::SetDisplayHeadTimeSize(), G4ViewParameters::SetDisplayHeadTimeX(), G4ViewParameters::SetDisplayHeadTimeY(), G4ViewParameters::SetDisplayLightFront(), G4ViewParameters::SetDisplayLightFrontBlue(), G4ViewParameters::SetDisplayLightFrontGreen(), G4ViewParameters::SetDisplayLightFrontRed(), G4ViewParameters::SetDisplayLightFrontT(), G4ViewParameters::SetDisplayLightFrontX(), G4ViewParameters::SetDisplayLightFrontY(), G4ViewParameters::SetDisplayLightFrontZ(), G4ViewParameters::SetDrawingStyle(), G4ViewParameters::SetEndTime(), G4ViewParameters::SetExplodeCentre(), G4ViewParameters::SetExplodeFactor(), G4ViewParameters::SetFadeFactor(), G4ViewParameters::SetFieldHalfAngle(), G4ViewParameters::SetGlobalLineWidthScale(), G4ViewParameters::SetGlobalMarkerScale(), G4ViewParameters::SetLightpointDirection(), G4ViewParameters::SetLightsMoveWithCamera(), G4ViewParameters::SetMarkerHidden(), G4ViewParameters::SetMarkerNotHidden(), G4ViewParameters::SetNoOfSides(), G4ViewParameters::SetNumberOfCloudPoints(), G4ViewParameters::SetPicking(), G4ViewParameters::SetRotationStyle(), G4ViewParameters::SetSectionPlane(), G4ViewParameters::SetSpecialMeshRendering(), G4ViewParameters::SetSpecialMeshVolumes(), G4ViewParameters::SetStartTime(), G4ViewParameters::SetUpVector(), G4ViewParameters::SetViewAndLights(), G4VViewer::SetViewParameters(), G4VVisCommand::SetViewParameters(), G4ViewParameters::SetViewpointDirection(), G4ViewParameters::SetVisibleDensity(), CLHEP::Hep3Vector::unit(), G4ViewParameters::UnsetSectionPlane(), G4UIcommand::ValueOf(), G4VisManager::warnings, and G4ViewParameters::wireframe.

◆ SetViewParameters()

void G4VVisCommand::SetViewParameters ( G4VViewer viewer,
const G4ViewParameters viewParams 
)
protectedinherited

◆ SetVisManager()

void G4VVisCommand::SetVisManager ( G4VisManager pVisManager)
staticinherited

Definition at line 65 of file G4VVisCommand.cc.

66{
67 fpVisManager = pVisManager;
68}

References G4VVisCommand::fpVisManager.

Referenced by G4VisManager::G4VisManager().

◆ StoB()

G4bool G4UImessenger::StoB ( G4String  s)
protectedinherited

Definition at line 137 of file G4UImessenger.cc.

138{
140 G4bool vl = false;
141 if(v == "Y" || v == "YES" || v == "1" || v == "T" || v == "TRUE")
142 {
143 vl = true;
144 }
145 return vl;
146}
G4String to_upper_copy(G4String str)
Return uppercase copy of string.

References G4StrUtil::to_upper_copy().

Referenced by G4LocalThreadCoutMessenger::SetNewValue(), G4CascadeParamMessenger::SetNewValue(), G4ScoreQuantityMessenger::SetNewValue(), and G4ScoringMessenger::SetNewValue().

◆ StoD()

G4double G4UImessenger::StoD ( G4String  s)
protectedinherited

◆ StoI()

G4int G4UImessenger::StoI ( G4String  s)
protectedinherited

◆ StoL()

G4long G4UImessenger::StoL ( G4String  s)
protectedinherited

Definition at line 117 of file G4UImessenger.cc.

118{
119 G4long vl;
120 const char* t = str;
121 std::istringstream is(t);
122 is >> vl;
123 return vl;
124}
long G4long
Definition: G4Types.hh:87

Referenced by G4RunMessenger::SetNewValue().

Field Documentation

◆ baseDir

G4UIdirectory* G4UImessenger::baseDir = nullptr
protectedinherited

◆ baseDirName

G4String G4UImessenger::baseDirName = ""
protectedinherited

◆ commandsShouldBeInMaster

G4bool G4UImessenger::commandsShouldBeInMaster = false
protectedinherited

◆ fCurrentArrow3DLineSegmentsPerCircle

G4int G4VVisCommand::fCurrentArrow3DLineSegmentsPerCircle = 6
staticprotectedinherited

◆ fCurrentColour

G4Colour G4VVisCommand::fCurrentColour = G4Colour::White()
staticprotectedinherited

◆ fCurrentExtentForField

G4VisExtent G4VVisCommand::fCurrentExtentForField
staticprotectedinherited

◆ fCurrentLineWidth

G4double G4VVisCommand::fCurrentLineWidth = 1.
staticprotectedinherited

◆ fCurrentTextColour

G4Colour G4VVisCommand::fCurrentTextColour = G4Colour::Blue()
staticprotectedinherited

◆ fCurrentTextLayout

G4Text::Layout G4VVisCommand::fCurrentTextLayout = G4Text::left
staticprotectedinherited

◆ fCurrentTextSize

G4double G4VVisCommand::fCurrentTextSize = 12.
staticprotectedinherited

◆ fCurrentTouchableProperties

G4PhysicalVolumeModel::TouchableProperties G4VVisCommand::fCurrentTouchableProperties
staticprotectedinherited

◆ fCurrrentPVFindingsForField

std::vector< G4PhysicalVolumesSearchScene::Findings > G4VVisCommand::fCurrrentPVFindingsForField
staticprotectedinherited

◆ fLightsVector

G4ThreeVector G4VisCommandsViewerSet::fLightsVector
private

Definition at line 71 of file G4VisCommandsViewerSet.hh.

Referenced by SetNewValue().

◆ fpCommandAll

G4UIcmdWithAString* G4VisCommandsViewerSet::fpCommandAll
private

◆ fpCommandAutoRefresh

G4UIcmdWithABool* G4VisCommandsViewerSet::fpCommandAutoRefresh
private

◆ fpCommandAuxEdge

G4UIcmdWithABool* G4VisCommandsViewerSet::fpCommandAuxEdge
private

◆ fpCommandBackground

G4UIcommand* G4VisCommandsViewerSet::fpCommandBackground
private

◆ fpCommandCulling

G4UIcommand* G4VisCommandsViewerSet::fpCommandCulling
private

◆ fpCommandCutawayMode

G4UIcmdWithAString* G4VisCommandsViewerSet::fpCommandCutawayMode
private

◆ fpCommandDefaultColour

G4UIcommand* G4VisCommandsViewerSet::fpCommandDefaultColour
private

◆ fpCommandDefaultTextColour

G4UIcommand* G4VisCommandsViewerSet::fpCommandDefaultTextColour
private

◆ fpCommandEdge

G4UIcmdWithABool* G4VisCommandsViewerSet::fpCommandEdge
private

◆ fpCommandExplodeFactor

G4UIcommand* G4VisCommandsViewerSet::fpCommandExplodeFactor
private

◆ fpCommandGlobalLineWidthScale

G4UIcmdWithADouble* G4VisCommandsViewerSet::fpCommandGlobalLineWidthScale
private

◆ fpCommandGlobalMarkerScale

G4UIcmdWithADouble* G4VisCommandsViewerSet::fpCommandGlobalMarkerScale
private

◆ fpCommandHiddenEdge

G4UIcmdWithABool* G4VisCommandsViewerSet::fpCommandHiddenEdge
private

◆ fpCommandHiddenMarker

G4UIcmdWithABool* G4VisCommandsViewerSet::fpCommandHiddenMarker
private

◆ fpCommandLightsMove

G4UIcmdWithAString* G4VisCommandsViewerSet::fpCommandLightsMove
private

◆ fpCommandLightsThetaPhi

G4UIcommand* G4VisCommandsViewerSet::fpCommandLightsThetaPhi
private

◆ fpCommandLightsVector

G4UIcommand* G4VisCommandsViewerSet::fpCommandLightsVector
private

◆ fpCommandLineSegments

G4UIcmdWithAnInteger* G4VisCommandsViewerSet::fpCommandLineSegments
private

◆ fpCommandNumberOfCloudPoints

G4UIcmdWithAnInteger* G4VisCommandsViewerSet::fpCommandNumberOfCloudPoints
private

◆ fpCommandPicking

G4UIcmdWithABool* G4VisCommandsViewerSet::fpCommandPicking
private

◆ fpCommandProjection

G4UIcommand* G4VisCommandsViewerSet::fpCommandProjection
private

◆ fpCommandRotationStyle

G4UIcmdWithAString* G4VisCommandsViewerSet::fpCommandRotationStyle
private

◆ fpCommandSectionPlane

G4UIcommand* G4VisCommandsViewerSet::fpCommandSectionPlane
private

◆ fpCommandSpecialMeshRendering

G4UIcmdWithABool* G4VisCommandsViewerSet::fpCommandSpecialMeshRendering
private

◆ fpCommandSpecialMeshVolumes

G4UIcommand* G4VisCommandsViewerSet::fpCommandSpecialMeshVolumes
private

◆ fpCommandStyle

G4UIcmdWithAString* G4VisCommandsViewerSet::fpCommandStyle
private

◆ fpCommandTargetPoint

G4UIcmdWith3VectorAndUnit* G4VisCommandsViewerSet::fpCommandTargetPoint
private

◆ fpCommandTimeWindowDisplayHeadTime

G4UIcommand* G4VisCommandsViewerSet::fpCommandTimeWindowDisplayHeadTime
private

◆ fpCommandTimeWindowDisplayLightFront

G4UIcommand* G4VisCommandsViewerSet::fpCommandTimeWindowDisplayLightFront
private

◆ fpCommandTimeWindowEndTime

G4UIcommand* G4VisCommandsViewerSet::fpCommandTimeWindowEndTime
private

◆ fpCommandTimeWindowFadeFactor

G4UIcmdWithADouble* G4VisCommandsViewerSet::fpCommandTimeWindowFadeFactor
private

◆ fpCommandTimeWindowStartTime

G4UIcommand* G4VisCommandsViewerSet::fpCommandTimeWindowStartTime
private

◆ fpCommandUpThetaPhi

G4UIcommand* G4VisCommandsViewerSet::fpCommandUpThetaPhi
private

◆ fpCommandUpVector

G4UIcommand* G4VisCommandsViewerSet::fpCommandUpVector
private

◆ fpCommandViewpointThetaPhi

G4UIcommand* G4VisCommandsViewerSet::fpCommandViewpointThetaPhi
private

◆ fpCommandViewpointVector

G4UIcommand* G4VisCommandsViewerSet::fpCommandViewpointVector
private

◆ fpTimeWindowDirectory

G4UIdirectory* G4VisCommandsViewerSet::fpTimeWindowDirectory
private

Definition at line 88 of file G4VisCommandsViewerSet.hh.

Referenced by G4VisCommandsViewerSet(), and ~G4VisCommandsViewerSet().

◆ fpVisManager

G4VisManager * G4VVisCommand::fpVisManager = nullptr
staticprotectedinherited

Definition at line 143 of file G4VVisCommand.hh.

Referenced by G4VisCommandSceneAddUserAction::AddVisAction(), G4VVisCommand::CheckSceneAndNotifyHandlers(), G4VVisCommand::CheckView(), G4VVisCommand::ConvertToColour(), G4VVisCommand::ConvertToDoublePair(), G4VVisCommandScene::CurrentSceneName(), G4VVisCommand::DrawExtent(), G4VisCommandSceneHandlerCreate::G4VisCommandSceneHandlerCreate(), G4VisCommandSceneHandlerAttach::GetCurrentValue(), G4VisCommandSceneHandlerCreate::GetCurrentValue(), G4VisCommandViewerClear::GetCurrentValue(), G4VisCommandViewerClearTransients::GetCurrentValue(), G4VisCommandViewerClone::GetCurrentValue(), G4VisCommandViewerCreate::GetCurrentValue(), G4VisCommandViewerFlush::GetCurrentValue(), G4VisCommandViewerReset::GetCurrentValue(), G4VisCommandViewerRefresh::GetCurrentValue(), G4VisCommandViewerRebuild::GetCurrentValue(), G4VisCommandViewerUpdate::GetCurrentValue(), G4VVisCommand::GetVisManager(), G4VisCommandViewerCreate::NextName(), G4VisCommandSceneAddEventID::EventID::operator()(), G4VVisCommand::ProvideValueOfUnit(), G4VVisCommand::RefreshIfRequired(), G4VVisCommandGeometrySet::Set(), G4VVisCommandGeometrySet::SetLVVisAtts(), G4ToolsSGSceneHandler::Messenger::SetNewValue(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::Messenger::SetNewValue(), G4VisCommandAbortReviewKeptEvents::SetNewValue(), G4VisCommandDrawOnlyToBeKeptEvents::SetNewValue(), G4VisCommandEnable::SetNewValue(), G4VisCommandInitialize::SetNewValue(), G4VisCommandList::SetNewValue(), G4VisCommandReviewKeptEvents::SetNewValue(), G4VisCommandVerbose::SetNewValue(), G4VisCommandDrawTree::SetNewValue(), G4VisCommandDrawView::SetNewValue(), G4VisCommandDrawLogicalVolume::SetNewValue(), G4VisCommandDrawVolume::SetNewValue(), G4VisCommandOpen::SetNewValue(), G4VisCommandSpecify::SetNewValue(), G4VisCommandGeometryList::SetNewValue(), G4VisCommandGeometryRestore::SetNewValue(), G4VisCommandGeometrySetDaughtersInvisible::SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValue(), G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandSceneCreate::SetNewValue(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandSceneEndOfRunAction::SetNewValue(), G4VisCommandSceneList::SetNewValue(), G4VisCommandSceneNotifyHandlers::SetNewValue(), G4VisCommandSceneRemoveModel::SetNewValue(), G4VisCommandSceneSelect::SetNewValue(), G4VisCommandSceneShowExtents::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddExtent::SetNewValue(), G4VisCommandSceneAddElectricField::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddGPS::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLocalAxes::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddMagneticField::SetNewValue(), G4VisCommandSceneAddPSHits::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), G4VisCommandSceneAddUserAction::SetNewValue(), G4VisCommandSceneAddVolume::SetNewValue(), G4VisCommandSceneAddPlotter::SetNewValue(), G4VisCommandSceneHandlerAttach::SetNewValue(), G4VisCommandSceneHandlerCreate::SetNewValue(), G4VisCommandSceneHandlerList::SetNewValue(), G4VisCommandSceneHandlerSelect::SetNewValue(), G4VisCommandSetArrow3DLineSegmentsPerCircle::SetNewValue(), G4VisCommandSetColour::SetNewValue(), G4VisCommandSetExtentForField::SetNewValue(), G4VisCommandSetLineWidth::SetNewValue(), G4VisCommandSetTextColour::SetNewValue(), G4VisCommandSetTextLayout::SetNewValue(), G4VisCommandSetTextSize::SetNewValue(), G4VisCommandSetTouchable::SetNewValue(), G4VisCommandSetVolumeForField::SetNewValue(), G4VisCommandsTouchable::SetNewValue(), G4VisCommandsTouchableSet::SetNewValue(), G4VisCommandViewerAddCutawayPlane::SetNewValue(), G4VisCommandViewerCentreOn::SetNewValue(), G4VisCommandViewerChangeCutawayPlane::SetNewValue(), G4VisCommandViewerClear::SetNewValue(), G4VisCommandViewerClearCutawayPlanes::SetNewValue(), G4VisCommandViewerClearTransients::SetNewValue(), G4VisCommandViewerClearVisAttributesModifiers::SetNewValue(), G4VisCommandViewerClone::SetNewValue(), G4VisCommandViewerColourByDensity::SetNewValue(), G4VisCommandViewerCopyViewFrom::SetNewValue(), G4VisCommandViewerCreate::SetNewValue(), G4VisCommandViewerDolly::SetNewValue(), G4VisCommandViewerFlush::SetNewValue(), G4VisCommandViewerInterpolate::SetNewValue(), G4VisCommandViewerList::SetNewValue(), G4VisCommandViewerPan::SetNewValue(), G4VisCommandViewerReset::SetNewValue(), G4VisCommandViewerRefresh::SetNewValue(), G4VisCommandViewerRebuild::SetNewValue(), G4VisCommandViewerSave::SetNewValue(), G4VisCommandViewerScale::SetNewValue(), G4VisCommandViewerSelect::SetNewValue(), G4VisCommandViewerUpdate::SetNewValue(), G4VisCommandViewerZoom::SetNewValue(), G4VisCommandViewerDefaultHiddenEdge::SetNewValue(), G4VisCommandViewerDefaultStyle::SetNewValue(), SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValueOnLV(), and G4VVisCommand::SetVisManager().

◆ fThereWasAViewer

G4bool G4VVisCommand::fThereWasAViewer = false
staticprotectedinherited

◆ fUpVector

G4ThreeVector G4VisCommandsViewerSet::fUpVector
private

Definition at line 84 of file G4VisCommandsViewerSet.hh.

Referenced by SetNewValue().

◆ fViewpointVector

G4ThreeVector G4VisCommandsViewerSet::fViewpointVector
private

Definition at line 87 of file G4VisCommandsViewerSet.hh.

Referenced by SetNewValue().

◆ fVPExistingViewer

G4ViewParameters G4VVisCommand::fVPExistingViewer
staticprotectedinherited

The documentation for this class was generated from the following files: