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