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
0031 #ifndef G4VISCOMMANDSSCENEADD_HH
0032 #define G4VISCOMMANDSSCENEADD_HH
0033
0034 #include "G4VisCommandsScene.hh"
0035
0036 class G4UIcmdWithoutParameter;
0037 class G4UIcmdWithAString;
0038 class G4UIcmdWithAnInteger;
0039
0040 #include "G4Transform3D.hh"
0041 #include "G4VisAttributes.hh"
0042 #include "G4Polyline.hh"
0043 #include "G4Text.hh"
0044 #include "G4Timer.hh"
0045
0046 class G4VisCommandSceneAddArrow: public G4VVisCommandScene {
0047 public:
0048 G4VisCommandSceneAddArrow ();
0049 virtual ~G4VisCommandSceneAddArrow ();
0050 G4String GetCurrentValue (G4UIcommand* command);
0051 void SetNewValue (G4UIcommand* command, G4String newValue);
0052 private:
0053 G4VisCommandSceneAddArrow (const G4VisCommandSceneAddArrow&);
0054 G4VisCommandSceneAddArrow& operator = (const G4VisCommandSceneAddArrow&);
0055 G4UIcommand* fpCommand;
0056 };
0057
0058 class G4VisCommandSceneAddArrow2D: public G4VVisCommandScene {
0059 public:
0060 G4VisCommandSceneAddArrow2D ();
0061 virtual ~G4VisCommandSceneAddArrow2D ();
0062 G4String GetCurrentValue (G4UIcommand* command);
0063 void SetNewValue (G4UIcommand* command, G4String newValue);
0064 private:
0065 G4VisCommandSceneAddArrow2D (const G4VisCommandSceneAddArrow2D&);
0066 G4VisCommandSceneAddArrow2D& operator = (const G4VisCommandSceneAddArrow2D&);
0067 struct Arrow2D {
0068 Arrow2D(G4double x1, G4double y1,
0069 G4double x2, G4double y2,
0070 G4double width, const G4Colour& colour);
0071 void operator()(G4VGraphicsScene&, const G4ModelingParameters* fpMp);
0072 G4Polyline fShaftPolyline;
0073 G4Polyline fHeadPolyline;
0074 G4double fWidth;
0075 G4Colour fColour;
0076 };
0077 G4UIcommand* fpCommand;
0078 };
0079
0080 class G4VisCommandSceneAddAxes: public G4VVisCommandScene {
0081 public:
0082 G4VisCommandSceneAddAxes ();
0083 virtual ~G4VisCommandSceneAddAxes ();
0084 G4String GetCurrentValue (G4UIcommand* command);
0085 void SetNewValue (G4UIcommand* command, G4String newValue);
0086 private:
0087 G4VisCommandSceneAddAxes (const G4VisCommandSceneAddAxes&);
0088 G4VisCommandSceneAddAxes& operator = (const G4VisCommandSceneAddAxes&);
0089 G4UIcommand* fpCommand;
0090 };
0091
0092 class G4VisCommandSceneAddDate: public G4VVisCommandScene {
0093 public:
0094 G4VisCommandSceneAddDate ();
0095 virtual ~G4VisCommandSceneAddDate ();
0096 G4String GetCurrentValue (G4UIcommand* command);
0097 void SetNewValue (G4UIcommand* command, G4String newValue);
0098 private:
0099 G4VisCommandSceneAddDate (const G4VisCommandSceneAddDate&);
0100 G4VisCommandSceneAddDate& operator = (const G4VisCommandSceneAddDate&);
0101 struct Date {
0102 Date
0103 (G4VisManager* vm, G4int size,
0104 G4double x, G4double y, G4Text::Layout layout,
0105 const G4String& date):
0106 fpVisManager(vm), fSize(size),
0107 fX(x), fY(y), fLayout(layout), fDate(date) {}
0108 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0109 G4VisManager* fpVisManager;
0110 G4Timer fTimer;
0111 G4int fSize;
0112 G4double fX, fY;
0113 G4Text::Layout fLayout;
0114 G4String fDate;
0115 };
0116 G4UIcommand* fpCommand;
0117 };
0118
0119 class G4VisCommandSceneAddDigis: public G4VVisCommandScene {
0120 public:
0121 G4VisCommandSceneAddDigis ();
0122 virtual ~G4VisCommandSceneAddDigis ();
0123 G4String GetCurrentValue (G4UIcommand* command);
0124 void SetNewValue (G4UIcommand* command, G4String newValue);
0125 private:
0126 G4VisCommandSceneAddDigis (const G4VisCommandSceneAddDigis&);
0127 G4VisCommandSceneAddDigis& operator = (const G4VisCommandSceneAddDigis&);
0128 G4UIcmdWithoutParameter* fpCommand;
0129 };
0130
0131 class G4VisCommandSceneAddEventID: public G4VVisCommandScene {
0132 public:
0133 G4VisCommandSceneAddEventID ();
0134 virtual ~G4VisCommandSceneAddEventID ();
0135 G4String GetCurrentValue (G4UIcommand* command);
0136 void SetNewValue (G4UIcommand* command, G4String newValue);
0137 private:
0138 G4VisCommandSceneAddEventID (const G4VisCommandSceneAddEventID&);
0139 G4VisCommandSceneAddEventID& operator = (const G4VisCommandSceneAddEventID&);
0140 enum ForWhat {forEndOfEvent, forEndOfRun};
0141 struct EventID {
0142 EventID(ForWhat w, G4VisManager* vm, G4int size,
0143 G4double x, G4double y, G4Text::Layout layout):
0144 fForWhat(w), fpVisManager(vm), fSize(size),
0145 fX(x), fY(y), fLayout(layout) {}
0146 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0147 ForWhat fForWhat;
0148 G4VisManager* fpVisManager;
0149 G4int fSize;
0150 G4double fX, fY;
0151 G4Text::Layout fLayout;
0152 };
0153 G4UIcommand* fpCommand;
0154 };
0155
0156 class G4VisCommandSceneAddExtent: public G4VVisCommandScene {
0157 public:
0158 G4VisCommandSceneAddExtent ();
0159 virtual ~G4VisCommandSceneAddExtent ();
0160 G4String GetCurrentValue (G4UIcommand* command);
0161 void SetNewValue (G4UIcommand* command, G4String newValue);
0162 private:
0163 G4VisCommandSceneAddExtent (const G4VisCommandSceneAddExtent&);
0164 G4VisCommandSceneAddExtent& operator = (const G4VisCommandSceneAddExtent&);
0165 struct Extent {
0166 Extent(G4double xmin, G4double xmax,
0167 G4double ymin, G4double ymax,
0168 G4double zmin, G4double zmax);
0169 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0170 G4VisExtent fExtent;
0171 };
0172 G4UIcommand* fpCommand;
0173 };
0174
0175 class G4VisCommandSceneAddElectricField: public G4VVisCommandScene {
0176 public:
0177 G4VisCommandSceneAddElectricField ();
0178 virtual ~G4VisCommandSceneAddElectricField ();
0179 G4String GetCurrentValue (G4UIcommand* command);
0180 void SetNewValue (G4UIcommand* command, G4String newValue);
0181 private:
0182 G4VisCommandSceneAddElectricField (const G4VisCommandSceneAddElectricField&);
0183 G4VisCommandSceneAddElectricField& operator = (const G4VisCommandSceneAddElectricField&);
0184 G4UIcommand* fpCommand;
0185 };
0186
0187 class G4VisCommandSceneAddFrame: public G4VVisCommandScene {
0188 public:
0189 G4VisCommandSceneAddFrame ();
0190 virtual ~G4VisCommandSceneAddFrame ();
0191 G4String GetCurrentValue (G4UIcommand* command);
0192 void SetNewValue (G4UIcommand* command, G4String newValue);
0193 private:
0194 G4VisCommandSceneAddFrame (const G4VisCommandSceneAddFrame&);
0195 G4VisCommandSceneAddFrame& operator = (const G4VisCommandSceneAddFrame&);
0196 struct Frame {
0197 Frame(G4double size, G4double width, const G4Colour& colour):
0198 fSize(size), fWidth(width), fColour(colour) {}
0199 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0200 G4double fSize;
0201 G4double fWidth;
0202 G4Colour fColour;
0203 };
0204 G4UIcommand* fpCommand;
0205 };
0206
0207 class G4VisCommandSceneAddGPS: public G4VVisCommandScene {
0208 public:
0209 G4VisCommandSceneAddGPS ();
0210 virtual ~G4VisCommandSceneAddGPS ();
0211 G4String GetCurrentValue (G4UIcommand* command);
0212 void SetNewValue (G4UIcommand* command, G4String newValue);
0213 private:
0214 G4VisCommandSceneAddGPS (const G4VisCommandSceneAddGPS&);
0215 G4VisCommandSceneAddGPS& operator = (const G4VisCommandSceneAddGPS&);
0216 G4UIcommand* fpCommand;
0217 };
0218
0219 class G4VisCommandSceneAddGhosts: public G4VVisCommandScene {
0220 public:
0221 G4VisCommandSceneAddGhosts ();
0222 virtual ~G4VisCommandSceneAddGhosts ();
0223 G4String GetCurrentValue (G4UIcommand* command);
0224 void SetNewValue (G4UIcommand* command, G4String newValue);
0225 private:
0226 G4VisCommandSceneAddGhosts (const G4VisCommandSceneAddGhosts&);
0227 G4VisCommandSceneAddGhosts& operator =
0228 (const G4VisCommandSceneAddGhosts&);
0229 G4UIcmdWithAString* fpCommand;
0230 };
0231
0232 class G4VisCommandSceneAddHits: public G4VVisCommandScene {
0233 public:
0234 G4VisCommandSceneAddHits ();
0235 virtual ~G4VisCommandSceneAddHits ();
0236 G4String GetCurrentValue (G4UIcommand* command);
0237 void SetNewValue (G4UIcommand* command, G4String newValue);
0238 private:
0239 G4VisCommandSceneAddHits (const G4VisCommandSceneAddHits&);
0240 G4VisCommandSceneAddHits& operator = (const G4VisCommandSceneAddHits&);
0241 G4UIcmdWithoutParameter* fpCommand;
0242 };
0243
0244 class G4VisCommandSceneAddLine: public G4VVisCommandScene {
0245 public:
0246 G4VisCommandSceneAddLine ();
0247 virtual ~G4VisCommandSceneAddLine ();
0248 G4String GetCurrentValue (G4UIcommand* command);
0249 void SetNewValue (G4UIcommand* command, G4String newValue);
0250 private:
0251 G4VisCommandSceneAddLine (const G4VisCommandSceneAddLine&);
0252 G4VisCommandSceneAddLine& operator = (const G4VisCommandSceneAddLine&);
0253 struct Line {
0254 Line(G4double x1, G4double y1, G4double z1,
0255 G4double x2, G4double y2, G4double z2,
0256 G4double width, const G4Colour& colour);
0257 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0258 G4Polyline fPolyline;
0259 G4double fWidth;
0260 G4Colour fColour;
0261 };
0262 G4UIcommand* fpCommand;
0263 };
0264
0265 class G4VisCommandSceneAddLine2D: public G4VVisCommandScene {
0266 public:
0267 G4VisCommandSceneAddLine2D ();
0268 virtual ~G4VisCommandSceneAddLine2D ();
0269 G4String GetCurrentValue (G4UIcommand* command);
0270 void SetNewValue (G4UIcommand* command, G4String newValue);
0271 private:
0272 G4VisCommandSceneAddLine2D (const G4VisCommandSceneAddLine2D&);
0273 G4VisCommandSceneAddLine2D& operator = (const G4VisCommandSceneAddLine2D&);
0274 struct Line2D {
0275 Line2D(G4double x1, G4double y1,
0276 G4double x2, G4double y2,
0277 G4double width, const G4Colour& colour);
0278 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0279 G4Polyline fPolyline;
0280 G4double fWidth;
0281 G4Colour fColour;
0282 };
0283 G4UIcommand* fpCommand;
0284 };
0285
0286 class G4VisCommandSceneAddLocalAxes: public G4VVisCommandScene {
0287 public:
0288 G4VisCommandSceneAddLocalAxes ();
0289 virtual ~G4VisCommandSceneAddLocalAxes ();
0290 G4String GetCurrentValue (G4UIcommand* command);
0291 void SetNewValue (G4UIcommand* command, G4String newValue);
0292 private:
0293 G4VisCommandSceneAddLocalAxes (const G4VisCommandSceneAddLocalAxes&);
0294 G4VisCommandSceneAddLocalAxes& operator = (const G4VisCommandSceneAddLocalAxes&);
0295 G4UIcommand* fpCommand;
0296 };
0297
0298 class G4VisCommandSceneAddLogicalVolume: public G4VVisCommandScene {
0299 public:
0300 G4VisCommandSceneAddLogicalVolume ();
0301 virtual ~G4VisCommandSceneAddLogicalVolume ();
0302 G4String GetCurrentValue (G4UIcommand* command);
0303 void SetNewValue (G4UIcommand* command, G4String newValue);
0304 private:
0305 G4VisCommandSceneAddLogicalVolume (const G4VisCommandSceneAddLogicalVolume&);
0306 G4VisCommandSceneAddLogicalVolume& operator =
0307 (const G4VisCommandSceneAddLogicalVolume&);
0308 G4UIcommand* fpCommand;
0309 };
0310
0311 class G4VisCommandSceneAddLogo: public G4VVisCommandScene {
0312 public:
0313 G4VisCommandSceneAddLogo ();
0314 virtual ~G4VisCommandSceneAddLogo ();
0315 G4String GetCurrentValue (G4UIcommand* command);
0316 void SetNewValue (G4UIcommand* command, G4String newValue);
0317 private:
0318 G4VisCommandSceneAddLogo (const G4VisCommandSceneAddLogo&);
0319 G4VisCommandSceneAddLogo& operator = (const G4VisCommandSceneAddLogo&);
0320
0321 enum Direction {X, minusX, Y, minusY, Z, minusZ};
0322 struct G4Logo {
0323 G4Logo(G4double height, const G4VisAttributes&, const G4Transform3D&);
0324 ~G4Logo();
0325 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0326 private:
0327 G4Polyhedron *fpG, *fp4;
0328 };
0329 G4UIcommand* fpCommand;
0330 };
0331
0332 class G4VisCommandSceneAddLogo2D: public G4VVisCommandScene {
0333 public:
0334 G4VisCommandSceneAddLogo2D ();
0335 virtual ~G4VisCommandSceneAddLogo2D ();
0336 G4String GetCurrentValue (G4UIcommand* command);
0337 void SetNewValue (G4UIcommand* command, G4String newValue);
0338 private:
0339 G4VisCommandSceneAddLogo2D (const G4VisCommandSceneAddLogo2D&);
0340 G4VisCommandSceneAddLogo2D& operator = (const G4VisCommandSceneAddLogo2D&);
0341 struct Logo2D {
0342 Logo2D
0343 (G4VisManager* vm, G4int size,
0344 G4double x, G4double y, G4Text::Layout layout):
0345 fpVisManager(vm), fSize(size),
0346 fX(x), fY(y), fLayout(layout) {}
0347 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0348 G4VisManager* fpVisManager;
0349 G4int fSize;
0350 G4double fX, fY;
0351 G4Text::Layout fLayout;
0352 };
0353 G4UIcommand* fpCommand;
0354 };
0355
0356 class G4VisCommandSceneAddMagneticField: public G4VVisCommandScene {
0357 public:
0358 G4VisCommandSceneAddMagneticField ();
0359 virtual ~G4VisCommandSceneAddMagneticField ();
0360 G4String GetCurrentValue (G4UIcommand* command);
0361 void SetNewValue (G4UIcommand* command, G4String newValue);
0362 private:
0363 G4VisCommandSceneAddMagneticField (const G4VisCommandSceneAddMagneticField&);
0364 G4VisCommandSceneAddMagneticField& operator = (const G4VisCommandSceneAddMagneticField&);
0365 G4UIcommand* fpCommand;
0366 };
0367
0368 class G4VisCommandSceneAddPSHits: public G4VVisCommandScene {
0369 public:
0370 G4VisCommandSceneAddPSHits ();
0371 virtual ~G4VisCommandSceneAddPSHits ();
0372 G4String GetCurrentValue (G4UIcommand* command);
0373 void SetNewValue (G4UIcommand* command, G4String newValue);
0374 private:
0375 G4VisCommandSceneAddPSHits (const G4VisCommandSceneAddPSHits&);
0376 G4VisCommandSceneAddPSHits& operator = (const G4VisCommandSceneAddPSHits&);
0377 G4UIcmdWithAString* fpCommand;
0378 };
0379
0380 class G4VisCommandSceneAddScale: public G4VVisCommandScene {
0381 public:
0382 G4VisCommandSceneAddScale ();
0383 virtual ~G4VisCommandSceneAddScale ();
0384 G4String GetCurrentValue (G4UIcommand* command);
0385 void SetNewValue (G4UIcommand* command, G4String newValue);
0386 private:
0387 G4VisCommandSceneAddScale (const G4VisCommandSceneAddScale&);
0388 G4VisCommandSceneAddScale& operator = (const G4VisCommandSceneAddScale&);
0389 struct Scale {
0390 enum Direction {x, y, z};
0391 Scale (const G4VisAttributes& visAttribs,
0392 G4double length, const G4Transform3D&,
0393 const G4String& annotation, G4double annotationSize,
0394 const G4Colour& annotationColour
0395 );
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411 ~Scale();
0412 void operator()(G4VGraphicsScene&,const G4ModelingParameters*);
0413 private:
0414 G4VisAttributes fVisAtts;
0415 G4Polyline fScaleLine, fTick11, fTick12, fTick21, fTick22;
0416 G4Text fText;
0417 };
0418 G4UIcommand* fpCommand;
0419 };
0420
0421 class G4VisCommandSceneAddText: public G4VVisCommandScene {
0422 public:
0423 G4VisCommandSceneAddText ();
0424 virtual ~G4VisCommandSceneAddText ();
0425 G4String GetCurrentValue (G4UIcommand* command);
0426 void SetNewValue (G4UIcommand* command, G4String newValue);
0427 private:
0428 G4VisCommandSceneAddText (const G4VisCommandSceneAddText&);
0429 G4VisCommandSceneAddText& operator = (const G4VisCommandSceneAddText&);
0430 G4UIcommand* fpCommand;
0431 };
0432
0433 class G4VisCommandSceneAddText2D: public G4VVisCommandScene {
0434 public:
0435 G4VisCommandSceneAddText2D ();
0436 virtual ~G4VisCommandSceneAddText2D ();
0437 G4String GetCurrentValue (G4UIcommand* command);
0438 void SetNewValue (G4UIcommand* command, G4String newValue);
0439 private:
0440 G4VisCommandSceneAddText2D (const G4VisCommandSceneAddText2D&);
0441 G4VisCommandSceneAddText2D& operator = (const G4VisCommandSceneAddText2D&);
0442 struct G4Text2D {
0443 G4Text2D(const G4Text&);
0444 void operator()(G4VGraphicsScene&, const G4ModelingParameters*);
0445 private:
0446 G4Text fText;
0447 };
0448 G4UIcommand* fpCommand;
0449 };
0450
0451 class G4VisCommandSceneAddTrajectories: public G4VVisCommandScene {
0452 public:
0453 G4VisCommandSceneAddTrajectories ();
0454 virtual ~G4VisCommandSceneAddTrajectories ();
0455 G4String GetCurrentValue (G4UIcommand* command);
0456 void SetNewValue (G4UIcommand* command, G4String newValue);
0457 private:
0458 G4VisCommandSceneAddTrajectories (const G4VisCommandSceneAddTrajectories&);
0459 G4VisCommandSceneAddTrajectories& operator =
0460 (const G4VisCommandSceneAddTrajectories&);
0461 G4UIcmdWithAString* fpCommand;
0462 };
0463
0464 class G4VisCommandSceneAddUserAction: public G4VVisCommandScene {
0465 public:
0466 G4VisCommandSceneAddUserAction ();
0467 virtual ~G4VisCommandSceneAddUserAction ();
0468 G4String GetCurrentValue (G4UIcommand* command);
0469 void SetNewValue (G4UIcommand* command, G4String newValue);
0470 private:
0471 G4VisCommandSceneAddUserAction (const G4VisCommandSceneAddUserAction&);
0472 G4VisCommandSceneAddUserAction& operator = (const G4VisCommandSceneAddUserAction&);
0473 enum ActionType {runDuration, endOfEvent, endOfRun};
0474 void AddVisAction(const G4String& name,G4VUserVisAction*,
0475 G4Scene*,ActionType,G4VisManager::Verbosity);
0476 G4UIcmdWithAString* fpCommand;
0477 };
0478
0479 class G4VisCommandSceneAddVolume: public G4VVisCommandScene {
0480 public:
0481 G4VisCommandSceneAddVolume ();
0482 virtual ~G4VisCommandSceneAddVolume ();
0483 G4String GetCurrentValue (G4UIcommand* command);
0484 void SetNewValue (G4UIcommand* command, G4String newValue);
0485 private:
0486 G4VisCommandSceneAddVolume (const G4VisCommandSceneAddVolume&);
0487 G4VisCommandSceneAddVolume& operator = (const G4VisCommandSceneAddVolume&);
0488 G4UIcommand* fpCommand;
0489 };
0490
0491 class G4VisCommandSceneAddPlotter: public G4VVisCommandScene {
0492 public:
0493 G4VisCommandSceneAddPlotter ();
0494 virtual ~G4VisCommandSceneAddPlotter ();
0495 G4String GetCurrentValue (G4UIcommand* command);
0496 void SetNewValue (G4UIcommand* command, G4String newValue);
0497 private:
0498 G4VisCommandSceneAddPlotter (const G4VisCommandSceneAddPlotter&);
0499 G4VisCommandSceneAddPlotter& operator = (const G4VisCommandSceneAddPlotter&);
0500 G4UIcommand* fpCommand;
0501 };
0502
0503 #endif