Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 // $Id: G4VisCommandsSceneAdd.hh 93069 2015-10-02 09:54:27Z gcosmo $
28 
29 // /vis/scene commands - John Allison 9th August 1998
30 
31 #ifndef G4VISCOMMANDSSCENEADD_HH
32 #define G4VISCOMMANDSSCENEADD_HH
33 
34 #include "G4VisCommandsScene.hh"
35 
37 class G4UIcmdWithAString;
39 
40 #include "G4Transform3D.hh"
41 #include "G4VisAttributes.hh"
42 #include "G4Polyline.hh"
43 #include "G4Text.hh"
44 #include "G4Timer.hh"
45 
47 public:
49  virtual ~G4VisCommandSceneAddArrow ();
51  void SetNewValue (G4UIcommand* command, G4String newValue);
52 private:
55  G4UIcommand* fpCommand;
56 };
57 
59 public:
63  void SetNewValue (G4UIcommand* command, G4String newValue);
64 private:
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 G4Transform3D&);
72  G4Polyline fShaftPolyline;
73  G4Polyline fHeadPolyline;
74  G4double fWidth;
75  G4Colour fColour;
76  };
77  G4UIcommand* fpCommand;
78 };
79 
81 public:
83  virtual ~G4VisCommandSceneAddAxes ();
85  void SetNewValue (G4UIcommand* command, G4String newValue);
86 private:
89  G4UIcommand* fpCommand;
90 };
91 
93 public:
95  virtual ~G4VisCommandSceneAddDate ();
97  void SetNewValue (G4UIcommand* command, G4String newValue);
98 private:
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 G4Transform3D&);
110  G4Timer fTimer;
111  G4int fSize;
112  G4double fX, fY;
113  G4Text::Layout fLayout;
114  G4String fDate;
115  };
116  G4UIcommand* fpCommand;
117 };
118 
120 public:
122  virtual ~G4VisCommandSceneAddDigis ();
124  void SetNewValue (G4UIcommand* command, G4String newValue);
125 private:
128  G4UIcmdWithoutParameter* fpCommand;
129 };
130 
132 public:
134  virtual ~G4VisCommandSceneAddEventID ();
136  void SetNewValue (G4UIcommand* command, G4String newValue);
137 private:
140  struct EventID {
141  EventID(G4VisManager* vm, G4int size,
142  G4double x, G4double y, G4Text::Layout layout):
143  fpVisManager(vm), fSize(size),
144  fX(x), fY(y), fLayout(layout) {}
145  void operator()(G4VGraphicsScene&, const G4Transform3D&);
147  G4int fSize;
148  G4double fX, fY;
149  G4Text::Layout fLayout;
150  };
151  G4UIcommand* fpCommand;
152 };
153 
155 public:
157  virtual ~G4VisCommandSceneAddExtent ();
159  void SetNewValue (G4UIcommand* command, G4String newValue);
160 private:
163  struct Extent {
164  Extent(G4double xmin, G4double xmax,
165  G4double ymin, G4double ymax,
166  G4double zmin, G4double zmax);
167  void operator()(G4VGraphicsScene&, const G4Transform3D&);
168  G4VisExtent fExtent;
169  };
170  G4UIcommand* fpCommand;
171 };
172 
174 public:
176  virtual ~G4VisCommandSceneAddFrame ();
178  void SetNewValue (G4UIcommand* command, G4String newValue);
179 private:
182  struct Frame {
183  Frame(G4double size, G4double width, const G4Colour& colour):
184  fSize(size), fWidth(width), fColour(colour) {}
185  void operator()(G4VGraphicsScene&, const G4Transform3D&);
186  G4double fSize;
187  G4double fWidth;
188  G4Colour fColour;
189  };
190  G4UIcommand* fpCommand;
191 };
192 
194 public:
196  virtual ~G4VisCommandSceneAddGhosts ();
198  void SetNewValue (G4UIcommand* command, G4String newValue);
199 private:
201  G4VisCommandSceneAddGhosts& operator =
203  G4UIcmdWithAString* fpCommand;
204 };
205 
207 public:
209  virtual ~G4VisCommandSceneAddHits ();
211  void SetNewValue (G4UIcommand* command, G4String newValue);
212 private:
215  G4UIcmdWithoutParameter* fpCommand;
216 };
217 
219 public:
221  virtual ~G4VisCommandSceneAddLine ();
223  void SetNewValue (G4UIcommand* command, G4String newValue);
224 private:
227  struct Line {
228  Line(G4double x1, G4double y1, G4double z1,
229  G4double x2, G4double y2, G4double z2,
230  G4double width, const G4Colour& colour);
231  void operator()(G4VGraphicsScene&, const G4Transform3D&);
232  G4Polyline fPolyline;
233  G4double fWidth;
234  G4Colour fColour;
235  };
236  G4UIcommand* fpCommand;
237 };
238 
240 public:
242  virtual ~G4VisCommandSceneAddLine2D ();
244  void SetNewValue (G4UIcommand* command, G4String newValue);
245 private:
248  struct Line2D {
249  Line2D(G4double x1, G4double y1,
250  G4double x2, G4double y2,
251  G4double width, const G4Colour& colour);
252  void operator()(G4VGraphicsScene&, const G4Transform3D&);
253  G4Polyline fPolyline;
254  G4double fWidth;
255  G4Colour fColour;
256  };
257  G4UIcommand* fpCommand;
258 };
259 
261 public:
265  void SetNewValue (G4UIcommand* command, G4String newValue);
266 private:
270  G4UIcommand* fpCommand;
271 };
272 
274 public:
276  virtual ~G4VisCommandSceneAddLogo ();
278  void SetNewValue (G4UIcommand* command, G4String newValue);
279 private:
282  // Direction of outward-facing normal to front face of logo.
283  enum Direction {X, minusX, Y, minusY, Z, minusZ};
284  struct G4Logo {
285  G4Logo(G4double height, const G4VisAttributes&);
286  ~G4Logo();
287  void operator()(G4VGraphicsScene&, const G4Transform3D&);
288  private:
289  G4VisAttributes fVisAtts;
290  G4Polyhedron *fpG, *fp4;
291  };
292  G4UIcommand* fpCommand;
293 };
294 
296 public:
298  virtual ~G4VisCommandSceneAddLogo2D ();
300  void SetNewValue (G4UIcommand* command, G4String newValue);
301 private:
304  struct Logo2D {
305  Logo2D
306  (G4VisManager* vm, G4int size,
307  G4double x, G4double y, G4Text::Layout layout):
308  fpVisManager(vm), fSize(size),
309  fX(x), fY(y), fLayout(layout) {}
310  void operator()(G4VGraphicsScene&, const G4Transform3D&);
312  G4int fSize;
313  G4double fX, fY;
314  G4Text::Layout fLayout;
315  };
316  G4UIcommand* fpCommand;
317 };
318 
320 public:
324  void SetNewValue (G4UIcommand* command, G4String newValue);
325 private:
328  G4UIcommand* fpCommand;
329 };
330 
332 public:
334  virtual ~G4VisCommandSceneAddPSHits ();
336  void SetNewValue (G4UIcommand* command, G4String newValue);
337 private:
340  G4UIcmdWithAString* fpCommand;
341 };
342 
344 public:
346  virtual ~G4VisCommandSceneAddScale ();
348  void SetNewValue (G4UIcommand* command, G4String newValue);
349 private:
352  G4UIcommand* fpCommand;
353 };
354 
356 public:
358  virtual ~G4VisCommandSceneAddText ();
360  void SetNewValue (G4UIcommand* command, G4String newValue);
361 private:
364  G4UIcommand* fpCommand;
365 };
366 
368 public:
370  virtual ~G4VisCommandSceneAddText2D ();
372  void SetNewValue (G4UIcommand* command, G4String newValue);
373 private:
376  struct G4Text2D {
377  G4Text2D(const G4Text&);
378  void operator()(G4VGraphicsScene&, const G4Transform3D&);
379  private:
380  G4Text fText;
381  };
382  G4UIcommand* fpCommand;
383 };
384 
386 public:
390  void SetNewValue (G4UIcommand* command, G4String newValue);
391 private:
395  G4UIcmdWithAString* fpCommand;
396 };
397 
399 public:
403  void SetNewValue (G4UIcommand* command, G4String newValue);
404 private:
407  enum ActionType {runDuration, endOfEvent, endOfRun};
408  void AddVisAction(const G4String& name,G4VUserVisAction*,
409  G4Scene*,ActionType,G4VisManager::Verbosity);
410  G4UIcmdWithAString* fpCommand;
411 };
412 
414 public:
416  virtual ~G4VisCommandSceneAddVolume ();
418  void SetNewValue (G4UIcommand* command, G4String newValue);
419 private:
422  G4UIcommand* fpCommand;
423 };
424 
425 #endif
void SetNewValue(G4UIcommand *command, G4String newValue)
const XML_Char * name
Definition: expat.h:151
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
Definition: G4Text.hh:73
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)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
int G4int
Definition: G4Types.hh:78
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandSceneAddGhosts()
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
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)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
Layout
Definition: G4Text.hh:77
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
double G4double
Definition: G4Types.hh:76
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
static G4VisManager * fpVisManager