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] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /graphics_reps/include/G4VGraphicsScene.hh (Version 11.3.0) and /graphics_reps/include/G4VGraphicsScene.hh (Version 8.0.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
 26 //                                                 23 //
                                                   >>  24 // $Id: G4VGraphicsScene.hh,v 1.5 2005/11/10 15:39:16 allison Exp $
                                                   >>  25 // GEANT4 tag $Name: geant4-08-00-patch-01 $
 27 // John Allison  19th July 1996                    26 // John Allison  19th July 1996
 28 //                                                 27 //
 29 // Class Description:                              28 // Class Description:
 30 // Abstract interface class for a graphics sce     29 // Abstract interface class for a graphics scene handler.
 31 // It is a minimal scene handler for the GEANT     30 // It is a minimal scene handler for the GEANT4 kernel.
 32 // See G4VSceneHandler for a fuller descriptio     31 // See G4VSceneHandler for a fuller description.  G4VSceneHandler is
 33 // the full abstract interface to graphics sys     32 // the full abstract interface to graphics systems.
 34                                                    33 
 35 #ifndef G4VGRAPHICSSCENE_HH                        34 #ifndef G4VGRAPHICSSCENE_HH
 36 #define G4VGRAPHICSSCENE_HH                        35 #define G4VGRAPHICSSCENE_HH
 37                                                    36 
 38 #include "globals.hh"                          << 
 39 #include "G4Transform3D.hh"                    << 
 40                                                << 
 41 class G4VisAttributes;                             37 class G4VisAttributes;
 42 class G4VSolid;                                    38 class G4VSolid;
 43 class G4Box;                                       39 class G4Box;
 44 class G4Cons;                                      40 class G4Cons;
 45 class G4Orb;                                   << 
 46 class G4Para;                                  << 
 47 class G4Torus;                                 << 
 48 class G4Trap;                                  << 
 49 class G4Trd;                                   << 
 50 class G4Tubs;                                      41 class G4Tubs;
                                                   >>  42 class G4Trd;
                                                   >>  43 class G4Trap;
 51 class G4Sphere;                                    44 class G4Sphere;
 52                                                << 
 53 class G4Ellipsoid;                                 45 class G4Ellipsoid;
                                                   >>  46 class G4Para;
                                                   >>  47 class G4Torus;
                                                   >>  48 class G4PhysicalVolumeModel;
 54 class G4Polycone;                                  49 class G4Polycone;
 55 class G4Polyhedra;                                 50 class G4Polyhedra;
 56 class G4TessellatedSolid;                      << 
 57                                                << 
 58 class G4PhysicalVolumeModel;                   << 
 59 class G4VTrajectory;                               51 class G4VTrajectory;
 60 class G4VHit;                                      52 class G4VHit;
 61 class G4VDigi;                                 << 
 62 template <typename T> class G4THitsMap;        << 
 63 class G4Polyline;                                  53 class G4Polyline;
                                                   >>  54 class G4Scale;
 64 class G4Text;                                      55 class G4Text;
 65 class G4Circle;                                    56 class G4Circle;
 66 class G4Square;                                    57 class G4Square;
 67 class G4Polymarker;                                58 class G4Polymarker;
 68 class G4Polyhedron;                                59 class G4Polyhedron;
 69 class G4VisExtent;                             <<  60 class G4NURBS;
 70 class G4StatDouble;                            <<  61 
 71 class G4Mesh;                                  <<  62 #include "G4Transform3D.hh"
 72 class G4Plotter;                               << 
 73                                                    63 
 74 class G4VGraphicsScene {                           64 class G4VGraphicsScene {
 75                                                    65 
 76 public: // With description                        66 public: // With description
 77                                                    67 
 78   G4VGraphicsScene();                          << 
 79   virtual ~G4VGraphicsScene();                 << 
 80                                                << 
 81   ////////////////////////////////////////////     68   ///////////////////////////////////////////////////////////////////
 82   // Methods for adding solids to the scene ha     69   // Methods for adding solids to the scene handler.  They
 83   // must always be called in the triplet PreA     70   // must always be called in the triplet PreAddSolid, AddSolid and
 84   // PostAddSolid.  The transformation and vis     71   // PostAddSolid.  The transformation and visualization attributes
 85   // must be set by the call to PreAddSolid.       72   // must be set by the call to PreAddSolid.  A possible default
 86   // implementation is to request the solid to     73   // implementation is to request the solid to provide a G4Polyhedron
 87   // or similar primitive - see, for example,      74   // or similar primitive - see, for example, G4VSceneHandler in the
 88   // Visualization Category.                       75   // Visualization Category.
 89                                                    76 
 90   virtual void PreAddSolid (const G4Transform3     77   virtual void PreAddSolid (const G4Transform3D& objectTransformation,
 91                             const G4VisAttribu <<  78           const G4VisAttributes& visAttribs) = 0;
 92   // objectTransformation is the transformatio     79   // objectTransformation is the transformation in the world
 93   // coordinate system of the object about to      80   // coordinate system of the object about to be added, and
 94   // visAttribs is its visualization attribute     81   // visAttribs is its visualization attributes.
 95                                                    82 
 96   virtual void PostAddSolid () = 0;                83   virtual void PostAddSolid () = 0;
 97                                                    84 
 98   // From geometry/solids/CSG                  << 
 99   virtual void AddSolid (const G4Box&)       =     85   virtual void AddSolid (const G4Box&)       = 0;
100   virtual void AddSolid (const G4Cons&)      =     86   virtual void AddSolid (const G4Cons&)      = 0;
101   virtual void AddSolid (const G4Orb&)       = <<  87   virtual void AddSolid (const G4Tubs&)      = 0;
102   virtual void AddSolid (const G4Para&)      = <<  88   virtual void AddSolid (const G4Trd&)       = 0;
                                                   >>  89   virtual void AddSolid (const G4Trap&)      = 0;
103   virtual void AddSolid (const G4Sphere&)    =     90   virtual void AddSolid (const G4Sphere&)    = 0;
                                                   >>  91   virtual void AddSolid (const G4Para&)      = 0;
104   virtual void AddSolid (const G4Torus&)     =     92   virtual void AddSolid (const G4Torus&)     = 0;
105   virtual void AddSolid (const G4Trap&)      = <<  93   virtual void AddSolid (const G4Polycone&)  = 0;
106   virtual void AddSolid (const G4Trd&)       = <<  94   virtual void AddSolid (const G4Polyhedra&) = 0;
107   virtual void AddSolid (const G4Tubs&)      = <<  95   virtual void AddSolid (const G4VSolid&)    = 0;  // For solids not above.
108                                                << 
109   // From geometry/solids/specific             << 
110   virtual void AddSolid (const G4Ellipsoid&)   << 
111   virtual void AddSolid (const G4Polycone&)    << 
112   virtual void AddSolid (const G4Polyhedra&)   << 
113   virtual void AddSolid (const G4TessellatedSo << 
114                                                << 
115   // For solids not above                      << 
116   virtual void AddSolid (const G4VSolid&) = 0; << 
117                                                    96 
118   ////////////////////////////////////////////     97   ///////////////////////////////////////////////////////////////////
119   // Methods for adding "compound" GEANT4 obje     98   // Methods for adding "compound" GEANT4 objects to the scene
120   // handler.  These methods may either (a) in     99   // handler.  These methods may either (a) invoke "user code" that
121   // uses the "user interface", G4VVisManager     100   // uses the "user interface", G4VVisManager (see, for example,
122   // G4VSceneHandler in the Visualization Cate    101   // G4VSceneHandler in the Visualization Category, which for
123   // trajectories uses G4VTrajectory::DrawTraj    102   // trajectories uses G4VTrajectory::DrawTrajectory, via
124   // G4TrajectoriesModel in the Modeling Categ    103   // G4TrajectoriesModel in the Modeling Category) or (b) invoke
125   // AddPrimitives below (between calls to Beg    104   // AddPrimitives below (between calls to Begin/EndPrimitives) or (c)
126   // use graphics-system-specific code or (d)     105   // use graphics-system-specific code or (d) any combination of the
127   // above.                                       106   // above.
128                                                   107 
129   virtual void AddCompound (const G4VTrajector << 108   virtual void AddCompound (const G4VTrajectory&) = 0;
130   virtual void AddCompound (const G4VHit&)     << 109   virtual void AddCompound (const G4VHit&)        = 0;
131   virtual void AddCompound (const G4VDigi&)    << 
132   virtual void AddCompound (const G4THitsMap<G << 
133   virtual void AddCompound (const G4THitsMap<G << 
134   virtual void AddCompound (const G4Mesh&)     << 
135                                                   110 
136   ////////////////////////////////////////////    111   ///////////////////////////////////////////////////////////////////
137   // Methods for adding graphics primitives to    112   // Methods for adding graphics primitives to the scene handler.  A
138   // sequence of calls to AddPrimitive must be    113   // sequence of calls to AddPrimitive must be sandwiched between
139   // calls to BeginPrimitives and EndPrimitive    114   // calls to BeginPrimitives and EndPrimitives.  A sequence is any
140   // number of calls that have the same transf << 115   // number of calls the have the same transformation.
141                                                   116 
142   virtual void BeginPrimitives                    117   virtual void BeginPrimitives
143   (const G4Transform3D& objectTransformation =    118   (const G4Transform3D& objectTransformation = G4Transform3D()) = 0;
144   // objectTransformation is the transformatio    119   // objectTransformation is the transformation in the world
145   // coordinate system of the object about to     120   // coordinate system of the object about to be added.
146                                                   121 
147   virtual void EndPrimitives () = 0;              122   virtual void EndPrimitives () = 0;
148                                                   123 
149   virtual void BeginPrimitives2D               << 
150   (const G4Transform3D& objectTransformation = << 
151                                                << 
152   virtual void EndPrimitives2D () = 0;         << 
153   // The x,y coordinates of the primitives pas << 
154   // intrepreted as screen coordinates, -1 < x << 
155   // z-coordinate is ignored.                  << 
156                                                << 
157   virtual void AddPrimitive (const G4Polyline&    124   virtual void AddPrimitive (const G4Polyline&)   = 0;
                                                   >> 125   virtual void AddPrimitive (const G4Scale&)      = 0;
158   virtual void AddPrimitive (const G4Text&)       126   virtual void AddPrimitive (const G4Text&)       = 0;
159   virtual void AddPrimitive (const G4Circle&)     127   virtual void AddPrimitive (const G4Circle&)     = 0;
160   virtual void AddPrimitive (const G4Square&)     128   virtual void AddPrimitive (const G4Square&)     = 0;
161   virtual void AddPrimitive (const G4Polymarke    129   virtual void AddPrimitive (const G4Polymarker&) = 0;
162   virtual void AddPrimitive (const G4Polyhedro    130   virtual void AddPrimitive (const G4Polyhedron&) = 0;
163   virtual void AddPrimitive (const G4Plotter&) << 131   virtual void AddPrimitive (const G4NURBS&)      = 0;
164                                                << 132 
165   virtual const G4VisExtent& GetExtent() const << 133   ///////////////////////////////////////////////////////////////////
166   // The concrete class should overload this o << 134   // Special functions for particular models.
167   // See G4VScenHandler for example.           << 135 
                                                   >> 136   virtual void EstablishSpecials (G4PhysicalVolumeModel&) {}
                                                   >> 137   // Used to establish any special relationships between scene and
                                                   >> 138   // this particular type of model - non-pure, i.e., no requirement to
                                                   >> 139   // implement.  See G4PhysicalVolumeModel.hh for details.
                                                   >> 140 
                                                   >> 141   virtual void DecommissionSpecials (G4PhysicalVolumeModel&) {}
                                                   >> 142   // Used to reverse the effect of EstablishSpecials, if required.
168                                                   143 
169 };                                                144 };
170                                                   145 
171 #endif                                            146 #endif
172                                                   147