source: trunk/source/visualization/management/include/G4VisCommandsGeometrySet.hh @ 1315

Last change on this file since 1315 was 1315, checked in by garnier, 14 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

  • Property svn:mime-type set to text/cpp
File size: 10.7 KB
Line 
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: G4VisCommandsGeometrySet.hh,v 1.4 2010/06/15 16:33:55 allison Exp $
28// GEANT4 tag $Name: vis-V09-03-08 $
29
30// /vis/geometry commands - John Allison  31st January 2006
31
32#ifndef G4VISCOMMANDSGEOMETRYSET_HH
33#define G4VISCOMMANDSGEOMETRYSET_HH
34
35#include "G4VisCommandsGeometry.hh"
36
37class G4UIcommand;
38class G4VisAttributes;
39
40class G4VVisCommandGeometrySetFunction {
41public:
42  virtual ~G4VVisCommandGeometrySetFunction() {}
43  virtual void operator()(G4VisAttributes*) const = 0;
44};
45
46class G4VisCommandGeometrySetColourFunction:
47  public G4VVisCommandGeometrySetFunction {
48public:
49  virtual ~G4VisCommandGeometrySetColourFunction() {}
50  G4VisCommandGeometrySetColourFunction
51  (const G4Colour& colour):
52    fColour(colour) {}
53  void operator()
54    (G4VisAttributes* visAtts) const
55  {visAtts->SetColour(fColour);}
56private:
57  const G4Colour& fColour;
58};
59
60class G4VisCommandGeometrySetDaughtersInvisibleFunction:
61  public G4VVisCommandGeometrySetFunction {
62public:
63  virtual ~G4VisCommandGeometrySetDaughtersInvisibleFunction() {}
64  G4VisCommandGeometrySetDaughtersInvisibleFunction
65  (G4bool daughtersInvisible):
66    fDaughtersInvisible(daughtersInvisible) {}
67  void operator()
68    (G4VisAttributes* visAtts) const
69  {visAtts->SetDaughtersInvisible(fDaughtersInvisible);}
70private:
71  G4bool fDaughtersInvisible;
72};
73
74class G4VisCommandGeometrySetForceAuxEdgeVisibleFunction:
75  public G4VVisCommandGeometrySetFunction {
76public:
77  virtual ~G4VisCommandGeometrySetForceAuxEdgeVisibleFunction() {}
78  G4VisCommandGeometrySetForceAuxEdgeVisibleFunction
79  (G4bool forceAuxEdgeVisible):
80    fForceAuxEdgeVisible(forceAuxEdgeVisible) {}
81  void operator()
82    (G4VisAttributes* visAtts) const
83  {visAtts->SetForceAuxEdgeVisible(fForceAuxEdgeVisible);}
84private:
85  G4bool fForceAuxEdgeVisible;
86};
87
88class G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction:
89  public G4VVisCommandGeometrySetFunction {
90public:
91  virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction() {}
92  G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction
93  (G4int lineSegmentsPerCircle):
94    fLineSegmentsPerCircle(lineSegmentsPerCircle) {}
95  void operator()
96    (G4VisAttributes* visAtts) const
97  {visAtts->SetForceLineSegmentsPerCircle(fLineSegmentsPerCircle);}
98private:
99  G4int fLineSegmentsPerCircle;
100};
101
102class G4VisCommandGeometrySetForceSolidFunction:
103  public G4VVisCommandGeometrySetFunction {
104public:
105  virtual ~G4VisCommandGeometrySetForceSolidFunction() {}
106  G4VisCommandGeometrySetForceSolidFunction
107  (G4bool forceSolid):
108    fForceSolid(forceSolid) {}
109  void operator()
110    (G4VisAttributes* visAtts) const
111  {visAtts->SetForceSolid(fForceSolid);}
112private:
113  G4bool fForceSolid;
114};
115
116class G4VisCommandGeometrySetForceWireframeFunction:
117  public G4VVisCommandGeometrySetFunction {
118public:
119  virtual ~G4VisCommandGeometrySetForceWireframeFunction() {}
120  G4VisCommandGeometrySetForceWireframeFunction
121  (G4bool forceWireframe):
122    fForceWireframe(forceWireframe) {}
123  void operator()
124    (G4VisAttributes* visAtts) const
125  {visAtts->SetForceWireframe(fForceWireframe);}
126private:
127  G4bool fForceWireframe;
128};
129
130class G4VisCommandGeometrySetLineStyleFunction:
131  public G4VVisCommandGeometrySetFunction {
132public:
133  virtual ~G4VisCommandGeometrySetLineStyleFunction() {}
134  G4VisCommandGeometrySetLineStyleFunction
135  (G4VisAttributes::LineStyle lineStyle):
136    fLineStyle(lineStyle) {}
137  void operator()
138    (G4VisAttributes* visAtts) const
139  {visAtts->SetLineStyle(fLineStyle);}
140private:
141  G4VisAttributes::LineStyle fLineStyle;
142};
143
144class G4VisCommandGeometrySetLineWidthFunction:
145  public G4VVisCommandGeometrySetFunction {
146public:
147  virtual ~G4VisCommandGeometrySetLineWidthFunction() {}
148  G4VisCommandGeometrySetLineWidthFunction
149  (G4double lineWidth):
150    fLineWidth(lineWidth) {}
151  void operator()
152    (G4VisAttributes* visAtts) const
153  {visAtts->SetLineWidth(fLineWidth);}
154private:
155  G4double fLineWidth;
156};
157
158class G4VisCommandGeometrySetVisibilityFunction:
159  public G4VVisCommandGeometrySetFunction {
160public:
161  virtual ~G4VisCommandGeometrySetVisibilityFunction() {}
162  G4VisCommandGeometrySetVisibilityFunction
163  (G4bool visibility):
164    fVisibility(visibility) {}
165  void operator()
166    (G4VisAttributes* visAtts) const
167  {visAtts->SetVisibility(fVisibility);}
168private:
169  G4bool fVisibility;
170};
171
172class G4VVisCommandGeometrySet: public G4VVisCommandGeometry {
173protected:
174  void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction&,
175           G4int requestedDepth);
176  void SetLVVisAtts(G4LogicalVolume*, const G4VVisCommandGeometrySetFunction&,
177                    G4int depth, G4int requestedDepth);
178};
179
180class G4VisCommandGeometrySetColour: public G4VVisCommandGeometrySet {
181public:
182  G4VisCommandGeometrySetColour ();
183  virtual ~G4VisCommandGeometrySetColour ();
184  G4String GetCurrentValue (G4UIcommand* command);
185  void SetNewValue (G4UIcommand* command, G4String newValue);
186private:
187  G4VisCommandGeometrySetColour (const G4VisCommandGeometrySetColour&);
188  G4VisCommandGeometrySetColour& operator = (const G4VisCommandGeometrySetColour&);
189  G4UIcommand* fpCommand;
190};
191
192class G4VisCommandGeometrySetDaughtersInvisible:
193  public G4VVisCommandGeometrySet {
194public:
195  G4VisCommandGeometrySetDaughtersInvisible ();
196  virtual ~G4VisCommandGeometrySetDaughtersInvisible ();
197  G4String GetCurrentValue (G4UIcommand* command);
198  void SetNewValue (G4UIcommand* command, G4String newValue);
199private:
200  G4VisCommandGeometrySetDaughtersInvisible
201  (const G4VisCommandGeometrySetDaughtersInvisible&);
202  G4VisCommandGeometrySetDaughtersInvisible& operator=
203  (const G4VisCommandGeometrySetDaughtersInvisible&);
204  G4UIcommand* fpCommand;
205};
206
207class G4VisCommandGeometrySetForceAuxEdgeVisible:
208  public G4VVisCommandGeometrySet {
209public:
210  G4VisCommandGeometrySetForceAuxEdgeVisible ();
211  virtual ~G4VisCommandGeometrySetForceAuxEdgeVisible ();
212  G4String GetCurrentValue (G4UIcommand* command);
213  void SetNewValue (G4UIcommand* command, G4String newValue);
214private:
215  G4VisCommandGeometrySetForceAuxEdgeVisible
216  (const G4VisCommandGeometrySetForceAuxEdgeVisible&);
217  G4VisCommandGeometrySetForceAuxEdgeVisible& operator=
218  (const G4VisCommandGeometrySetForceAuxEdgeVisible&);
219  G4UIcommand* fpCommand;
220};
221
222class G4VisCommandGeometrySetForceSolid:
223  public G4VVisCommandGeometrySet {
224public:
225  G4VisCommandGeometrySetForceSolid ();
226  virtual ~G4VisCommandGeometrySetForceSolid ();
227  G4String GetCurrentValue (G4UIcommand* command);
228  void SetNewValue (G4UIcommand* command, G4String newValue);
229private:
230  G4VisCommandGeometrySetForceSolid
231  (const G4VisCommandGeometrySetForceSolid&);
232  G4VisCommandGeometrySetForceSolid& operator=
233  (const G4VisCommandGeometrySetForceSolid&);
234  G4UIcommand* fpCommand;
235};
236
237class G4VisCommandGeometrySetForceLineSegmentsPerCircle:
238  public G4VVisCommandGeometrySet {
239public:
240  G4VisCommandGeometrySetForceLineSegmentsPerCircle ();
241  virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircle ();
242  G4String GetCurrentValue (G4UIcommand* command);
243  void SetNewValue (G4UIcommand* command, G4String newValue);
244private:
245  G4VisCommandGeometrySetForceLineSegmentsPerCircle
246  (const G4VisCommandGeometrySetForceLineSegmentsPerCircle&);
247  G4VisCommandGeometrySetForceLineSegmentsPerCircle& operator=
248  (const G4VisCommandGeometrySetForceLineSegmentsPerCircle&);
249  G4UIcommand* fpCommand;
250};
251
252class G4VisCommandGeometrySetForceWireframe:
253  public G4VVisCommandGeometrySet {
254public:
255  G4VisCommandGeometrySetForceWireframe ();
256  virtual ~G4VisCommandGeometrySetForceWireframe ();
257  G4String GetCurrentValue (G4UIcommand* command);
258  void SetNewValue (G4UIcommand* command, G4String newValue);
259private:
260  G4VisCommandGeometrySetForceWireframe
261  (const G4VisCommandGeometrySetForceWireframe&);
262  G4VisCommandGeometrySetForceWireframe& operator=
263  (const G4VisCommandGeometrySetForceWireframe&);
264  G4UIcommand* fpCommand;
265};
266
267class G4VisCommandGeometrySetLineStyle:
268  public G4VVisCommandGeometrySet {
269public:
270  G4VisCommandGeometrySetLineStyle ();
271  virtual ~G4VisCommandGeometrySetLineStyle ();
272  G4String GetCurrentValue (G4UIcommand* command);
273  void SetNewValue (G4UIcommand* command, G4String newValue);
274private:
275  G4VisCommandGeometrySetLineStyle
276  (const G4VisCommandGeometrySetLineStyle&);
277  G4VisCommandGeometrySetLineStyle& operator=
278  (const G4VisCommandGeometrySetLineStyle&);
279  G4UIcommand* fpCommand;
280};
281
282class G4VisCommandGeometrySetLineWidth:
283  public G4VVisCommandGeometrySet {
284public:
285  G4VisCommandGeometrySetLineWidth ();
286  virtual ~G4VisCommandGeometrySetLineWidth ();
287  G4String GetCurrentValue (G4UIcommand* command);
288  void SetNewValue (G4UIcommand* command, G4String newValue);
289private:
290  G4VisCommandGeometrySetLineWidth
291  (const G4VisCommandGeometrySetLineWidth&);
292  G4VisCommandGeometrySetLineWidth& operator=
293  (const G4VisCommandGeometrySetLineWidth&);
294  G4UIcommand* fpCommand;
295};
296
297class G4VisCommandGeometrySetVisibility: public G4VVisCommandGeometrySet {
298public:
299  G4VisCommandGeometrySetVisibility ();
300  virtual ~G4VisCommandGeometrySetVisibility ();
301  G4String GetCurrentValue (G4UIcommand* command);
302  void SetNewValue (G4UIcommand* command, G4String newValue);
303private:
304  G4VisCommandGeometrySetVisibility (const G4VisCommandGeometrySetVisibility&);
305  G4VisCommandGeometrySetVisibility& operator = (const G4VisCommandGeometrySetVisibility&);
306  G4UIcommand* fpCommand;
307};
308
309#endif
Note: See TracBrowser for help on using the repository browser.