Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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$
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;
38 
39 #include "G4Transform3D.hh"
40 #include "G4VisAttributes.hh"
41 #include "G4Polyline.hh"
42 #include "G4Text.hh"
43 #include "G4Timer.hh"
44 
46 public:
48  virtual ~G4VisCommandSceneAddArrow ();
50  void SetNewValue (G4UIcommand* command, G4String newValue);
51 private:
54  G4UIcommand* fpCommand;
55 };
56 
58 public:
62  void SetNewValue (G4UIcommand* command, G4String newValue);
63 private:
66  struct Arrow2D {
67  Arrow2D(G4double x1, G4double y1,
69  G4double width, const G4Colour& colour);
70  void operator()(G4VGraphicsScene&, const G4Transform3D&);
71  G4Polyline fShaftPolyline;
72  G4Polyline fHeadPolyline;
73  G4double fWidth;
74  G4Colour fColour;
75  };
76  G4UIcommand* fpCommand;
77 };
78 
80 public:
82  virtual ~G4VisCommandSceneAddAxes ();
84  void SetNewValue (G4UIcommand* command, G4String newValue);
85 private:
88  G4UIcommand* fpCommand;
89 };
90 
92 public:
94  virtual ~G4VisCommandSceneAddDate ();
96  void SetNewValue (G4UIcommand* command, G4String newValue);
97 private:
100  struct Date {
101  Date
102  (G4VisManager* vm, G4int size,
104  const G4String& date):
105  fpVisManager(vm), fSize(size),
106  fX(x), fY(y), fLayout(layout), fDate(date) {}
107  void operator()(G4VGraphicsScene&, const G4Transform3D&);
109  G4Timer fTimer;
110  G4int fSize;
111  G4double fX, fY;
112  G4Text::Layout fLayout;
113  G4String fDate;
114  };
115  G4UIcommand* fpCommand;
116 };
117 
119 public:
121  virtual ~G4VisCommandSceneAddDigis ();
123  void SetNewValue (G4UIcommand* command, G4String newValue);
124 private:
127  G4UIcmdWithoutParameter* fpCommand;
128 };
129 
131 public:
133  virtual ~G4VisCommandSceneAddEventID ();
135  void SetNewValue (G4UIcommand* command, G4String newValue);
136 private:
139  struct EventID {
140  EventID(G4VisManager* vm, G4int size,
141  G4double x, G4double y, G4Text::Layout layout):
142  fpVisManager(vm), fSize(size),
143  fX(x), fY(y), fLayout(layout) {}
144  void operator()(G4VGraphicsScene&, const G4Transform3D&);
146  G4int fSize;
147  G4double fX, fY;
148  G4Text::Layout fLayout;
149  };
150  G4UIcommand* fpCommand;
151 };
152 
154 public:
156  virtual ~G4VisCommandSceneAddFrame ();
158  void SetNewValue (G4UIcommand* command, G4String newValue);
159 private:
162  struct Frame {
163  Frame(G4double size, G4double width, const G4Colour& colour):
164  fSize(size), fWidth(width), fColour(colour) {}
165  void operator()(G4VGraphicsScene&, const G4Transform3D&);
166  G4double fSize;
167  G4double fWidth;
168  G4Colour fColour;
169  };
170  G4UIcommand* fpCommand;
171 };
172 
174 public:
176  virtual ~G4VisCommandSceneAddGhosts ();
178  void SetNewValue (G4UIcommand* command, G4String newValue);
179 private:
181  G4VisCommandSceneAddGhosts& operator =
183  G4UIcmdWithAString* fpCommand;
184 };
185 
187 public:
189  virtual ~G4VisCommandSceneAddHits ();
191  void SetNewValue (G4UIcommand* command, G4String newValue);
192 private:
195  G4UIcmdWithoutParameter* fpCommand;
196 };
197 
199 public:
201  virtual ~G4VisCommandSceneAddLine ();
203  void SetNewValue (G4UIcommand* command, G4String newValue);
204 private:
207  struct Line {
208  Line(G4double x1, G4double y1, G4double z1,
210  G4double width, const G4Colour& colour);
211  void operator()(G4VGraphicsScene&, const G4Transform3D&);
212  G4Polyline fPolyline;
213  G4double fWidth;
214  G4Colour fColour;
215  };
216  G4UIcommand* fpCommand;
217 };
218 
220 public:
222  virtual ~G4VisCommandSceneAddLine2D ();
224  void SetNewValue (G4UIcommand* command, G4String newValue);
225 private:
228  struct Line2D {
229  Line2D(G4double x1, G4double y1,
231  G4double width, const G4Colour& colour);
232  void operator()(G4VGraphicsScene&, const G4Transform3D&);
233  G4Polyline fPolyline;
234  G4double fWidth;
235  G4Colour fColour;
236  };
237  G4UIcommand* fpCommand;
238 };
239 
241 public:
245  void SetNewValue (G4UIcommand* command, G4String newValue);
246 private:
250  G4UIcommand* fpCommand;
251 };
252 
254 public:
256  virtual ~G4VisCommandSceneAddLogo ();
258  void SetNewValue (G4UIcommand* command, G4String newValue);
259 private:
262  // Direction of outward-facing normal to front face of logo.
263  enum Direction {X, minusX, Y, minusY, Z, minusZ};
264  struct G4Logo {
265  G4Logo(G4double height, const G4VisAttributes&);
266  ~G4Logo();
267  void operator()(G4VGraphicsScene&, const G4Transform3D&);
268  private:
269  G4double fHeight;
270  G4VisAttributes fVisAtts;
271  G4Polyhedron *fpG, *fp4;
272  };
273  G4UIcommand* fpCommand;
274 };
275 
277 public:
279  virtual ~G4VisCommandSceneAddLogo2D ();
281  void SetNewValue (G4UIcommand* command, G4String newValue);
282 private:
285  struct Logo2D {
286  Logo2D
287  (G4VisManager* vm, G4int size,
288  G4double x, G4double y, G4Text::Layout layout):
289  fpVisManager(vm), fSize(size),
290  fX(x), fY(y), fLayout(layout) {}
291  void operator()(G4VGraphicsScene&, const G4Transform3D&);
293  G4int fSize;
294  G4double fX, fY;
295  G4Text::Layout fLayout;
296  };
297  G4UIcommand* fpCommand;
298 };
299 
301 public:
303  virtual ~G4VisCommandSceneAddPSHits ();
305  void SetNewValue (G4UIcommand* command, G4String newValue);
306 private:
309  G4UIcmdWithAString* fpCommand;
310 };
311 
313 public:
315  virtual ~G4VisCommandSceneAddScale ();
317  void SetNewValue (G4UIcommand* command, G4String newValue);
318 private:
321  G4UIcommand* fpCommand;
322 };
323 
325 public:
327  virtual ~G4VisCommandSceneAddText ();
329  void SetNewValue (G4UIcommand* command, G4String newValue);
330 private:
333  G4UIcommand* fpCommand;
334 };
335 
337 public:
339  virtual ~G4VisCommandSceneAddText2D ();
341  void SetNewValue (G4UIcommand* command, G4String newValue);
342 private:
345  struct G4Text2D {
346  G4Text2D(const G4Text&);
347  void operator()(G4VGraphicsScene&, const G4Transform3D&);
348  private:
349  G4Text fText;
350  };
351  G4UIcommand* fpCommand;
352 };
353 
355 public:
359  void SetNewValue (G4UIcommand* command, G4String newValue);
360 private:
364  G4UIcmdWithAString* fpCommand;
365 };
366 
368 public:
372  void SetNewValue (G4UIcommand* command, G4String newValue);
373 private:
376  enum ActionType {runDuration, endOfEvent, endOfRun};
377  void AddVisAction(const G4String& name,G4VUserVisAction*,
378  G4Scene*,ActionType,G4VisManager::Verbosity);
379  G4UIcmdWithAString* fpCommand;
380 };
381 
383 public:
385  virtual ~G4VisCommandSceneAddVolume ();
387  void SetNewValue (G4UIcommand* command, G4String newValue);
388 private:
391  G4UIcommand* fpCommand;
392 };
393 
394 #endif