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

Last change on this file since 1126 was 954, checked in by garnier, 17 years ago

remise a jour

  • Property svn:mime-type set to text/cpp
File size: 10.1 KB
RevLine 
[531]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//
[593]27// $Id: G4VisCommandsGeometrySet.hh,v 1.3 2007/01/05 16:24:19 allison Exp $
[954]28// GEANT4 tag $Name: $
[531]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
[593]84class G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction:
85 public G4VVisCommandGeometrySetFunction {
86public:
87 G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction
88 (G4int lineSegmentsPerCircle):
89 fLineSegmentsPerCircle(lineSegmentsPerCircle) {}
90 void operator()
91 (G4VisAttributes* visAtts) const
92 {visAtts->SetForceLineSegmentsPerCircle(fLineSegmentsPerCircle);}
93private:
94 G4int fLineSegmentsPerCircle;
95};
96
[531]97class G4VisCommandGeometrySetForceSolidFunction:
98 public G4VVisCommandGeometrySetFunction {
99public:
100 G4VisCommandGeometrySetForceSolidFunction
101 (G4bool forceSolid):
102 fForceSolid(forceSolid) {}
103 void operator()
104 (G4VisAttributes* visAtts) const
105 {visAtts->SetForceSolid(fForceSolid);}
106private:
107 G4bool fForceSolid;
108};
109
110class G4VisCommandGeometrySetForceWireframeFunction:
111 public G4VVisCommandGeometrySetFunction {
112public:
113 G4VisCommandGeometrySetForceWireframeFunction
114 (G4bool forceWireframe):
115 fForceWireframe(forceWireframe) {}
116 void operator()
117 (G4VisAttributes* visAtts) const
118 {visAtts->SetForceWireframe(fForceWireframe);}
119private:
120 G4bool fForceWireframe;
121};
122
123class G4VisCommandGeometrySetLineStyleFunction:
124 public G4VVisCommandGeometrySetFunction {
125public:
126 G4VisCommandGeometrySetLineStyleFunction
127 (G4VisAttributes::LineStyle lineStyle):
128 fLineStyle(lineStyle) {}
129 void operator()
130 (G4VisAttributes* visAtts) const
131 {visAtts->SetLineStyle(fLineStyle);}
132private:
133 G4VisAttributes::LineStyle fLineStyle;
134};
135
136class G4VisCommandGeometrySetLineWidthFunction:
137 public G4VVisCommandGeometrySetFunction {
138public:
139 G4VisCommandGeometrySetLineWidthFunction
140 (G4double lineWidth):
141 fLineWidth(lineWidth) {}
142 void operator()
143 (G4VisAttributes* visAtts) const
144 {visAtts->SetLineWidth(fLineWidth);}
145private:
146 G4double fLineWidth;
147};
148
149class G4VisCommandGeometrySetVisibilityFunction:
150 public G4VVisCommandGeometrySetFunction {
151public:
152 G4VisCommandGeometrySetVisibilityFunction
153 (G4bool visibility):
154 fVisibility(visibility) {}
155 void operator()
156 (G4VisAttributes* visAtts) const
157 {visAtts->SetVisibility(fVisibility);}
158private:
159 G4bool fVisibility;
160};
161
162class G4VVisCommandGeometrySet: public G4VVisCommandGeometry {
163protected:
164 void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction&,
165 G4int requestedDepth);
166 void SetLVVisAtts(G4LogicalVolume*, const G4VVisCommandGeometrySetFunction&,
167 G4int depth, G4int requestedDepth);
168};
169
170class G4VisCommandGeometrySetColour: public G4VVisCommandGeometrySet {
171public:
172 G4VisCommandGeometrySetColour ();
173 virtual ~G4VisCommandGeometrySetColour ();
174 G4String GetCurrentValue (G4UIcommand* command);
175 void SetNewValue (G4UIcommand* command, G4String newValue);
176private:
177 G4VisCommandGeometrySetColour (const G4VisCommandGeometrySetColour&);
178 G4VisCommandGeometrySetColour& operator = (const G4VisCommandGeometrySetColour&);
179 G4UIcommand* fpCommand;
180};
181
182class G4VisCommandGeometrySetDaughtersInvisible:
183 public G4VVisCommandGeometrySet {
184public:
185 G4VisCommandGeometrySetDaughtersInvisible ();
186 virtual ~G4VisCommandGeometrySetDaughtersInvisible ();
187 G4String GetCurrentValue (G4UIcommand* command);
188 void SetNewValue (G4UIcommand* command, G4String newValue);
189private:
190 G4VisCommandGeometrySetDaughtersInvisible
191 (const G4VisCommandGeometrySetDaughtersInvisible&);
192 G4VisCommandGeometrySetDaughtersInvisible& operator=
193 (const G4VisCommandGeometrySetDaughtersInvisible&);
194 G4UIcommand* fpCommand;
195};
196
197class G4VisCommandGeometrySetForceAuxEdgeVisible:
198 public G4VVisCommandGeometrySet {
199public:
200 G4VisCommandGeometrySetForceAuxEdgeVisible ();
201 virtual ~G4VisCommandGeometrySetForceAuxEdgeVisible ();
202 G4String GetCurrentValue (G4UIcommand* command);
203 void SetNewValue (G4UIcommand* command, G4String newValue);
204private:
205 G4VisCommandGeometrySetForceAuxEdgeVisible
206 (const G4VisCommandGeometrySetForceAuxEdgeVisible&);
207 G4VisCommandGeometrySetForceAuxEdgeVisible& operator=
208 (const G4VisCommandGeometrySetForceAuxEdgeVisible&);
209 G4UIcommand* fpCommand;
210};
211
212class G4VisCommandGeometrySetForceSolid:
213 public G4VVisCommandGeometrySet {
214public:
215 G4VisCommandGeometrySetForceSolid ();
216 virtual ~G4VisCommandGeometrySetForceSolid ();
217 G4String GetCurrentValue (G4UIcommand* command);
218 void SetNewValue (G4UIcommand* command, G4String newValue);
219private:
220 G4VisCommandGeometrySetForceSolid
221 (const G4VisCommandGeometrySetForceSolid&);
222 G4VisCommandGeometrySetForceSolid& operator=
223 (const G4VisCommandGeometrySetForceSolid&);
224 G4UIcommand* fpCommand;
225};
226
[593]227class G4VisCommandGeometrySetForceLineSegmentsPerCircle:
228 public G4VVisCommandGeometrySet {
229public:
230 G4VisCommandGeometrySetForceLineSegmentsPerCircle ();
231 virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircle ();
232 G4String GetCurrentValue (G4UIcommand* command);
233 void SetNewValue (G4UIcommand* command, G4String newValue);
234private:
235 G4VisCommandGeometrySetForceLineSegmentsPerCircle
236 (const G4VisCommandGeometrySetForceLineSegmentsPerCircle&);
237 G4VisCommandGeometrySetForceLineSegmentsPerCircle& operator=
238 (const G4VisCommandGeometrySetForceLineSegmentsPerCircle&);
239 G4UIcommand* fpCommand;
240};
241
[531]242class G4VisCommandGeometrySetForceWireframe:
243 public G4VVisCommandGeometrySet {
244public:
245 G4VisCommandGeometrySetForceWireframe ();
246 virtual ~G4VisCommandGeometrySetForceWireframe ();
247 G4String GetCurrentValue (G4UIcommand* command);
248 void SetNewValue (G4UIcommand* command, G4String newValue);
249private:
250 G4VisCommandGeometrySetForceWireframe
251 (const G4VisCommandGeometrySetForceWireframe&);
252 G4VisCommandGeometrySetForceWireframe& operator=
253 (const G4VisCommandGeometrySetForceWireframe&);
254 G4UIcommand* fpCommand;
255};
256
257class G4VisCommandGeometrySetLineStyle:
258 public G4VVisCommandGeometrySet {
259public:
260 G4VisCommandGeometrySetLineStyle ();
261 virtual ~G4VisCommandGeometrySetLineStyle ();
262 G4String GetCurrentValue (G4UIcommand* command);
263 void SetNewValue (G4UIcommand* command, G4String newValue);
264private:
265 G4VisCommandGeometrySetLineStyle
266 (const G4VisCommandGeometrySetLineStyle&);
267 G4VisCommandGeometrySetLineStyle& operator=
268 (const G4VisCommandGeometrySetLineStyle&);
269 G4UIcommand* fpCommand;
270};
271
272class G4VisCommandGeometrySetLineWidth:
273 public G4VVisCommandGeometrySet {
274public:
275 G4VisCommandGeometrySetLineWidth ();
276 virtual ~G4VisCommandGeometrySetLineWidth ();
277 G4String GetCurrentValue (G4UIcommand* command);
278 void SetNewValue (G4UIcommand* command, G4String newValue);
279private:
280 G4VisCommandGeometrySetLineWidth
281 (const G4VisCommandGeometrySetLineWidth&);
282 G4VisCommandGeometrySetLineWidth& operator=
283 (const G4VisCommandGeometrySetLineWidth&);
284 G4UIcommand* fpCommand;
285};
286
287class G4VisCommandGeometrySetVisibility: public G4VVisCommandGeometrySet {
288public:
289 G4VisCommandGeometrySetVisibility ();
290 virtual ~G4VisCommandGeometrySetVisibility ();
291 G4String GetCurrentValue (G4UIcommand* command);
292 void SetNewValue (G4UIcommand* command, G4String newValue);
293private:
294 G4VisCommandGeometrySetVisibility (const G4VisCommandGeometrySetVisibility&);
295 G4VisCommandGeometrySetVisibility& operator = (const G4VisCommandGeometrySetVisibility&);
296 G4UIcommand* fpCommand;
297};
298
299#endif
Note: See TracBrowser for help on using the repository browser.