Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:59

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 // 
0029 // John Allison  15th May 2014
0030 // A base class for "pseudo" scenes/graphics systems.
0031 
0032 #ifndef G4PSEUDOSCENE_HH
0033 #define G4PSEUDOSCENE_HH
0034 
0035 #include "G4VGraphicsScene.hh"
0036 #include "G4Box.hh"
0037 #include "G4Cons.hh"
0038 #include "G4Orb.hh"
0039 #include "G4Para.hh"
0040 #include "G4Sphere.hh"
0041 #include "G4Torus.hh"
0042 #include "G4Trap.hh"
0043 #include "G4Trd.hh"
0044 #include "G4Tubs.hh"
0045 #include "G4Ellipsoid.hh"
0046 #include "G4Polycone.hh"
0047 #include "G4Polyhedra.hh"
0048 #include "G4TessellatedSolid.hh"
0049 
0050 class G4PseudoScene: public G4VGraphicsScene {
0051 
0052 public:
0053 
0054   G4PseudoScene()          = default;
0055   virtual ~G4PseudoScene() = default;
0056   void PreAddSolid (const G4Transform3D& objectTransformation,
0057                     const G4VisAttributes& visAttributes) {
0058     fpCurrentObjectTransformation = &objectTransformation;
0059     fpVisAttributes = &visAttributes;
0060   }
0061   void PostAddSolid () {}
0062   // From geometry/solids/CSG
0063   void AddSolid (const G4Box&    solid) {ProcessVolume (solid);}
0064   void AddSolid (const G4Cons&   solid) {ProcessVolume (solid);}
0065   void AddSolid (const G4Orb&    solid) {ProcessVolume (solid);}
0066   void AddSolid (const G4Para&   solid) {ProcessVolume (solid);}
0067   void AddSolid (const G4Sphere& solid) {ProcessVolume (solid);}
0068   void AddSolid (const G4Torus&  solid) {ProcessVolume (solid);}
0069   void AddSolid (const G4Trap&   solid) {ProcessVolume (solid);}
0070   void AddSolid (const G4Trd&    solid) {ProcessVolume (solid);}
0071   void AddSolid (const G4Tubs&   solid) {ProcessVolume (solid);}
0072   // From geometry/solids/specific
0073   void AddSolid (const G4Ellipsoid&        solid) {ProcessVolume (solid);}
0074   void AddSolid (const G4Polycone&         solid) {ProcessVolume (solid);}
0075   void AddSolid (const G4Polyhedra&        solid) {ProcessVolume (solid);}
0076   void AddSolid (const G4TessellatedSolid& solid) {ProcessVolume (solid);}
0077   // For solids not above
0078   void AddSolid (const G4VSolid& solid) {ProcessVolume (solid);}
0079   // Compounds
0080   void AddCompound (const G4VTrajectory&) {}
0081   void AddCompound (const G4VHit&)        {}
0082   void AddCompound (const G4VDigi&)       {}
0083   void AddCompound (const G4THitsMap<G4double>&)     {}
0084   void AddCompound (const G4THitsMap<G4StatDouble>&) {}
0085   void AddCompound (const G4Mesh&);  // Catches mesh if special mesh rendering set
0086   // Primitives
0087   void BeginPrimitives   (const G4Transform3D&) {}
0088   void EndPrimitives     ()                     {}
0089   void BeginPrimitives2D (const G4Transform3D&) {}
0090   void EndPrimitives2D   ()                     {}
0091   void AddPrimitive (const G4Polyline&)   {}
0092   void AddPrimitive (const G4Text&)       {}
0093   void AddPrimitive (const G4Circle&)     {}
0094   void AddPrimitive (const G4Square&)     {}
0095   void AddPrimitive (const G4Polymarker&) {}
0096   void AddPrimitive (const G4Polyhedron&) {}
0097 
0098   void AddPrimitive (const G4Plotter&)    {}
0099 
0100 protected:
0101 
0102   virtual void ProcessVolume (const G4VSolid&);
0103   const G4Transform3D* fpCurrentObjectTransformation = nullptr;
0104   const G4VisAttributes* fpVisAttributes = nullptr;
0105 };
0106 
0107 #endif