G4VisCommandsSceneAdd.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 
00029 // /vis/scene commands - John Allison  9th August 1998
00030 
00031 #ifndef G4VISCOMMANDSSCENEADD_HH
00032 #define G4VISCOMMANDSSCENEADD_HH
00033 
00034 #include "G4VisCommandsScene.hh"
00035 
00036 class G4UIcmdWithoutParameter;
00037 class G4UIcmdWithAString;
00038 
00039 #include "G4Transform3D.hh"
00040 #include "G4VisAttributes.hh"
00041 #include "G4Polyline.hh"
00042 #include "G4Text.hh"
00043 #include "G4Timer.hh"
00044 
00045 class G4VisCommandSceneAddArrow: public G4VVisCommandScene {
00046 public:
00047   G4VisCommandSceneAddArrow ();
00048   virtual ~G4VisCommandSceneAddArrow ();
00049   G4String GetCurrentValue (G4UIcommand* command);
00050   void SetNewValue (G4UIcommand* command, G4String newValue);
00051 private:
00052   G4VisCommandSceneAddArrow (const G4VisCommandSceneAddArrow&);
00053   G4VisCommandSceneAddArrow& operator = (const G4VisCommandSceneAddArrow&);
00054   G4UIcommand* fpCommand;
00055 };
00056 
00057 class G4VisCommandSceneAddArrow2D: public G4VVisCommandScene {
00058 public:
00059   G4VisCommandSceneAddArrow2D ();
00060   virtual ~G4VisCommandSceneAddArrow2D ();
00061   G4String GetCurrentValue (G4UIcommand* command);
00062   void SetNewValue (G4UIcommand* command, G4String newValue);
00063 private:
00064   G4VisCommandSceneAddArrow2D (const G4VisCommandSceneAddArrow2D&);
00065   G4VisCommandSceneAddArrow2D& operator = (const G4VisCommandSceneAddArrow2D&);
00066   struct Arrow2D {
00067     Arrow2D(G4double x1, G4double y1,
00068             G4double x2, G4double y2,
00069             G4double width, const G4Colour& colour);
00070     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00071     G4Polyline fShaftPolyline;
00072     G4Polyline fHeadPolyline;
00073     G4double fWidth;
00074     G4Colour fColour;
00075   };
00076   G4UIcommand* fpCommand;
00077 };
00078 
00079 class G4VisCommandSceneAddAxes: public G4VVisCommandScene {
00080 public:
00081   G4VisCommandSceneAddAxes ();
00082   virtual ~G4VisCommandSceneAddAxes ();
00083   G4String GetCurrentValue (G4UIcommand* command);
00084   void SetNewValue (G4UIcommand* command, G4String newValue);
00085 private:
00086   G4VisCommandSceneAddAxes (const G4VisCommandSceneAddAxes&);
00087   G4VisCommandSceneAddAxes& operator = (const G4VisCommandSceneAddAxes&);
00088   G4UIcommand* fpCommand;
00089 };
00090 
00091 class G4VisCommandSceneAddDate: public G4VVisCommandScene {
00092 public:
00093   G4VisCommandSceneAddDate ();
00094   virtual ~G4VisCommandSceneAddDate ();
00095   G4String GetCurrentValue (G4UIcommand* command);
00096   void SetNewValue (G4UIcommand* command, G4String newValue);
00097 private:
00098   G4VisCommandSceneAddDate (const G4VisCommandSceneAddDate&);
00099   G4VisCommandSceneAddDate& operator = (const G4VisCommandSceneAddDate&);
00100   struct Date {
00101     Date
00102     (G4VisManager* vm, G4int size,
00103      G4double x, G4double y, G4Text::Layout layout,
00104      const G4String& date):
00105       fpVisManager(vm), fSize(size),
00106       fX(x), fY(y), fLayout(layout), fDate(date) {}
00107     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00108     G4VisManager* fpVisManager;
00109     G4Timer fTimer;
00110     G4int fSize;
00111     G4double fX, fY;
00112     G4Text::Layout fLayout;
00113     G4String fDate;
00114   };
00115   G4UIcommand* fpCommand;
00116 };
00117 
00118 class G4VisCommandSceneAddDigis: public G4VVisCommandScene {
00119 public:
00120   G4VisCommandSceneAddDigis ();
00121   virtual ~G4VisCommandSceneAddDigis ();
00122   G4String GetCurrentValue (G4UIcommand* command);
00123   void SetNewValue (G4UIcommand* command, G4String newValue);
00124 private:
00125   G4VisCommandSceneAddDigis (const G4VisCommandSceneAddDigis&);
00126   G4VisCommandSceneAddDigis& operator = (const G4VisCommandSceneAddDigis&);
00127   G4UIcmdWithoutParameter* fpCommand;
00128 };
00129 
00130 class G4VisCommandSceneAddEventID: public G4VVisCommandScene {
00131 public:
00132   G4VisCommandSceneAddEventID ();
00133   virtual ~G4VisCommandSceneAddEventID ();
00134   G4String GetCurrentValue (G4UIcommand* command);
00135   void SetNewValue (G4UIcommand* command, G4String newValue);
00136 private:
00137   G4VisCommandSceneAddEventID (const G4VisCommandSceneAddEventID&);
00138   G4VisCommandSceneAddEventID& operator = (const G4VisCommandSceneAddEventID&);
00139   struct EventID {
00140     EventID(G4VisManager* vm, G4int size,
00141             G4double x, G4double y, G4Text::Layout layout):
00142       fpVisManager(vm), fSize(size),
00143       fX(x), fY(y), fLayout(layout) {}
00144     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00145     G4VisManager* fpVisManager;
00146     G4int fSize;
00147     G4double fX, fY;
00148     G4Text::Layout fLayout;
00149   };
00150   G4UIcommand* fpCommand;
00151 };
00152 
00153 class G4VisCommandSceneAddFrame: public G4VVisCommandScene {
00154 public:
00155   G4VisCommandSceneAddFrame ();
00156   virtual ~G4VisCommandSceneAddFrame ();
00157   G4String GetCurrentValue (G4UIcommand* command);
00158   void SetNewValue (G4UIcommand* command, G4String newValue);
00159 private:
00160   G4VisCommandSceneAddFrame (const G4VisCommandSceneAddFrame&);
00161   G4VisCommandSceneAddFrame& operator = (const G4VisCommandSceneAddFrame&);
00162   struct Frame {
00163     Frame(G4double size, G4double width, const G4Colour& colour):
00164       fSize(size), fWidth(width), fColour(colour) {}
00165     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00166     G4double fSize;
00167     G4double fWidth;
00168     G4Colour fColour;
00169   };
00170   G4UIcommand* fpCommand;
00171 };
00172 
00173 class G4VisCommandSceneAddGhosts: public G4VVisCommandScene {
00174 public:
00175   G4VisCommandSceneAddGhosts ();
00176   virtual ~G4VisCommandSceneAddGhosts ();
00177   G4String GetCurrentValue (G4UIcommand* command);
00178   void SetNewValue (G4UIcommand* command, G4String newValue);
00179 private:
00180   G4VisCommandSceneAddGhosts (const G4VisCommandSceneAddGhosts&);
00181   G4VisCommandSceneAddGhosts& operator =
00182   (const G4VisCommandSceneAddGhosts&);
00183   G4UIcmdWithAString* fpCommand;
00184 };
00185 
00186 class G4VisCommandSceneAddHits: public G4VVisCommandScene {
00187 public:
00188   G4VisCommandSceneAddHits ();
00189   virtual ~G4VisCommandSceneAddHits ();
00190   G4String GetCurrentValue (G4UIcommand* command);
00191   void SetNewValue (G4UIcommand* command, G4String newValue);
00192 private:
00193   G4VisCommandSceneAddHits (const G4VisCommandSceneAddHits&);
00194   G4VisCommandSceneAddHits& operator = (const G4VisCommandSceneAddHits&);
00195   G4UIcmdWithoutParameter* fpCommand;
00196 };
00197 
00198 class G4VisCommandSceneAddLine: public G4VVisCommandScene {
00199 public:
00200   G4VisCommandSceneAddLine ();
00201   virtual ~G4VisCommandSceneAddLine ();
00202   G4String GetCurrentValue (G4UIcommand* command);
00203   void SetNewValue (G4UIcommand* command, G4String newValue);
00204 private:
00205   G4VisCommandSceneAddLine (const G4VisCommandSceneAddLine&);
00206   G4VisCommandSceneAddLine& operator = (const G4VisCommandSceneAddLine&);
00207   struct Line {
00208     Line(G4double x1, G4double y1, G4double z1,
00209          G4double x2, G4double y2, G4double z2,
00210          G4double width, const G4Colour& colour);
00211     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00212     G4Polyline fPolyline;
00213     G4double fWidth;
00214     G4Colour fColour;
00215   };
00216   G4UIcommand* fpCommand;
00217 };
00218 
00219 class G4VisCommandSceneAddLine2D: public G4VVisCommandScene {
00220 public:
00221   G4VisCommandSceneAddLine2D ();
00222   virtual ~G4VisCommandSceneAddLine2D ();
00223   G4String GetCurrentValue (G4UIcommand* command);
00224   void SetNewValue (G4UIcommand* command, G4String newValue);
00225 private:
00226   G4VisCommandSceneAddLine2D (const G4VisCommandSceneAddLine2D&);
00227   G4VisCommandSceneAddLine2D& operator = (const G4VisCommandSceneAddLine2D&);
00228   struct Line2D {
00229     Line2D(G4double x1, G4double y1,
00230          G4double x2, G4double y2,
00231          G4double width, const G4Colour& colour);
00232     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00233     G4Polyline fPolyline;
00234     G4double fWidth;
00235     G4Colour fColour;
00236   };
00237   G4UIcommand* fpCommand;
00238 };
00239 
00240 class G4VisCommandSceneAddLogicalVolume: public G4VVisCommandScene {
00241 public:
00242   G4VisCommandSceneAddLogicalVolume ();
00243   virtual ~G4VisCommandSceneAddLogicalVolume ();
00244   G4String GetCurrentValue (G4UIcommand* command);
00245   void SetNewValue (G4UIcommand* command, G4String newValue);
00246 private:
00247   G4VisCommandSceneAddLogicalVolume (const G4VisCommandSceneAddLogicalVolume&);
00248   G4VisCommandSceneAddLogicalVolume& operator =
00249   (const G4VisCommandSceneAddLogicalVolume&);
00250   G4UIcommand* fpCommand;
00251 };
00252 
00253 class G4VisCommandSceneAddLogo: public G4VVisCommandScene {
00254 public:
00255   G4VisCommandSceneAddLogo ();
00256   virtual ~G4VisCommandSceneAddLogo ();
00257   G4String GetCurrentValue (G4UIcommand* command);
00258   void SetNewValue (G4UIcommand* command, G4String newValue);
00259 private:
00260   G4VisCommandSceneAddLogo (const G4VisCommandSceneAddLogo&);
00261   G4VisCommandSceneAddLogo& operator = (const G4VisCommandSceneAddLogo&);
00262   // Direction of outward-facing normal to front face of logo.
00263   enum Direction {X, minusX, Y, minusY, Z, minusZ};
00264   struct G4Logo {
00265     G4Logo(G4double height, const G4VisAttributes&);
00266     ~G4Logo();
00267     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00268   private:
00269     G4double fHeight;
00270     G4VisAttributes fVisAtts;
00271     G4Polyhedron *fpG, *fp4;
00272   };
00273   G4UIcommand* fpCommand;
00274 };
00275 
00276 class G4VisCommandSceneAddLogo2D: public G4VVisCommandScene {
00277 public:
00278   G4VisCommandSceneAddLogo2D ();
00279   virtual ~G4VisCommandSceneAddLogo2D ();
00280   G4String GetCurrentValue (G4UIcommand* command);
00281   void SetNewValue (G4UIcommand* command, G4String newValue);
00282 private:
00283   G4VisCommandSceneAddLogo2D (const G4VisCommandSceneAddLogo2D&);
00284   G4VisCommandSceneAddLogo2D& operator = (const G4VisCommandSceneAddLogo2D&);
00285   struct Logo2D {
00286     Logo2D
00287     (G4VisManager* vm, G4int size,
00288      G4double x, G4double y, G4Text::Layout layout):
00289       fpVisManager(vm), fSize(size),
00290       fX(x), fY(y), fLayout(layout) {}
00291     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00292     G4VisManager* fpVisManager;
00293     G4int fSize;
00294     G4double fX, fY;
00295     G4Text::Layout fLayout;
00296   };
00297   G4UIcommand* fpCommand;
00298 };
00299 
00300 class G4VisCommandSceneAddPSHits: public G4VVisCommandScene {
00301 public:
00302   G4VisCommandSceneAddPSHits ();
00303   virtual ~G4VisCommandSceneAddPSHits ();
00304   G4String GetCurrentValue (G4UIcommand* command);
00305   void SetNewValue (G4UIcommand* command, G4String newValue);
00306 private:
00307   G4VisCommandSceneAddPSHits (const G4VisCommandSceneAddPSHits&);
00308   G4VisCommandSceneAddPSHits& operator = (const G4VisCommandSceneAddPSHits&);
00309   G4UIcmdWithAString* fpCommand;
00310 };
00311 
00312 class G4VisCommandSceneAddScale: public G4VVisCommandScene {
00313 public:
00314   G4VisCommandSceneAddScale ();
00315   virtual ~G4VisCommandSceneAddScale ();
00316   G4String GetCurrentValue (G4UIcommand* command);
00317   void SetNewValue (G4UIcommand* command, G4String newValue);
00318 private:
00319   G4VisCommandSceneAddScale (const G4VisCommandSceneAddScale&);
00320   G4VisCommandSceneAddScale& operator = (const G4VisCommandSceneAddScale&);
00321   G4UIcommand* fpCommand;
00322 };
00323 
00324 class G4VisCommandSceneAddText: public G4VVisCommandScene {
00325 public:
00326   G4VisCommandSceneAddText ();
00327   virtual ~G4VisCommandSceneAddText ();
00328   G4String GetCurrentValue (G4UIcommand* command);
00329   void SetNewValue (G4UIcommand* command, G4String newValue);
00330 private:
00331   G4VisCommandSceneAddText (const G4VisCommandSceneAddText&);
00332   G4VisCommandSceneAddText& operator = (const G4VisCommandSceneAddText&);
00333   G4UIcommand* fpCommand;
00334 };
00335 
00336 class G4VisCommandSceneAddText2D: public G4VVisCommandScene {
00337 public:
00338   G4VisCommandSceneAddText2D ();
00339   virtual ~G4VisCommandSceneAddText2D ();
00340   G4String GetCurrentValue (G4UIcommand* command);
00341   void SetNewValue (G4UIcommand* command, G4String newValue);
00342 private:
00343   G4VisCommandSceneAddText2D (const G4VisCommandSceneAddText2D&);
00344   G4VisCommandSceneAddText2D& operator = (const G4VisCommandSceneAddText2D&);
00345   struct G4Text2D {
00346     G4Text2D(const G4Text&);
00347     void operator()(G4VGraphicsScene&, const G4Transform3D&);
00348   private:
00349     G4Text fText;
00350   };
00351   G4UIcommand* fpCommand;
00352 };
00353 
00354 class G4VisCommandSceneAddTrajectories: public G4VVisCommandScene {
00355 public:
00356   G4VisCommandSceneAddTrajectories ();
00357   virtual ~G4VisCommandSceneAddTrajectories ();
00358   G4String GetCurrentValue (G4UIcommand* command);
00359   void SetNewValue (G4UIcommand* command, G4String newValue);
00360 private:
00361   G4VisCommandSceneAddTrajectories (const G4VisCommandSceneAddTrajectories&);
00362   G4VisCommandSceneAddTrajectories& operator =
00363   (const G4VisCommandSceneAddTrajectories&);
00364   G4UIcmdWithAString* fpCommand;
00365 };
00366 
00367 class G4VisCommandSceneAddUserAction: public G4VVisCommandScene {
00368 public:
00369   G4VisCommandSceneAddUserAction ();
00370   virtual ~G4VisCommandSceneAddUserAction ();
00371   G4String GetCurrentValue (G4UIcommand* command);
00372   void SetNewValue (G4UIcommand* command, G4String newValue);
00373 private:
00374   G4VisCommandSceneAddUserAction (const G4VisCommandSceneAddUserAction&);
00375   G4VisCommandSceneAddUserAction& operator = (const G4VisCommandSceneAddUserAction&);
00376   enum ActionType {runDuration, endOfEvent, endOfRun};
00377   void AddVisAction(const G4String& name,G4VUserVisAction*,
00378                     G4Scene*,ActionType,G4VisManager::Verbosity);
00379   G4UIcmdWithAString* fpCommand;
00380 };
00381 
00382 class G4VisCommandSceneAddVolume: public G4VVisCommandScene {
00383 public:
00384   G4VisCommandSceneAddVolume ();
00385   virtual ~G4VisCommandSceneAddVolume ();
00386   G4String GetCurrentValue (G4UIcommand* command);
00387   void SetNewValue (G4UIcommand* command, G4String newValue);
00388 private:
00389   G4VisCommandSceneAddVolume (const G4VisCommandSceneAddVolume&);
00390   G4VisCommandSceneAddVolume& operator = (const G4VisCommandSceneAddVolume&);
00391   G4UIcommand* fpCommand;
00392 };
00393 
00394 #endif

Generated on Mon May 27 17:50:15 2013 for Geant4 by  doxygen 1.4.7