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