Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VisCommandsSceneAdd.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27
28// /vis/scene commands - John Allison 9th August 1998
29// Michael Kelsey 31 Jan 2019 -- Add new command for electric field
30
31#ifndef G4VISCOMMANDSSCENEADD_HH
32#define G4VISCOMMANDSSCENEADD_HH
33
34#include "G4VisCommandsScene.hh"
35
39
40#include "G4Transform3D.hh"
41#include "G4VisAttributes.hh"
42#include "G4Polyline.hh"
43#include "G4Text.hh"
44#include "G4Timer.hh"
45
47public:
51 void SetNewValue (G4UIcommand* command, G4String newValue);
52private:
55 G4UIcommand* fpCommand;
56};
57
59public:
63 void SetNewValue (G4UIcommand* command, G4String newValue);
64private:
67 struct Arrow2D {
68 Arrow2D(G4double x1, G4double y1,
69 G4double x2, G4double y2,
70 G4double width, const G4Colour& colour);
71 void operator()(G4VGraphicsScene&, const G4ModelingParameters* fpMp);
72 G4Polyline fShaftPolyline;
73 G4Polyline fHeadPolyline;
74 G4double fWidth;
75 G4Colour fColour;
76 };
77 G4UIcommand* fpCommand;
78};
79
81public:
85 void SetNewValue (G4UIcommand* command, G4String newValue);
86private:
89 G4UIcommand* fpCommand;
90};
91
93public:
97 void SetNewValue (G4UIcommand* command, G4String newValue);
98private:
101 struct Date {
102 Date
103 (G4VisManager* vm, G4int size,
104 G4double x, G4double y, G4Text::Layout layout,
105 const G4String& date):
106 fpVisManager(vm), fSize(size),
107 fX(x), fY(y), fLayout(layout), fDate(date) {}
108 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
109 G4VisManager* fpVisManager;
110 G4Timer fTimer;
111 G4int fSize;
112 G4double fX, fY;
113 G4Text::Layout fLayout;
114 G4String fDate;
115 };
116 G4UIcommand* fpCommand;
117};
118
120public:
124 void SetNewValue (G4UIcommand* command, G4String newValue);
125private:
128 G4UIcmdWithoutParameter* fpCommand;
129};
130
132public:
136 void SetNewValue (G4UIcommand* command, G4String newValue);
137private:
140 enum ForWhat {forEndOfEvent, forEndOfRun};
141 struct EventID {
142 EventID(ForWhat w, G4VisManager* vm, G4int size,
143 G4double x, G4double y, G4Text::Layout layout):
144 fForWhat(w), fpVisManager(vm), fSize(size),
145 fX(x), fY(y), fLayout(layout) {}
146 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
147 ForWhat fForWhat;
148 G4VisManager* fpVisManager;
149 G4int fSize;
150 G4double fX, fY;
151 G4Text::Layout fLayout;
152 };
153 G4UIcommand* fpCommand;
154};
155
157public:
161 void SetNewValue (G4UIcommand* command, G4String newValue);
162private:
165 struct Extent {
166 Extent(G4double xmin, G4double xmax,
167 G4double ymin, G4double ymax,
168 G4double zmin, G4double zmax);
169 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
170 G4VisExtent fExtent;
171 };
172 G4UIcommand* fpCommand;
173};
174
176public:
180 void SetNewValue (G4UIcommand* command, G4String newValue);
181private:
184 G4UIcommand* fpCommand;
185};
186
188public:
192 void SetNewValue (G4UIcommand* command, G4String newValue);
193private:
196 struct Frame {
197 Frame(G4double size, G4double width, const G4Colour& colour):
198 fSize(size), fWidth(width), fColour(colour) {}
199 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
200 G4double fSize;
201 G4double fWidth;
202 G4Colour fColour;
203 };
204 G4UIcommand* fpCommand;
205};
206
208public:
210 virtual ~G4VisCommandSceneAddGPS ();
212 void SetNewValue (G4UIcommand* command, G4String newValue);
213private:
216 G4UIcommand* fpCommand;
217};
218
220public:
224 void SetNewValue (G4UIcommand* command, G4String newValue);
225private:
229 G4UIcmdWithAString* fpCommand;
230};
231
233public:
235 virtual ~G4VisCommandSceneAddHits ();
237 void SetNewValue (G4UIcommand* command, G4String newValue);
238private:
241 G4UIcmdWithoutParameter* fpCommand;
242};
243
245public:
247 virtual ~G4VisCommandSceneAddLine ();
249 void SetNewValue (G4UIcommand* command, G4String newValue);
250private:
253 struct Line {
254 Line(G4double x1, G4double y1, G4double z1,
255 G4double x2, G4double y2, G4double z2,
256 G4double width, const G4Colour& colour);
257 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
258 G4Polyline fPolyline;
259 G4double fWidth;
260 G4Colour fColour;
261 };
262 G4UIcommand* fpCommand;
263};
264
266public:
270 void SetNewValue (G4UIcommand* command, G4String newValue);
271private:
274 struct Line2D {
275 Line2D(G4double x1, G4double y1,
276 G4double x2, G4double y2,
277 G4double width, const G4Colour& colour);
278 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
279 G4Polyline fPolyline;
280 G4double fWidth;
281 G4Colour fColour;
282 };
283 G4UIcommand* fpCommand;
284};
285
287public:
291 void SetNewValue (G4UIcommand* command, G4String newValue);
292private:
295 G4UIcommand* fpCommand;
296};
297
299public:
303 void SetNewValue (G4UIcommand* command, G4String newValue);
304private:
308 G4UIcommand* fpCommand;
309};
310
312public:
314 virtual ~G4VisCommandSceneAddLogo ();
316 void SetNewValue (G4UIcommand* command, G4String newValue);
317private:
320 // Direction of outward-facing normal to front face of logo.
321 enum Direction {X, minusX, Y, minusY, Z, minusZ};
322 struct G4Logo {
323 G4Logo(G4double height, const G4VisAttributes&, const G4Transform3D&);
324 ~G4Logo();
325 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
326 private:
327 G4Polyhedron *fpG, *fp4;
328 };
329 G4UIcommand* fpCommand;
330};
331
333public:
337 void SetNewValue (G4UIcommand* command, G4String newValue);
338private:
341 struct Logo2D {
342 Logo2D
343 (G4VisManager* vm, G4int size,
344 G4double x, G4double y, G4Text::Layout layout):
345 fpVisManager(vm), fSize(size),
346 fX(x), fY(y), fLayout(layout) {}
347 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
348 G4VisManager* fpVisManager;
349 G4int fSize;
350 G4double fX, fY;
351 G4Text::Layout fLayout;
352 };
353 G4UIcommand* fpCommand;
354};
355
357public:
361 void SetNewValue (G4UIcommand* command, G4String newValue);
362private:
365 G4UIcommand* fpCommand;
366};
367
369public:
373 void SetNewValue (G4UIcommand* command, G4String newValue);
374private:
377 G4UIcmdWithAString* fpCommand;
378};
379
381public:
385 void SetNewValue (G4UIcommand* command, G4String newValue);
386private:
389 struct Scale {
390 enum Direction {x, y, z};
391 Scale (const G4VisAttributes& visAttribs,
392 G4double length, const G4Transform3D&,
393 const G4String& annotation, G4double annotationSize,
394 const G4Colour& annotationColour
395 );
396 // This creates a representation of annotated line in the specified
397 // direction with tick marks at the end. If autoPlacing is true it
398 // is required to be centred at the front, right, bottom corner of
399 // the world space, comfortably outside the existing bounding
400 // box/sphere so that existing objects do not obscure it. Otherwise
401 // it is required to be drawn with mid-point at (xmid, ymid, zmid).
402 // Annotation size is size of text labels in pixels.
403 //
404 // The auto placing algorithm might be:
405 // x = xmin + (1 + comfort) * (xmax - xmin)
406 // y = ymin - comfort * (ymax - ymin)
407 // z = zmin + (1 + comfort) * (zmax - zmin)
408 // if direction == x then (x - length,y,z) to (x,y,z)
409 // if direction == y then (x,y,z) to (x,y + length,z)
410 // if direction == z then (x,y,z - length) to (x,y,z)
411 ~Scale();
412 void operator()(G4VGraphicsScene&,const G4ModelingParameters*);
413 private:
414 G4VisAttributes fVisAtts;
415 G4Polyline fScaleLine, fTick11, fTick12, fTick21, fTick22;
416 G4Text fText;
417 };
418 G4UIcommand* fpCommand;
419};
420
422public:
424 virtual ~G4VisCommandSceneAddText ();
426 void SetNewValue (G4UIcommand* command, G4String newValue);
427private:
430 G4UIcommand* fpCommand;
431};
432
434public:
438 void SetNewValue (G4UIcommand* command, G4String newValue);
439private:
442 struct G4Text2D {
443 G4Text2D(const G4Text&);
444 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
445 private:
446 G4Text fText;
447 };
448 G4UIcommand* fpCommand;
449};
450
452public:
456 void SetNewValue (G4UIcommand* command, G4String newValue);
457private:
461 G4UIcmdWithAString* fpCommand;
462};
463
465public:
469 void SetNewValue (G4UIcommand* command, G4String newValue);
470private:
473 enum ActionType {runDuration, endOfEvent, endOfRun};
474 void AddVisAction(const G4String& name,G4VUserVisAction*,
475 G4Scene*,ActionType,G4VisManager::Verbosity);
476 G4UIcmdWithAString* fpCommand;
477};
478
480public:
484 void SetNewValue (G4UIcommand* command, G4String newValue);
485private:
488 G4UIcommand* fpCommand;
489};
490
492public:
496 void SetNewValue (G4UIcommand* command, G4String newValue);
497private:
500 G4UIcommand* fpCommand;
501};
502
503#endif
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
Definition: G4Text.hh:72
Layout
Definition: G4Text.hh:76
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSceneAddGhosts()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)