File indexing completed on 2025-01-18 09:59:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #ifndef G4VISCOMMANDSGEOMETRYSET_HH
0031 #define G4VISCOMMANDSGEOMETRYSET_HH
0032
0033 #include "G4VisCommandsGeometry.hh"
0034
0035 class G4UIcommand;
0036 class G4VisAttributes;
0037
0038 class G4VVisCommandGeometrySetFunction {
0039 public:
0040 virtual ~G4VVisCommandGeometrySetFunction() {}
0041 virtual void operator()(G4VisAttributes*) const = 0;
0042 };
0043
0044 class G4VisCommandGeometrySetColourFunction:
0045 public G4VVisCommandGeometrySetFunction {
0046 public:
0047 virtual ~G4VisCommandGeometrySetColourFunction() {}
0048 G4VisCommandGeometrySetColourFunction
0049 (const G4Colour& colour):
0050 fColour(colour) {}
0051 void operator()
0052 (G4VisAttributes* visAtts) const
0053 {visAtts->SetColour(fColour);}
0054 private:
0055 const G4Colour& fColour;
0056 };
0057
0058 class G4VisCommandGeometrySetDaughtersInvisibleFunction:
0059 public G4VVisCommandGeometrySetFunction {
0060 public:
0061 virtual ~G4VisCommandGeometrySetDaughtersInvisibleFunction() {}
0062 G4VisCommandGeometrySetDaughtersInvisibleFunction
0063 (G4bool daughtersInvisible):
0064 fDaughtersInvisible(daughtersInvisible) {}
0065 void operator()
0066 (G4VisAttributes* visAtts) const
0067 {visAtts->SetDaughtersInvisible(fDaughtersInvisible);}
0068 private:
0069 G4bool fDaughtersInvisible;
0070 };
0071
0072 class G4VisCommandGeometrySetForceAuxEdgeVisibleFunction:
0073 public G4VVisCommandGeometrySetFunction {
0074 public:
0075 virtual ~G4VisCommandGeometrySetForceAuxEdgeVisibleFunction() {}
0076 G4VisCommandGeometrySetForceAuxEdgeVisibleFunction
0077 (G4bool force):
0078 fForce(force) {}
0079 void operator()
0080 (G4VisAttributes* visAtts) const
0081 {visAtts->SetForceAuxEdgeVisible(fForce);}
0082 private:
0083 G4bool fForce;
0084 };
0085
0086 class G4VisCommandGeometrySetForceCloudFunction:
0087 public G4VVisCommandGeometrySetFunction {
0088 public:
0089 virtual ~G4VisCommandGeometrySetForceCloudFunction() {}
0090 G4VisCommandGeometrySetForceCloudFunction
0091 (G4bool force, G4int nPoints)
0092 :fForce(force)
0093 ,fNPoints(nPoints) {}
0094 void operator() (G4VisAttributes* visAtts) const {
0095 visAtts->SetForceCloud(fForce);
0096 visAtts->SetForceNumberOfCloudPoints(fNPoints);
0097 }
0098 private:
0099 G4bool fForce;
0100 G4int fNPoints;
0101 };
0102
0103 class G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction:
0104 public G4VVisCommandGeometrySetFunction {
0105 public:
0106 virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction() {}
0107 G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction
0108 (G4int lineSegmentsPerCircle):
0109 fLineSegmentsPerCircle(lineSegmentsPerCircle) {}
0110 void operator()
0111 (G4VisAttributes* visAtts) const
0112 {visAtts->SetForceLineSegmentsPerCircle(fLineSegmentsPerCircle);}
0113 private:
0114 G4int fLineSegmentsPerCircle;
0115 };
0116
0117 class G4VisCommandGeometrySetForceSolidFunction:
0118 public G4VVisCommandGeometrySetFunction {
0119 public:
0120 virtual ~G4VisCommandGeometrySetForceSolidFunction() {}
0121 G4VisCommandGeometrySetForceSolidFunction
0122 (G4bool force):
0123 fForce(force) {}
0124 void operator()
0125 (G4VisAttributes* visAtts) const
0126 {visAtts->SetForceSolid(fForce);}
0127 private:
0128 G4bool fForce;
0129 };
0130
0131 class G4VisCommandGeometrySetForceWireframeFunction:
0132 public G4VVisCommandGeometrySetFunction {
0133 public:
0134 virtual ~G4VisCommandGeometrySetForceWireframeFunction() {}
0135 G4VisCommandGeometrySetForceWireframeFunction
0136 (G4bool force):
0137 fForce(force) {}
0138 void operator()
0139 (G4VisAttributes* visAtts) const
0140 {visAtts->SetForceWireframe(fForce);}
0141 private:
0142 G4bool fForce;
0143 };
0144
0145 class G4VisCommandGeometrySetLineStyleFunction:
0146 public G4VVisCommandGeometrySetFunction {
0147 public:
0148 virtual ~G4VisCommandGeometrySetLineStyleFunction() {}
0149 G4VisCommandGeometrySetLineStyleFunction
0150 (G4VisAttributes::LineStyle lineStyle):
0151 fLineStyle(lineStyle) {}
0152 void operator()
0153 (G4VisAttributes* visAtts) const
0154 {visAtts->SetLineStyle(fLineStyle);}
0155 private:
0156 G4VisAttributes::LineStyle fLineStyle;
0157 };
0158
0159 class G4VisCommandGeometrySetLineWidthFunction:
0160 public G4VVisCommandGeometrySetFunction {
0161 public:
0162 virtual ~G4VisCommandGeometrySetLineWidthFunction() {}
0163 G4VisCommandGeometrySetLineWidthFunction
0164 (G4double lineWidth):
0165 fLineWidth(lineWidth) {}
0166 void operator()
0167 (G4VisAttributes* visAtts) const
0168 {visAtts->SetLineWidth(fLineWidth);}
0169 private:
0170 G4double fLineWidth;
0171 };
0172
0173 class G4VisCommandGeometrySetVisibilityFunction:
0174 public G4VVisCommandGeometrySetFunction {
0175 public:
0176 virtual ~G4VisCommandGeometrySetVisibilityFunction() {}
0177 G4VisCommandGeometrySetVisibilityFunction
0178 (G4bool visibility):
0179 fVisibility(visibility) {}
0180 void operator()
0181 (G4VisAttributes* visAtts) const
0182 {visAtts->SetVisibility(fVisibility);}
0183 private:
0184 G4bool fVisibility;
0185 };
0186
0187 class G4VVisCommandGeometrySet: public G4VVisCommandGeometry {
0188 protected:
0189 void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction&,
0190 G4int requestedDepth);
0191 void SetLVVisAtts(G4LogicalVolume*, const G4VVisCommandGeometrySetFunction&,
0192 G4int depth, G4int requestedDepth);
0193 };
0194
0195 class G4VisCommandGeometrySetColour: public G4VVisCommandGeometrySet {
0196 public:
0197 G4VisCommandGeometrySetColour ();
0198 virtual ~G4VisCommandGeometrySetColour ();
0199 G4String GetCurrentValue (G4UIcommand* command);
0200 void SetNewValue (G4UIcommand* command, G4String newValue);
0201 private:
0202 G4VisCommandGeometrySetColour (const G4VisCommandGeometrySetColour&);
0203 G4VisCommandGeometrySetColour& operator = (const G4VisCommandGeometrySetColour&);
0204 G4UIcommand* fpCommand;
0205 };
0206
0207 class G4VisCommandGeometrySetDaughtersInvisible:
0208 public G4VVisCommandGeometrySet {
0209 public:
0210 G4VisCommandGeometrySetDaughtersInvisible ();
0211 virtual ~G4VisCommandGeometrySetDaughtersInvisible ();
0212 G4String GetCurrentValue (G4UIcommand* command);
0213 void SetNewValue (G4UIcommand* command, G4String newValue);
0214 private:
0215 G4VisCommandGeometrySetDaughtersInvisible
0216 (const G4VisCommandGeometrySetDaughtersInvisible&);
0217 G4VisCommandGeometrySetDaughtersInvisible& operator=
0218 (const G4VisCommandGeometrySetDaughtersInvisible&);
0219 G4UIcommand* fpCommand;
0220 };
0221
0222 class G4VisCommandGeometrySetForceAuxEdgeVisible:
0223 public G4VVisCommandGeometrySet {
0224 public:
0225 G4VisCommandGeometrySetForceAuxEdgeVisible ();
0226 virtual ~G4VisCommandGeometrySetForceAuxEdgeVisible ();
0227 G4String GetCurrentValue (G4UIcommand* command);
0228 void SetNewValue (G4UIcommand* command, G4String newValue);
0229 private:
0230 G4VisCommandGeometrySetForceAuxEdgeVisible
0231 (const G4VisCommandGeometrySetForceAuxEdgeVisible&);
0232 G4VisCommandGeometrySetForceAuxEdgeVisible& operator=
0233 (const G4VisCommandGeometrySetForceAuxEdgeVisible&);
0234 G4UIcommand* fpCommand;
0235 };
0236
0237 class G4VisCommandGeometrySetForceCloud:
0238 public G4VVisCommandGeometrySet {
0239 public:
0240 G4VisCommandGeometrySetForceCloud ();
0241 virtual ~G4VisCommandGeometrySetForceCloud ();
0242 G4String GetCurrentValue (G4UIcommand* command);
0243 void SetNewValue (G4UIcommand* command, G4String newValue);
0244 private:
0245 G4VisCommandGeometrySetForceCloud
0246 (const G4VisCommandGeometrySetForceCloud&);
0247 G4VisCommandGeometrySetForceCloud& operator=
0248 (const G4VisCommandGeometrySetForceCloud&);
0249 G4UIcommand* fpCommand;
0250 };
0251
0252 class G4VisCommandGeometrySetForceSolid:
0253 public G4VVisCommandGeometrySet {
0254 public:
0255 G4VisCommandGeometrySetForceSolid ();
0256 virtual ~G4VisCommandGeometrySetForceSolid ();
0257 G4String GetCurrentValue (G4UIcommand* command);
0258 void SetNewValue (G4UIcommand* command, G4String newValue);
0259 private:
0260 G4VisCommandGeometrySetForceSolid
0261 (const G4VisCommandGeometrySetForceSolid&);
0262 G4VisCommandGeometrySetForceSolid& operator=
0263 (const G4VisCommandGeometrySetForceSolid&);
0264 G4UIcommand* fpCommand;
0265 };
0266
0267 class G4VisCommandGeometrySetForceLineSegmentsPerCircle:
0268 public G4VVisCommandGeometrySet {
0269 public:
0270 G4VisCommandGeometrySetForceLineSegmentsPerCircle ();
0271 virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircle ();
0272 G4String GetCurrentValue (G4UIcommand* command);
0273 void SetNewValue (G4UIcommand* command, G4String newValue);
0274 private:
0275 G4VisCommandGeometrySetForceLineSegmentsPerCircle
0276 (const G4VisCommandGeometrySetForceLineSegmentsPerCircle&);
0277 G4VisCommandGeometrySetForceLineSegmentsPerCircle& operator=
0278 (const G4VisCommandGeometrySetForceLineSegmentsPerCircle&);
0279 G4UIcommand* fpCommand;
0280 };
0281
0282 class G4VisCommandGeometrySetForceWireframe:
0283 public G4VVisCommandGeometrySet {
0284 public:
0285 G4VisCommandGeometrySetForceWireframe ();
0286 virtual ~G4VisCommandGeometrySetForceWireframe ();
0287 G4String GetCurrentValue (G4UIcommand* command);
0288 void SetNewValue (G4UIcommand* command, G4String newValue);
0289 private:
0290 G4VisCommandGeometrySetForceWireframe
0291 (const G4VisCommandGeometrySetForceWireframe&);
0292 G4VisCommandGeometrySetForceWireframe& operator=
0293 (const G4VisCommandGeometrySetForceWireframe&);
0294 G4UIcommand* fpCommand;
0295 };
0296
0297 class G4VisCommandGeometrySetLineStyle:
0298 public G4VVisCommandGeometrySet {
0299 public:
0300 G4VisCommandGeometrySetLineStyle ();
0301 virtual ~G4VisCommandGeometrySetLineStyle ();
0302 G4String GetCurrentValue (G4UIcommand* command);
0303 void SetNewValue (G4UIcommand* command, G4String newValue);
0304 private:
0305 G4VisCommandGeometrySetLineStyle
0306 (const G4VisCommandGeometrySetLineStyle&);
0307 G4VisCommandGeometrySetLineStyle& operator=
0308 (const G4VisCommandGeometrySetLineStyle&);
0309 G4UIcommand* fpCommand;
0310 };
0311
0312 class G4VisCommandGeometrySetLineWidth:
0313 public G4VVisCommandGeometrySet {
0314 public:
0315 G4VisCommandGeometrySetLineWidth ();
0316 virtual ~G4VisCommandGeometrySetLineWidth ();
0317 G4String GetCurrentValue (G4UIcommand* command);
0318 void SetNewValue (G4UIcommand* command, G4String newValue);
0319 private:
0320 G4VisCommandGeometrySetLineWidth
0321 (const G4VisCommandGeometrySetLineWidth&);
0322 G4VisCommandGeometrySetLineWidth& operator=
0323 (const G4VisCommandGeometrySetLineWidth&);
0324 G4UIcommand* fpCommand;
0325 };
0326
0327 class G4VisCommandGeometrySetVisibility: public G4VVisCommandGeometrySet {
0328 public:
0329 G4VisCommandGeometrySetVisibility ();
0330 virtual ~G4VisCommandGeometrySetVisibility ();
0331 G4String GetCurrentValue (G4UIcommand* command);
0332 void SetNewValue (G4UIcommand* command, G4String newValue);
0333 void SetNewValueOnLV (G4LogicalVolume* pLV, G4int,G4bool);
0334 private:
0335 G4VisCommandGeometrySetVisibility (const G4VisCommandGeometrySetVisibility&);
0336 G4VisCommandGeometrySetVisibility& operator = (const G4VisCommandGeometrySetVisibility&);
0337 G4UIcommand* fpCommand;
0338 };
0339
0340 #endif