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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 /visualization/modeling/include/G4ModelingParameters.hh (Version 11.3.0) and /visualization/modeling/include/G4ModelingParameters.hh (Version 8.1.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
                                                   >>  27 // $Id: G4ModelingParameters.hh,v 1.12 2006/06/29 21:30:26 gunter Exp $
                                                   >>  28 // GEANT4 tag $Name: geant4-08-01-patch-01 $
 27 //                                                 29 //
 28 //                                                 30 // 
 29 // John Allison  31st December 1997.               31 // John Allison  31st December 1997.
 30 //                                                 32 //
 31 // Class Description:                              33 // Class Description:
 32 //                                                 34 //
 33 // Parameters associated with the modeling of      35 // Parameters associated with the modeling of GEANT4 objects.
 34                                                    36 
 35 #ifndef G4MODELINGPARAMETERS_HH                    37 #ifndef G4MODELINGPARAMETERS_HH
 36 #define G4MODELINGPARAMETERS_HH                    38 #define G4MODELINGPARAMETERS_HH
 37                                                    39 
 38 #include "globals.hh"                              40 #include "globals.hh"
 39 #include "G4VisExtent.hh"                          41 #include "G4VisExtent.hh"
 40 #include "G4VisAttributes.hh"                  << 
 41 #include "G4VPhysicalVolume.hh"                << 
 42                                                << 
 43 #include <vector>                              << 
 44 #include <utility>                             << 
 45                                                    42 
 46 class G4LogicalVolume;                             43 class G4LogicalVolume;
                                                   >>  44 class G4VPhysicalVolume;
 47 class G4VisAttributes;                             45 class G4VisAttributes;
 48 class G4VSolid;                                << 
 49 class G4DisplacedSolid;                        << 
 50 class G4Event;                                 << 
 51                                                    46 
 52 class G4ModelingParameters {                       47 class G4ModelingParameters {
 53                                                    48 
 54 public: // With description                        49 public: // With description
 55                                                    50 
 56   // Currently requested drawing style.        <<  51   friend std::ostream& operator << (std::ostream& os, const G4ModelingParameters&);
                                                   >>  52 
 57   enum DrawingStyle {                              53   enum DrawingStyle {
 58     wf,         // Draw edges    - no hidden l     54     wf,         // Draw edges    - no hidden line removal (wireframe).
 59     hlr,        // Draw edges    - hidden line     55     hlr,        // Draw edges    - hidden lines removed.
 60     hsr,        // Draw surfaces - hidden surf     56     hsr,        // Draw surfaces - hidden surfaces removed.
 61     hlhsr,      // Draw surfaces and edges - h <<  57     hlhsr       // Draw surfaces and edges - hidden removed.
 62     cloud       // Draw as a cloud of points   << 
 63   };                                           << 
 64                                                << 
 65   enum CutawayMode {                           << 
 66     cutawayUnion,       // Union (addition) of << 
 67     cutawayIntersection // Intersection (multi << 
 68   };                                           << 
 69                                                << 
 70   // enums and nested class for communicating  << 
 71   // attributes for a specfic touchable define << 
 72   enum VisAttributesSignifier {                << 
 73     VASVisibility,                             << 
 74     VASDaughtersInvisible,                     << 
 75     VASColour,                                 << 
 76     VASLineStyle,                              << 
 77     VASLineWidth,                              << 
 78     VASForceWireframe,                         << 
 79     VASForceSolid,                             << 
 80     VASForceCloud,                             << 
 81     VASForceNumberOfCloudPoints,               << 
 82     VASForceAuxEdgeVisible,                    << 
 83     VASForceLineSegmentsPerCircle              << 
 84   };                                               58   };
                                                   >>  59   // Currently requested drawing style.
 85                                                    60 
 86   class PVNameCopyNo {                         <<  61   enum RepStyle {
 87   public:                                      <<  62     wireframe,  // Use G4Wireframe.
 88     // Normal constructor                      <<  63     polyhedron, // Use G4Polyhedron.
 89     PVNameCopyNo(const G4String& name, G4int c <<  64     nurbs       // Use G4NURBS.
 90     : fName(name), fCopyNo(copyNo) {}          << 
 91     const G4String& GetName() const {return fN << 
 92     G4int GetCopyNo() const {return fCopyNo;}  << 
 93     G4bool operator!=(const PVNameCopyNo&) con << 
 94     G4bool operator==(const PVNameCopyNo& rhs) << 
 95   private:                                     << 
 96     G4String fName;                            << 
 97     G4int fCopyNo;                             << 
 98   };                                               65   };
 99   typedef std::vector<PVNameCopyNo> PVNameCopy <<  66   // RepStyle is used to determine which graphics_reps classes to use,
100   typedef PVNameCopyNoPath::const_iterator PVN <<  67   // if required.
101                                                    68 
102   class PVPointerCopyNo {                      <<  69   G4ModelingParameters ();
103   public:                                      << 
104     // Normal constructor                      << 
105     PVPointerCopyNo(G4VPhysicalVolume* pPV, G4 << 
106     : fpPV(pPV), fCopyNo(copyNo) {}            << 
107     const G4String& GetName() const;           << 
108     const G4VPhysicalVolume* GetPVPointer() co << 
109     G4int GetCopyNo() const {return fCopyNo;}  << 
110     G4bool operator!=(const PVPointerCopyNo&)  << 
111     G4bool operator==(const PVPointerCopyNo& r << 
112   private:                                     << 
113     G4VPhysicalVolume* fpPV;                   << 
114     G4int fCopyNo;                             << 
115   };                                           << 
116   typedef std::vector<PVPointerCopyNo> PVPoint << 
117   typedef PVPointerCopyNoPath::const_iterator  << 
118                                                    70 
119   class VisAttributesModifier {                <<  71   G4ModelingParameters (const G4VisAttributes* pDefaultVisAttributes,
120   public:                                      <<  72       DrawingStyle drawingStyle,
121     VisAttributesModifier                      <<  73       RepStyle repStyle,
122     (const G4VisAttributes& visAtts,           <<  74       G4bool isCulling,
123      VisAttributesSignifier signifier,         <<  75       G4bool isCullingInvisible,
124      const PVNameCopyNoPath& path):            <<  76       G4bool isDensityCulling,
125     fVisAtts(visAtts), fSignifier(signifier),  <<  77       G4double visibleDensity,
126     const G4VisAttributes& GetVisAttributes()  <<  78       G4bool isCullingCovered,
127     {return fVisAtts;}                         <<  79       G4int noOfSides);
128     VisAttributesSignifier GetVisAttributesSig <<  80   // noOfSides is suggested no. of sides per circle in case a
129     {return fSignifier;}                       <<  81   // polygonal representation is produced.
130     const PVNameCopyNoPath& GetPVNameCopyNoPat << 
131     {return fPVNameCopyNoPath;}                << 
132     void SetVisAttributes(const G4VisAttribute << 
133     {fVisAtts = visAtts;}                      << 
134     void SetVisAttributesSignifier(VisAttribut << 
135     {fSignifier = signifier;}                  << 
136     void SetPVNameCopyNoPath(const PVNameCopyN << 
137     {fPVNameCopyNoPath = PVNameCopyNoPath;}    << 
138     G4bool operator!=(const VisAttributesModif << 
139     G4bool operator==(const VisAttributesModif << 
140     {return !operator!=(rhs);}                 << 
141   private:                                     << 
142     G4VisAttributes fVisAtts;                  << 
143     VisAttributesSignifier fSignifier;         << 
144     PVNameCopyNoPath fPVNameCopyNoPath;        << 
145   };                                           << 
146                                                    82 
147   G4ModelingParameters ();                     <<  83   G4ModelingParameters (const G4VisAttributes* pDefaultVisAttributes,
                                                   >>  84       DrawingStyle drawingStyle,
                                                   >>  85       RepStyle repStyle,
                                                   >>  86       G4bool isCulling,
                                                   >>  87       G4bool isCullingInvisible,
                                                   >>  88       G4bool isDensityCulling,
                                                   >>  89       G4double visibleDensity,
                                                   >>  90       G4bool isCullingCovered,
                                                   >>  91       G4int noOfSides,
                                                   >>  92       G4bool isViewGeom,
                                                   >>  93       G4bool isViewHits,
                                                   >>  94       G4bool isViewDigis);
                                                   >>  95   // noOfSides is suggested no. of sides per circle in case a
                                                   >>  96   // polygonal representation is produced.
148                                                    97 
149   G4ModelingParameters (const G4VisAttributes*     98   G4ModelingParameters (const G4VisAttributes* pDefaultVisAttributes,
150                         DrawingStyle drawingSt <<  99       RepStyle repStyle,
151       G4bool isCulling,                           100       G4bool isCulling,
152       G4bool isCullingInvisible,                  101       G4bool isCullingInvisible,
153       G4bool isDensityCulling,                    102       G4bool isDensityCulling,
154       G4double visibleDensity,                    103       G4double visibleDensity,
155       G4bool isCullingCovered,                    104       G4bool isCullingCovered,
156       G4int noOfSides);                           105       G4int noOfSides);
157   // Culling and clipping policy for G4Physica << 106   // noOfSides is suggested no. of sides per circle in case a
                                                   >> 107   // polygonal representation is produced.
                                                   >> 108 
                                                   >> 109   G4ModelingParameters (const G4VisAttributes* pDefaultVisAttributes,
                                                   >> 110       RepStyle repStyle,
                                                   >> 111       G4bool isCulling,
                                                   >> 112       G4bool isCullingInvisible,
                                                   >> 113       G4bool isDensityCulling,
                                                   >> 114       G4double visibleDensity,
                                                   >> 115       G4bool isCullingCovered,
                                                   >> 116       G4int noOfSides,
                                                   >> 117       G4bool isViewGeom,
                                                   >> 118       G4bool isViewHits,
                                                   >> 119       G4bool isViewDigis);
                                                   >> 120   // noOfSides is suggested no. of sides per circle in case a
                                                   >> 121   // polygonal representation is produced.
158                                                   122 
159   ~G4ModelingParameters ();                       123   ~G4ModelingParameters ();
160                                                   124 
161   // Note: uses default assignment operator an    125   // Note: uses default assignment operator and copy constructor.
162                                                   126 
163   G4bool operator != (const G4ModelingParamete    127   G4bool operator != (const G4ModelingParameters&) const;
164                                                   128 
165   // Get and Is functions...                      129   // Get and Is functions...
166   G4bool           IsWarning                   << 
167   const G4VisAttributes* GetDefaultVisAttribut    130   const G4VisAttributes* GetDefaultVisAttributes () const;
168   DrawingStyle     GetDrawingStyle                131   DrawingStyle     GetDrawingStyle               () const;
169   G4int            GetNumberOfCloudPoints      << 132   RepStyle         GetRepStyle                   () const;
170   G4bool           IsCulling                      133   G4bool           IsCulling                     () const;
171   G4bool           IsCullingInvisible             134   G4bool           IsCullingInvisible            () const;
172   G4bool           IsDensityCulling               135   G4bool           IsDensityCulling              () const;
173   G4double         GetVisibleDensity              136   G4double         GetVisibleDensity             () const;
174   G4bool           IsCullingCovered               137   G4bool           IsCullingCovered              () const;
175   G4int            GetCBDAlgorithmNumber       << 
176   const std::vector<G4double>& GetCBDParameter << 
177   G4bool           IsExplode                   << 
178   G4double         GetExplodeFactor            << 
179   const G4Point3D& GetExplodeCentre            << 
180   G4int            GetNoOfSides                   138   G4int            GetNoOfSides                  () const;
181   G4DisplacedSolid* GetSectionSolid            << 139   G4bool           IsViewGeom                    () const;
182   CutawayMode      GetCutawayMode              << 140   G4bool           IsViewHits                    () const;
183   G4DisplacedSolid* GetCutawaySolid            << 141   G4bool           IsViewDigis                   () const;
184   const G4Event*   GetEvent                    << 
185   const std::vector<VisAttributesModifier>& Ge << 
186   G4bool           IsSpecialMeshRendering      << 
187   const std::vector<PVNameCopyNo>& GetSpecialM << 
188                                                   142 
189   // Set functions...                             143   // Set functions...
190   void SetWarning              (G4bool);       << 
191   void SetDefaultVisAttributes (const G4VisAtt    144   void SetDefaultVisAttributes (const G4VisAttributes* pDefaultVisAttributes);
192   void SetDrawingStyle         (DrawingStyle);    145   void SetDrawingStyle         (DrawingStyle);
193   void SetNumberOfCloudPoints  (G4int);        << 146   void SetRepStyle             (RepStyle);
194   void SetCulling              (G4bool);          147   void SetCulling              (G4bool);
195   void SetCullingInvisible     (G4bool);          148   void SetCullingInvisible     (G4bool);
196   void SetDensityCulling       (G4bool);          149   void SetDensityCulling       (G4bool);
197   void SetVisibleDensity       (G4double);        150   void SetVisibleDensity       (G4double);
198   void SetCullingCovered       (G4bool);          151   void SetCullingCovered       (G4bool);
199   void SetCBDAlgorithmNumber   (G4int);        << 
200   void SetCBDParameters        (const std::vec << 
201   void SetExplodeFactor        (G4double explo << 
202   void SetExplodeCentre        (const G4Point3 << 
203   G4int SetNoOfSides           (G4int);  // Re    152   G4int SetNoOfSides           (G4int);  // Returns actual number set.
204   void SetSectionSolid         (G4DisplacedSol << 153   void SetViewGeom             ();
205   void SetCutawayMode          (CutawayMode);  << 154   void UnsetViewGeom           ();
206   void SetCutawaySolid         (G4DisplacedSol << 155   void SetViewHits             ();
207   void SetEvent                (const G4Event* << 156   void UnsetViewHits           ();
208   void SetVisAttributesModifiers(const std::ve << 157   void SetViewDigis            ();
209   void SetSpecialMeshRendering (G4bool);       << 158   void UnsetViewDigis          ();
210   void SetSpecialMeshVolumes   (const std::vec << 159 
211                                                << 160   // Other functions...
212   friend std::ostream& operator <<             << 161   void PrintDifferences (const G4ModelingParameters& that) const;
213   (std::ostream& os, const G4ModelingParameter << 
214                                                << 
215   friend std::ostream& operator <<             << 
216   (std::ostream& os, const PVNameCopyNoPath&); << 
217                                                << 
218   friend std::ostream& operator <<             << 
219   (std::ostream& os, const PVPointerCopyNoPath << 
220                                                << 
221   friend std::ostream& operator <<             << 
222   (std::ostream& os,                           << 
223    const std::vector<VisAttributesModifier>&); << 
224                                                   162 
225 private:                                          163 private:
226                                                   164 
227   // Data members...                              165   // Data members...
228   G4bool       fWarning;         // Print warn << 
229   const G4VisAttributes* fpDefaultVisAttribute    166   const G4VisAttributes* fpDefaultVisAttributes;
230   DrawingStyle fDrawingStyle;    // Drawing st    167   DrawingStyle fDrawingStyle;    // Drawing style.
231   G4int        fNumberOfCloudPoints;  // For d << 168   RepStyle     fRepStyle;        // Representation style.
232                                       // <= 0  << 
233   G4bool       fCulling;         // Culling re    169   G4bool       fCulling;         // Culling requested.
234   G4bool       fCullInvisible;   // Cull (don'    170   G4bool       fCullInvisible;   // Cull (don't Draw) invisible objects.
235   G4bool       fDensityCulling;  // Density cu    171   G4bool       fDensityCulling;  // Density culling requested.  If so...
236   G4double     fVisibleDensity;  // ...density    172   G4double     fVisibleDensity;  // ...density lower than this not drawn.
237   G4bool       fCullCovered;     // Cull daugh    173   G4bool       fCullCovered;     // Cull daughters covered by opaque mothers.
238   G4int        fCBDAlgorithmNumber; // Colour  << 
239   std::vector<G4double> fCBDParameters; // Col << 
240   G4double     fExplodeFactor;   // Explode al << 
241   G4Point3D    fExplodeCentre;   // ...about t << 
242   G4int        fNoOfSides;       // ...if poly    174   G4int        fNoOfSides;       // ...if polygon approximates circle.
243   G4DisplacedSolid* fpSectionSolid;  // For ge << 175   G4bool       fViewGeom;        // View geometry objects.
244   CutawayMode  fCutawayMode;     // Cutaway mo << 176   G4bool       fViewHits;        // View hits, if any.
245   G4DisplacedSolid* fpCutawaySolid;  // For ge << 177   G4bool       fViewDigis;       // View digis, if any.
246   const G4Event* fpEvent;        // Event bein << 
247   std::vector<VisAttributesModifier> fVisAttri << 
248   G4bool       fSpecialMeshRendering;  // Requ << 
249   std::vector<PVNameCopyNo> fSpecialMeshVolume << 
250 };                                             << 
251                                                   178 
252 std::ostream& operator <<                      << 179 };
253 (std::ostream& os, const G4ModelingParameters& << 
254                                                << 
255 std::ostream& operator <<                      << 
256 (std::ostream& os, const G4ModelingParameters: << 
257                                                << 
258 std::ostream& operator <<                      << 
259 (std::ostream& os, const G4ModelingParameters: << 
260                                                << 
261 std::ostream& operator <<                      << 
262 (std::ostream& os,                             << 
263  const std::vector<G4ModelingParameters::VisAt << 
264                                                   180 
265 #include "G4ModelingParameters.icc"               181 #include "G4ModelingParameters.icc"
266                                                   182 
267 #endif                                            183 #endif
268                                                   184