[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 | // |
---|
| 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 | |
---|
| 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 G4VisCommandGeometrySetForceSolidFunction: |
---|
| 85 | public G4VVisCommandGeometrySetFunction { |
---|
| 86 | public: |
---|
| 87 | G4VisCommandGeometrySetForceSolidFunction |
---|
| 88 | (G4bool forceSolid): |
---|
| 89 | fForceSolid(forceSolid) {} |
---|
| 90 | void operator() |
---|
| 91 | (G4VisAttributes* visAtts) const |
---|
| 92 | {visAtts->SetForceSolid(fForceSolid);} |
---|
| 93 | private: |
---|
| 94 | G4bool fForceSolid; |
---|
| 95 | }; |
---|
| 96 | |
---|
| 97 | class G4VisCommandGeometrySetForceWireframeFunction: |
---|
| 98 | public G4VVisCommandGeometrySetFunction { |
---|
| 99 | public: |
---|
| 100 | G4VisCommandGeometrySetForceWireframeFunction |
---|
| 101 | (G4bool forceWireframe): |
---|
| 102 | fForceWireframe(forceWireframe) {} |
---|
| 103 | void operator() |
---|
| 104 | (G4VisAttributes* visAtts) const |
---|
| 105 | {visAtts->SetForceWireframe(fForceWireframe);} |
---|
| 106 | private: |
---|
| 107 | G4bool fForceWireframe; |
---|
| 108 | }; |
---|
| 109 | |
---|
| 110 | class G4VisCommandGeometrySetLineStyleFunction: |
---|
| 111 | public G4VVisCommandGeometrySetFunction { |
---|
| 112 | public: |
---|
| 113 | G4VisCommandGeometrySetLineStyleFunction |
---|
| 114 | (G4VisAttributes::LineStyle lineStyle): |
---|
| 115 | fLineStyle(lineStyle) {} |
---|
| 116 | void operator() |
---|
| 117 | (G4VisAttributes* visAtts) const |
---|
| 118 | {visAtts->SetLineStyle(fLineStyle);} |
---|
| 119 | private: |
---|
| 120 | G4VisAttributes::LineStyle fLineStyle; |
---|
| 121 | }; |
---|
| 122 | |
---|
| 123 | class G4VisCommandGeometrySetLineWidthFunction: |
---|
| 124 | public G4VVisCommandGeometrySetFunction { |
---|
| 125 | public: |
---|
| 126 | G4VisCommandGeometrySetLineWidthFunction |
---|
| 127 | (G4double lineWidth): |
---|
| 128 | fLineWidth(lineWidth) {} |
---|
| 129 | void operator() |
---|
| 130 | (G4VisAttributes* visAtts) const |
---|
| 131 | {visAtts->SetLineWidth(fLineWidth);} |
---|
| 132 | private: |
---|
| 133 | G4double fLineWidth; |
---|
| 134 | }; |
---|
| 135 | |
---|
| 136 | class G4VisCommandGeometrySetVisibilityFunction: |
---|
| 137 | public G4VVisCommandGeometrySetFunction { |
---|
| 138 | public: |
---|
| 139 | G4VisCommandGeometrySetVisibilityFunction |
---|
| 140 | (G4bool visibility): |
---|
| 141 | fVisibility(visibility) {} |
---|
| 142 | void operator() |
---|
| 143 | (G4VisAttributes* visAtts) const |
---|
| 144 | {visAtts->SetVisibility(fVisibility);} |
---|
| 145 | private: |
---|
| 146 | G4bool fVisibility; |
---|
| 147 | }; |
---|
| 148 | |
---|
| 149 | class G4VVisCommandGeometrySet: public G4VVisCommandGeometry { |
---|
| 150 | protected: |
---|
| 151 | void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction&, |
---|
| 152 | G4int requestedDepth); |
---|
| 153 | void SetLVVisAtts(G4LogicalVolume*, const G4VVisCommandGeometrySetFunction&, |
---|
| 154 | G4int depth, G4int requestedDepth); |
---|
| 155 | }; |
---|
| 156 | |
---|
| 157 | class G4VisCommandGeometrySetColour: public G4VVisCommandGeometrySet { |
---|
| 158 | public: |
---|
| 159 | G4VisCommandGeometrySetColour (); |
---|
| 160 | virtual ~G4VisCommandGeometrySetColour (); |
---|
| 161 | G4String GetCurrentValue (G4UIcommand* command); |
---|
| 162 | void SetNewValue (G4UIcommand* command, G4String newValue); |
---|
| 163 | private: |
---|
| 164 | G4VisCommandGeometrySetColour (const G4VisCommandGeometrySetColour&); |
---|
| 165 | G4VisCommandGeometrySetColour& operator = (const G4VisCommandGeometrySetColour&); |
---|
| 166 | G4UIcommand* fpCommand; |
---|
| 167 | }; |
---|
| 168 | |
---|
| 169 | class G4VisCommandGeometrySetDaughtersInvisible: |
---|
| 170 | public G4VVisCommandGeometrySet { |
---|
| 171 | public: |
---|
| 172 | G4VisCommandGeometrySetDaughtersInvisible (); |
---|
| 173 | virtual ~G4VisCommandGeometrySetDaughtersInvisible (); |
---|
| 174 | G4String GetCurrentValue (G4UIcommand* command); |
---|
| 175 | void SetNewValue (G4UIcommand* command, G4String newValue); |
---|
| 176 | private: |
---|
| 177 | G4VisCommandGeometrySetDaughtersInvisible |
---|
| 178 | (const G4VisCommandGeometrySetDaughtersInvisible&); |
---|
| 179 | G4VisCommandGeometrySetDaughtersInvisible& operator= |
---|
| 180 | (const G4VisCommandGeometrySetDaughtersInvisible&); |
---|
| 181 | G4UIcommand* fpCommand; |
---|
| 182 | }; |
---|
| 183 | |
---|
| 184 | class G4VisCommandGeometrySetForceAuxEdgeVisible: |
---|
| 185 | public G4VVisCommandGeometrySet { |
---|
| 186 | public: |
---|
| 187 | G4VisCommandGeometrySetForceAuxEdgeVisible (); |
---|
| 188 | virtual ~G4VisCommandGeometrySetForceAuxEdgeVisible (); |
---|
| 189 | G4String GetCurrentValue (G4UIcommand* command); |
---|
| 190 | void SetNewValue (G4UIcommand* command, G4String newValue); |
---|
| 191 | private: |
---|
| 192 | G4VisCommandGeometrySetForceAuxEdgeVisible |
---|
| 193 | (const G4VisCommandGeometrySetForceAuxEdgeVisible&); |
---|
| 194 | G4VisCommandGeometrySetForceAuxEdgeVisible& operator= |
---|
| 195 | (const G4VisCommandGeometrySetForceAuxEdgeVisible&); |
---|
| 196 | G4UIcommand* fpCommand; |
---|
| 197 | }; |
---|
| 198 | |
---|
| 199 | class G4VisCommandGeometrySetForceSolid: |
---|
| 200 | public G4VVisCommandGeometrySet { |
---|
| 201 | public: |
---|
| 202 | G4VisCommandGeometrySetForceSolid (); |
---|
| 203 | virtual ~G4VisCommandGeometrySetForceSolid (); |
---|
| 204 | G4String GetCurrentValue (G4UIcommand* command); |
---|
| 205 | void SetNewValue (G4UIcommand* command, G4String newValue); |
---|
| 206 | private: |
---|
| 207 | G4VisCommandGeometrySetForceSolid |
---|
| 208 | (const G4VisCommandGeometrySetForceSolid&); |
---|
| 209 | G4VisCommandGeometrySetForceSolid& operator= |
---|
| 210 | (const G4VisCommandGeometrySetForceSolid&); |
---|
| 211 | G4UIcommand* fpCommand; |
---|
| 212 | }; |
---|
| 213 | |
---|
| 214 | class G4VisCommandGeometrySetForceWireframe: |
---|
| 215 | public G4VVisCommandGeometrySet { |
---|
| 216 | public: |
---|
| 217 | G4VisCommandGeometrySetForceWireframe (); |
---|
| 218 | virtual ~G4VisCommandGeometrySetForceWireframe (); |
---|
| 219 | G4String GetCurrentValue (G4UIcommand* command); |
---|
| 220 | void SetNewValue (G4UIcommand* command, G4String newValue); |
---|
| 221 | private: |
---|
| 222 | G4VisCommandGeometrySetForceWireframe |
---|
| 223 | (const G4VisCommandGeometrySetForceWireframe&); |
---|
| 224 | G4VisCommandGeometrySetForceWireframe& operator= |
---|
| 225 | (const G4VisCommandGeometrySetForceWireframe&); |
---|
| 226 | G4UIcommand* fpCommand; |
---|
| 227 | }; |
---|
| 228 | |
---|
| 229 | class G4VisCommandGeometrySetLineStyle: |
---|
| 230 | public G4VVisCommandGeometrySet { |
---|
| 231 | public: |
---|
| 232 | G4VisCommandGeometrySetLineStyle (); |
---|
| 233 | virtual ~G4VisCommandGeometrySetLineStyle (); |
---|
| 234 | G4String GetCurrentValue (G4UIcommand* command); |
---|
| 235 | void SetNewValue (G4UIcommand* command, G4String newValue); |
---|
| 236 | private: |
---|
| 237 | G4VisCommandGeometrySetLineStyle |
---|
| 238 | (const G4VisCommandGeometrySetLineStyle&); |
---|
| 239 | G4VisCommandGeometrySetLineStyle& operator= |
---|
| 240 | (const G4VisCommandGeometrySetLineStyle&); |
---|
| 241 | G4UIcommand* fpCommand; |
---|
| 242 | }; |
---|
| 243 | |
---|
| 244 | class G4VisCommandGeometrySetLineWidth: |
---|
| 245 | public G4VVisCommandGeometrySet { |
---|
| 246 | public: |
---|
| 247 | G4VisCommandGeometrySetLineWidth (); |
---|
| 248 | virtual ~G4VisCommandGeometrySetLineWidth (); |
---|
| 249 | G4String GetCurrentValue (G4UIcommand* command); |
---|
| 250 | void SetNewValue (G4UIcommand* command, G4String newValue); |
---|
| 251 | private: |
---|
| 252 | G4VisCommandGeometrySetLineWidth |
---|
| 253 | (const G4VisCommandGeometrySetLineWidth&); |
---|
| 254 | G4VisCommandGeometrySetLineWidth& operator= |
---|
| 255 | (const G4VisCommandGeometrySetLineWidth&); |
---|
| 256 | G4UIcommand* fpCommand; |
---|
| 257 | }; |
---|
| 258 | |
---|
| 259 | class G4VisCommandGeometrySetVisibility: public G4VVisCommandGeometrySet { |
---|
| 260 | public: |
---|
| 261 | G4VisCommandGeometrySetVisibility (); |
---|
| 262 | virtual ~G4VisCommandGeometrySetVisibility (); |
---|
| 263 | G4String GetCurrentValue (G4UIcommand* command); |
---|
| 264 | void SetNewValue (G4UIcommand* command, G4String newValue); |
---|
| 265 | private: |
---|
| 266 | G4VisCommandGeometrySetVisibility (const G4VisCommandGeometrySetVisibility&); |
---|
| 267 | G4VisCommandGeometrySetVisibility& operator = (const G4VisCommandGeometrySetVisibility&); |
---|
| 268 | G4UIcommand* fpCommand; |
---|
| 269 | }; |
---|
| 270 | |
---|
| 271 | #endif |
---|