G4VisCommandsGeometrySet.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/geometry commands - John Allison  31st January 2006
00030 
00031 #ifndef G4VISCOMMANDSGEOMETRYSET_HH
00032 #define G4VISCOMMANDSGEOMETRYSET_HH
00033 
00034 #include "G4VisCommandsGeometry.hh"
00035 
00036 class G4UIcommand;
00037 class G4VisAttributes;
00038 
00039 class G4VVisCommandGeometrySetFunction {
00040 public:
00041   virtual ~G4VVisCommandGeometrySetFunction() {}
00042   virtual void operator()(G4VisAttributes*) const = 0;
00043 };
00044 
00045 class G4VisCommandGeometrySetColourFunction:
00046   public G4VVisCommandGeometrySetFunction {
00047 public:
00048   virtual ~G4VisCommandGeometrySetColourFunction() {}
00049   G4VisCommandGeometrySetColourFunction
00050   (const G4Colour& colour):
00051     fColour(colour) {}
00052   void operator()
00053     (G4VisAttributes* visAtts) const
00054   {visAtts->SetColour(fColour);}
00055 private:
00056   const G4Colour& fColour;
00057 };
00058 
00059 class G4VisCommandGeometrySetDaughtersInvisibleFunction:
00060   public G4VVisCommandGeometrySetFunction {
00061 public:
00062   virtual ~G4VisCommandGeometrySetDaughtersInvisibleFunction() {}
00063   G4VisCommandGeometrySetDaughtersInvisibleFunction
00064   (G4bool daughtersInvisible):
00065     fDaughtersInvisible(daughtersInvisible) {}
00066   void operator()
00067     (G4VisAttributes* visAtts) const
00068   {visAtts->SetDaughtersInvisible(fDaughtersInvisible);}
00069 private:
00070   G4bool fDaughtersInvisible;
00071 };
00072 
00073 class G4VisCommandGeometrySetForceAuxEdgeVisibleFunction:
00074   public G4VVisCommandGeometrySetFunction {
00075 public:
00076   virtual ~G4VisCommandGeometrySetForceAuxEdgeVisibleFunction() {}
00077   G4VisCommandGeometrySetForceAuxEdgeVisibleFunction
00078   (G4bool forceAuxEdgeVisible):
00079     fForceAuxEdgeVisible(forceAuxEdgeVisible) {}
00080   void operator()
00081     (G4VisAttributes* visAtts) const
00082   {visAtts->SetForceAuxEdgeVisible(fForceAuxEdgeVisible);}
00083 private:
00084   G4bool fForceAuxEdgeVisible;
00085 };
00086 
00087 class G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction:
00088   public G4VVisCommandGeometrySetFunction {
00089 public:
00090   virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction() {}
00091   G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction
00092   (G4int lineSegmentsPerCircle):
00093     fLineSegmentsPerCircle(lineSegmentsPerCircle) {}
00094   void operator()
00095     (G4VisAttributes* visAtts) const
00096   {visAtts->SetForceLineSegmentsPerCircle(fLineSegmentsPerCircle);}
00097 private:
00098   G4int fLineSegmentsPerCircle;
00099 };
00100 
00101 class G4VisCommandGeometrySetForceSolidFunction:
00102   public G4VVisCommandGeometrySetFunction {
00103 public:
00104   virtual ~G4VisCommandGeometrySetForceSolidFunction() {}
00105   G4VisCommandGeometrySetForceSolidFunction
00106   (G4bool forceSolid):
00107     fForceSolid(forceSolid) {}
00108   void operator()
00109     (G4VisAttributes* visAtts) const
00110   {visAtts->SetForceSolid(fForceSolid);}
00111 private:
00112   G4bool fForceSolid;
00113 };
00114 
00115 class G4VisCommandGeometrySetForceWireframeFunction:
00116   public G4VVisCommandGeometrySetFunction {
00117 public:
00118   virtual ~G4VisCommandGeometrySetForceWireframeFunction() {}
00119   G4VisCommandGeometrySetForceWireframeFunction
00120   (G4bool forceWireframe):
00121     fForceWireframe(forceWireframe) {}
00122   void operator()
00123     (G4VisAttributes* visAtts) const
00124   {visAtts->SetForceWireframe(fForceWireframe);}
00125 private:
00126   G4bool fForceWireframe;
00127 };
00128 
00129 class G4VisCommandGeometrySetLineStyleFunction:
00130   public G4VVisCommandGeometrySetFunction {
00131 public:
00132   virtual ~G4VisCommandGeometrySetLineStyleFunction() {}
00133   G4VisCommandGeometrySetLineStyleFunction
00134   (G4VisAttributes::LineStyle lineStyle):
00135     fLineStyle(lineStyle) {}
00136   void operator()
00137     (G4VisAttributes* visAtts) const
00138   {visAtts->SetLineStyle(fLineStyle);}
00139 private:
00140   G4VisAttributes::LineStyle fLineStyle;
00141 };
00142 
00143 class G4VisCommandGeometrySetLineWidthFunction:
00144   public G4VVisCommandGeometrySetFunction {
00145 public:
00146   virtual ~G4VisCommandGeometrySetLineWidthFunction() {}
00147   G4VisCommandGeometrySetLineWidthFunction
00148   (G4double lineWidth):
00149     fLineWidth(lineWidth) {}
00150   void operator()
00151     (G4VisAttributes* visAtts) const
00152   {visAtts->SetLineWidth(fLineWidth);}
00153 private:
00154   G4double fLineWidth;
00155 };
00156 
00157 class G4VisCommandGeometrySetVisibilityFunction:
00158   public G4VVisCommandGeometrySetFunction {
00159 public:
00160   virtual ~G4VisCommandGeometrySetVisibilityFunction() {}
00161   G4VisCommandGeometrySetVisibilityFunction
00162   (G4bool visibility):
00163     fVisibility(visibility) {}
00164   void operator()
00165     (G4VisAttributes* visAtts) const
00166   {visAtts->SetVisibility(fVisibility);}
00167 private:
00168   G4bool fVisibility;
00169 };
00170 
00171 class G4VVisCommandGeometrySet: public G4VVisCommandGeometry {
00172 protected:
00173   void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction&,
00174            G4int requestedDepth);
00175   void SetLVVisAtts(G4LogicalVolume*, const G4VVisCommandGeometrySetFunction&,
00176                     G4int depth, G4int requestedDepth);
00177 };
00178 
00179 class G4VisCommandGeometrySetColour: public G4VVisCommandGeometrySet {
00180 public:
00181   G4VisCommandGeometrySetColour ();
00182   virtual ~G4VisCommandGeometrySetColour ();
00183   G4String GetCurrentValue (G4UIcommand* command);
00184   void SetNewValue (G4UIcommand* command, G4String newValue);
00185 private:
00186   G4VisCommandGeometrySetColour (const G4VisCommandGeometrySetColour&);
00187   G4VisCommandGeometrySetColour& operator = (const G4VisCommandGeometrySetColour&);
00188   G4UIcommand* fpCommand;
00189 };
00190 
00191 class G4VisCommandGeometrySetDaughtersInvisible:
00192   public G4VVisCommandGeometrySet {
00193 public:
00194   G4VisCommandGeometrySetDaughtersInvisible ();
00195   virtual ~G4VisCommandGeometrySetDaughtersInvisible ();
00196   G4String GetCurrentValue (G4UIcommand* command);
00197   void SetNewValue (G4UIcommand* command, G4String newValue);
00198 private:
00199   G4VisCommandGeometrySetDaughtersInvisible
00200   (const G4VisCommandGeometrySetDaughtersInvisible&);
00201   G4VisCommandGeometrySetDaughtersInvisible& operator=
00202   (const G4VisCommandGeometrySetDaughtersInvisible&);
00203   G4UIcommand* fpCommand;
00204 };
00205 
00206 class G4VisCommandGeometrySetForceAuxEdgeVisible:
00207   public G4VVisCommandGeometrySet {
00208 public:
00209   G4VisCommandGeometrySetForceAuxEdgeVisible ();
00210   virtual ~G4VisCommandGeometrySetForceAuxEdgeVisible ();
00211   G4String GetCurrentValue (G4UIcommand* command);
00212   void SetNewValue (G4UIcommand* command, G4String newValue);
00213 private:
00214   G4VisCommandGeometrySetForceAuxEdgeVisible
00215   (const G4VisCommandGeometrySetForceAuxEdgeVisible&);
00216   G4VisCommandGeometrySetForceAuxEdgeVisible& operator=
00217   (const G4VisCommandGeometrySetForceAuxEdgeVisible&);
00218   G4UIcommand* fpCommand;
00219 };
00220 
00221 class G4VisCommandGeometrySetForceSolid:
00222   public G4VVisCommandGeometrySet {
00223 public:
00224   G4VisCommandGeometrySetForceSolid ();
00225   virtual ~G4VisCommandGeometrySetForceSolid ();
00226   G4String GetCurrentValue (G4UIcommand* command);
00227   void SetNewValue (G4UIcommand* command, G4String newValue);
00228 private:
00229   G4VisCommandGeometrySetForceSolid
00230   (const G4VisCommandGeometrySetForceSolid&);
00231   G4VisCommandGeometrySetForceSolid& operator=
00232   (const G4VisCommandGeometrySetForceSolid&);
00233   G4UIcommand* fpCommand;
00234 };
00235 
00236 class G4VisCommandGeometrySetForceLineSegmentsPerCircle:
00237   public G4VVisCommandGeometrySet {
00238 public:
00239   G4VisCommandGeometrySetForceLineSegmentsPerCircle ();
00240   virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircle ();
00241   G4String GetCurrentValue (G4UIcommand* command);
00242   void SetNewValue (G4UIcommand* command, G4String newValue);
00243 private:
00244   G4VisCommandGeometrySetForceLineSegmentsPerCircle
00245   (const G4VisCommandGeometrySetForceLineSegmentsPerCircle&);
00246   G4VisCommandGeometrySetForceLineSegmentsPerCircle& operator=
00247   (const G4VisCommandGeometrySetForceLineSegmentsPerCircle&);
00248   G4UIcommand* fpCommand;
00249 };
00250 
00251 class G4VisCommandGeometrySetForceWireframe:
00252   public G4VVisCommandGeometrySet {
00253 public:
00254   G4VisCommandGeometrySetForceWireframe ();
00255   virtual ~G4VisCommandGeometrySetForceWireframe ();
00256   G4String GetCurrentValue (G4UIcommand* command);
00257   void SetNewValue (G4UIcommand* command, G4String newValue);
00258 private:
00259   G4VisCommandGeometrySetForceWireframe
00260   (const G4VisCommandGeometrySetForceWireframe&);
00261   G4VisCommandGeometrySetForceWireframe& operator=
00262   (const G4VisCommandGeometrySetForceWireframe&);
00263   G4UIcommand* fpCommand;
00264 };
00265 
00266 class G4VisCommandGeometrySetLineStyle:
00267   public G4VVisCommandGeometrySet {
00268 public:
00269   G4VisCommandGeometrySetLineStyle ();
00270   virtual ~G4VisCommandGeometrySetLineStyle ();
00271   G4String GetCurrentValue (G4UIcommand* command);
00272   void SetNewValue (G4UIcommand* command, G4String newValue);
00273 private:
00274   G4VisCommandGeometrySetLineStyle
00275   (const G4VisCommandGeometrySetLineStyle&);
00276   G4VisCommandGeometrySetLineStyle& operator=
00277   (const G4VisCommandGeometrySetLineStyle&);
00278   G4UIcommand* fpCommand;
00279 };
00280 
00281 class G4VisCommandGeometrySetLineWidth:
00282   public G4VVisCommandGeometrySet {
00283 public:
00284   G4VisCommandGeometrySetLineWidth ();
00285   virtual ~G4VisCommandGeometrySetLineWidth ();
00286   G4String GetCurrentValue (G4UIcommand* command);
00287   void SetNewValue (G4UIcommand* command, G4String newValue);
00288 private:
00289   G4VisCommandGeometrySetLineWidth
00290   (const G4VisCommandGeometrySetLineWidth&);
00291   G4VisCommandGeometrySetLineWidth& operator=
00292   (const G4VisCommandGeometrySetLineWidth&);
00293   G4UIcommand* fpCommand;
00294 };
00295 
00296 class G4VisCommandGeometrySetVisibility: public G4VVisCommandGeometrySet {
00297 public:
00298   G4VisCommandGeometrySetVisibility ();
00299   virtual ~G4VisCommandGeometrySetVisibility ();
00300   G4String GetCurrentValue (G4UIcommand* command);
00301   void SetNewValue (G4UIcommand* command, G4String newValue);
00302   void SetNewValueOnLV (G4LogicalVolume* pLV, G4int,G4bool);
00303 private:
00304   G4VisCommandGeometrySetVisibility (const G4VisCommandGeometrySetVisibility&);
00305   G4VisCommandGeometrySetVisibility& operator = (const G4VisCommandGeometrySetVisibility&);
00306   G4UIcommand* fpCommand;
00307 };
00308 
00309 #endif

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