source: trunk/geant4/visualization/management/include/G4VisCommandsGeometrySet.hh @ 553

Last change on this file since 553 was 531, checked in by garnier, 17 years ago

r660@mac-90108: laurentgarnier | 2007-06-25 16:10:12 +0200
ajout de fichiers NON modifies

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