Geant4-11
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:
56};
57
59public:
63 void SetNewValue (G4UIcommand* command, G4String newValue);
64private:
67 struct Arrow2D {
69 G4double x2, G4double y2,
70 G4double width, const G4Colour& colour);
76 };
78};
79
81public:
85 void SetNewValue (G4UIcommand* command, G4String newValue);
86private:
90};
91
93public:
97 void SetNewValue (G4UIcommand* command, G4String newValue);
98private:
101 struct 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) {}
115 };
117};
118
120public:
124 void SetNewValue (G4UIcommand* command, G4String newValue);
125private:
129};
130
132public:
136 void SetNewValue (G4UIcommand* command, G4String newValue);
137private:
141 struct EventID {
143 G4double x, G4double y, G4Text::Layout layout):
144 fForWhat(w), fpVisManager(vm), fSize(size),
145 fX(x), fY(y), fLayout(layout) {}
152 };
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);
171 };
173};
174
176public:
180 void SetNewValue (G4UIcommand* command, G4String newValue);
181private:
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) {}
203 };
205};
206
208public:
210 virtual ~G4VisCommandSceneAddGPS ();
212 void SetNewValue (G4UIcommand* command, G4String newValue);
213private:
217};
218
220public:
224 void SetNewValue (G4UIcommand* command, G4String newValue);
225private:
230};
231
233public:
235 virtual ~G4VisCommandSceneAddHits ();
237 void SetNewValue (G4UIcommand* command, G4String newValue);
238private:
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);
261 };
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);
282 };
284};
285
287public:
291 void SetNewValue (G4UIcommand* command, G4String newValue);
292private:
296};
297
299public:
303 void SetNewValue (G4UIcommand* command, G4String newValue);
304private:
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.
322 struct G4Logo {
323 G4Logo(G4double height, const G4VisAttributes&, const G4Transform3D&);
324 ~G4Logo();
326 private:
328 };
330};
331
333public:
337 void SetNewValue (G4UIcommand* command, G4String newValue);
338private:
341 struct 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) {}
352 };
354};
355
357public:
361 void SetNewValue (G4UIcommand* command, G4String newValue);
362private:
366};
367
369public:
373 void SetNewValue (G4UIcommand* command, G4String newValue);
374private:
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)
413 private:
417 };
419};
420
422public:
424 virtual ~G4VisCommandSceneAddText ();
426 void SetNewValue (G4UIcommand* command, G4String newValue);
427private:
431};
432
434public:
438 void SetNewValue (G4UIcommand* command, G4String newValue);
439private:
442 struct G4Text2D {
443 G4Text2D(const G4Text&);
445 private:
447 };
449};
450
452public:
456 void SetNewValue (G4UIcommand* command, G4String newValue);
457private:
462};
463
465public:
469 void SetNewValue (G4UIcommand* command, G4String newValue);
470private:
477};
478
480public:
484 void SetNewValue (G4UIcommand* command, G4String newValue);
485private:
489};
490
492public:
496 void SetNewValue (G4UIcommand* command, G4String newValue);
497private:
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)
G4VisCommandSceneAddArrow2D(const G4VisCommandSceneAddArrow2D &)
G4VisCommandSceneAddArrow2D & operator=(const G4VisCommandSceneAddArrow2D &)
G4VisCommandSceneAddArrow & operator=(const G4VisCommandSceneAddArrow &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddArrow(const G4VisCommandSceneAddArrow &)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddAxes & operator=(const G4VisCommandSceneAddAxes &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddAxes(const G4VisCommandSceneAddAxes &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddDate(const G4VisCommandSceneAddDate &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddDate & operator=(const G4VisCommandSceneAddDate &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddDigis & operator=(const G4VisCommandSceneAddDigis &)
G4VisCommandSceneAddDigis(const G4VisCommandSceneAddDigis &)
G4String GetCurrentValue(G4UIcommand *command)
G4UIcmdWithoutParameter * fpCommand
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddElectricField & operator=(const G4VisCommandSceneAddElectricField &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddElectricField(const G4VisCommandSceneAddElectricField &)
G4VisCommandSceneAddEventID & operator=(const G4VisCommandSceneAddEventID &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddEventID(const G4VisCommandSceneAddEventID &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddExtent(const G4VisCommandSceneAddExtent &)
G4VisCommandSceneAddExtent & operator=(const G4VisCommandSceneAddExtent &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddFrame & operator=(const G4VisCommandSceneAddFrame &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddFrame(const G4VisCommandSceneAddFrame &)
G4VisCommandSceneAddGPS(const G4VisCommandSceneAddGPS &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddGPS & operator=(const G4VisCommandSceneAddGPS &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddGhosts(const G4VisCommandSceneAddGhosts &)
virtual ~G4VisCommandSceneAddGhosts()
G4VisCommandSceneAddHits & operator=(const G4VisCommandSceneAddHits &)
G4UIcmdWithoutParameter * fpCommand
G4VisCommandSceneAddHits(const G4VisCommandSceneAddHits &)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddLine2D(const G4VisCommandSceneAddLine2D &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddLine2D & operator=(const G4VisCommandSceneAddLine2D &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddLine(const G4VisCommandSceneAddLine &)
G4VisCommandSceneAddLine & operator=(const G4VisCommandSceneAddLine &)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddLocalAxes(const G4VisCommandSceneAddLocalAxes &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddLocalAxes & operator=(const G4VisCommandSceneAddLocalAxes &)
G4VisCommandSceneAddLogicalVolume(const G4VisCommandSceneAddLogicalVolume &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddLogo2D & operator=(const G4VisCommandSceneAddLogo2D &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddLogo2D(const G4VisCommandSceneAddLogo2D &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddLogo(const G4VisCommandSceneAddLogo &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddLogo & operator=(const G4VisCommandSceneAddLogo &)
G4VisCommandSceneAddMagneticField & operator=(const G4VisCommandSceneAddMagneticField &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddMagneticField(const G4VisCommandSceneAddMagneticField &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddPSHits & operator=(const G4VisCommandSceneAddPSHits &)
G4VisCommandSceneAddPSHits(const G4VisCommandSceneAddPSHits &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddPlotter(const G4VisCommandSceneAddPlotter &)
G4VisCommandSceneAddPlotter & operator=(const G4VisCommandSceneAddPlotter &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddScale(const G4VisCommandSceneAddScale &)
G4VisCommandSceneAddScale & operator=(const G4VisCommandSceneAddScale &)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddText2D(const G4VisCommandSceneAddText2D &)
G4VisCommandSceneAddText2D & operator=(const G4VisCommandSceneAddText2D &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddText & operator=(const G4VisCommandSceneAddText &)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddText(const G4VisCommandSceneAddText &)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddTrajectories(const G4VisCommandSceneAddTrajectories &)
G4VisCommandSceneAddUserAction(const G4VisCommandSceneAddUserAction &)
void AddVisAction(const G4String &name, G4VUserVisAction *, G4Scene *, ActionType, G4VisManager::Verbosity)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSceneAddUserAction & operator=(const G4VisCommandSceneAddUserAction &)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSceneAddVolume & operator=(const G4VisCommandSceneAddVolume &)
G4VisCommandSceneAddVolume(const G4VisCommandSceneAddVolume &)
void SetNewValue(G4UIcommand *command, G4String newValue)
const char * name(G4int ptype)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *fpMp)
Arrow2D(G4double x1, G4double y1, G4double x2, G4double y2, G4double width, const G4Colour &colour)
Date(G4VisManager *vm, G4int size, G4double x, G4double y, G4Text::Layout layout, const G4String &date)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
EventID(ForWhat w, G4VisManager *vm, G4int size, G4double x, G4double y, G4Text::Layout layout)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
Extent(G4double xmin, G4double xmax, G4double ymin, G4double ymax, G4double zmin, G4double zmax)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
Frame(G4double size, G4double width, const G4Colour &colour)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
Line2D(G4double x1, G4double y1, G4double x2, G4double y2, G4double width, const G4Colour &colour)
Line(G4double x1, G4double y1, G4double z1, G4double x2, G4double y2, G4double z2, G4double width, const G4Colour &colour)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
Logo2D(G4VisManager *vm, G4int size, G4double x, G4double y, G4Text::Layout layout)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
G4Logo(G4double height, const G4VisAttributes &, const G4Transform3D &)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)
Scale(const G4VisAttributes &visAttribs, G4double length, const G4Transform3D &, const G4String &annotation, G4double annotationSize, const G4Colour &annotationColour)
void operator()(G4VGraphicsScene &, const G4ModelingParameters *)