Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4BooleanSolid.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4BooleanSolid.hh 96960 2016-05-18 14:59:54Z gcosmo $
28 //
29 //
30 // class G4BooleanSolid
31 //
32 // Class description:
33 //
34 // Abstract base class for solids created by boolean operations
35 // between other solids.
36 
37 // 10.09.98 V.Grichine - created
38 //
39 // --------------------------------------------------------------------
40 #ifndef G4BOOLEANSOLID_HH
41 #define G4BOOLEANSOLID_HH
42 
43 #include "G4DisplacedSolid.hh"
44 
45 #include "G4ThreeVector.hh"
46 #include "G4RotationMatrix.hh"
47 #include "G4Transform3D.hh"
48 
50 
51 class G4BooleanSolid : public G4VSolid
52 {
53  public: // with description
54 
55  G4BooleanSolid( const G4String& pName,
56  G4VSolid* pSolidA ,
57  G4VSolid* pSolidB );
58 
59  G4BooleanSolid( const G4String& pName,
60  G4VSolid* pSolidA ,
61  G4VSolid* pSolidB,
62  G4RotationMatrix* rotMatrix,
63  const G4ThreeVector& transVector );
64 
65  G4BooleanSolid( const G4String& pName,
66  G4VSolid* pSolidA ,
67  G4VSolid* pSolidB ,
68  const G4Transform3D& transform );
69 
70  virtual ~G4BooleanSolid();
71 
72  virtual const G4VSolid* GetConstituentSolid(G4int no) const;
73  virtual G4VSolid* GetConstituentSolid(G4int no);
74  // If Solid is made up from a Boolean operation of two solids,
75  // return the corresponding solid (for no=0 and 1).
76  // If the solid is not a "Boolean", return 0.
77 
78  inline G4double GetCubicVolume();
79  inline G4double GetSurfaceArea();
80 
81  virtual G4GeometryType GetEntityType() const;
82  virtual G4Polyhedron* GetPolyhedron () const;
83 
84  std::ostream& StreamInfo(std::ostream& os) const;
85 
86  inline G4int GetCubVolStatistics() const;
87  inline G4double GetCubVolEpsilon() const;
88  inline void SetCubVolStatistics(G4int st);
89  inline void SetCubVolEpsilon(G4double ep);
90 
91  inline G4int GetAreaStatistics() const;
92  inline G4double GetAreaAccuracy() const;
93  inline void SetAreaStatistics(G4int st);
94  inline void SetAreaAccuracy(G4double ep);
95 
97 
98  public: // without description
99 
100  G4BooleanSolid(__void__&);
101  // Fake default constructor for usage restricted to direct object
102  // persistency for clients requiring preallocation of memory for
103  // persistifiable objects.
104 
105  G4BooleanSolid(const G4BooleanSolid& rhs);
107  // Copy constructor and assignment operator.
108 
109  protected:
110 
111  void GetListOfPrimitives(std::vector<std::pair<G4VSolid *,G4Transform3D>>&,
112  const G4Transform3D&) const;
113  // Get list of constituent primitives of the solid and their placements.
114 
116  const G4VSolid*) const;
117  // Stack polyhedra for processing. Return top polyhedron.
118 
119  protected:
120 
123 
124  private:
125 
131 
134 
135  mutable std::vector<std::pair<G4VSolid *,G4Transform3D>> fPrimitives;
137 
139  // If & only if this object created it, it must delete it
140 
141 } ;
142 
143 #include "G4BooleanSolid.icc"
144 
145 #endif
G4double fAreaAccuracy
G4double fCubicVolume
void SetAreaStatistics(G4int st)
virtual G4GeometryType GetEntityType() const
G4bool createdDisplacedSolid
G4double fCubVolEpsilon
virtual ~G4BooleanSolid()
G4double GetCubVolEpsilon() const
G4BooleanSolid & operator=(const G4BooleanSolid &rhs)
virtual G4Polyhedron * GetPolyhedron() const
G4ThreeVector GetPointOnSurface() const
G4double GetAreaAccuracy() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4BooleanSolid(const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)
G4bool fRebuildPolyhedron
void SetCubVolEpsilon(G4double ep)
G4double GetSurfaceArea()
G4double fPrimitivesSurfaceArea
std::vector< std::pair< G4VSolid *, G4Transform3D > > fPrimitives
G4int GetCubVolStatistics() const
void SetAreaAccuracy(G4double ep)
virtual const G4VSolid * GetConstituentSolid(G4int no) const
void SetCubVolStatistics(G4int st)
G4Polyhedron * StackPolyhedron(HepPolyhedronProcessor &, const G4VSolid *) const
int G4int
Definition: G4Types.hh:78
G4VSolid * fPtrSolidA
G4VSolid * fPtrSolidB
G4int GetAreaStatistics() const
G4double fSurfaceArea
void GetListOfPrimitives(std::vector< std::pair< G4VSolid *, G4Transform3D >> &, const G4Transform3D &) const
G4double GetCubicVolume()
std::ostream & StreamInfo(std::ostream &os) const
G4Polyhedron * fpPolyhedron