Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4Tet.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 intellectual property of the *
19 // * Vanderbilt University Free Electron Laser Center *
20 // * Vanderbilt University, Nashville, TN, USA *
21 // * Development supported by: *
22 // * United States MFEL program under grant FA9550-04-1-0045 *
23 // * and NASA under contract number NNG04CT05P. *
24 // * Written by Marcus H. Mendenhall and Robert A. Weller. *
25 // * *
26 // * Contributed to the Geant4 Core, January, 2005. *
27 // * *
28 // ********************************************************************
29 //
30 //
31 // $Id: G4Tet.hh 106603 2017-10-16 09:17:44Z gcosmo $
32 //
33 //
34 // --------------------------------------------------------------------
35 // GEANT 4 class header file
36 //
37 // G4Tet
38 //
39 // Class description:
40 //
41 // A G4Tet is a tetrahedrasolid.
42 //
43 
44 // History:
45 // -------
46 // 03.09.2004 - M.H.Mendenhall & R.A.Weller (Vanderbilt University, USA)
47 // 10.02.2005 - D.Anninos (CERN) - Added GetPointOnSurface() method.
48 // 12.11.2006 - M.H.Mendenhall - Added GetSurfaceArea() concrete implementation.
49 // 20.09.2010 - G.Cosmo (CERN) - Added copy-ctor and operator=().
50 // 24.09.2016 - E.Tcherniaev - Removed CreateRotatedVertices().
51 // --------------------------------------------------------------------
52 #ifndef G4TET_HH
53 #define G4TET_HH
54 /*
55 #if defined(G4GEOM_USE_USOLIDS)
56 #define G4GEOM_USE_UTET 1
57 #endif
58 
59 #if defined(G4GEOM_USE_UTET)
60  #define G4UTet G4Tet
61  #include "G4UTet.hh"
62 #else
63 */
64 #include "G4VSolid.hh"
65 
66 class G4Tet : public G4VSolid
67 {
68 
69  public: // with description
70 
71  G4Tet(const G4String& pName,
72  G4ThreeVector anchor,
73  G4ThreeVector p2,
74  G4ThreeVector p3,
75  G4ThreeVector p4,
76  G4bool *degeneracyFlag=0);
77 
78  virtual ~G4Tet();
79 
81  const G4int n,
82  const G4VPhysicalVolume* pRep);
83 
84  void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
85 
86  G4bool CalculateExtent(const EAxis pAxis,
87  const G4VoxelLimits& pVoxelLimit,
88  const G4AffineTransform& pTransform,
89  G4double& pmin, G4double& pmax) const;
90  // Methods for solid
91 
92  EInside Inside(const G4ThreeVector& p) const;
93 
94  G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
95 
96  G4double DistanceToIn(const G4ThreeVector& p, const G4ThreeVector& v) const;
97 
98  G4double DistanceToIn(const G4ThreeVector& p) const;
99 
101  const G4bool calcNorm=false,
102  G4bool *validNorm=0, G4ThreeVector *n=0) const;
103 
104  G4double DistanceToOut(const G4ThreeVector& p) const;
105 
108 
110 
111  G4VSolid* Clone() const;
112 
113  std::ostream& StreamInfo(std::ostream& os) const;
114 
116 
117  // Functions for visualization
118 
119  void DescribeYourselfTo (G4VGraphicsScene& scene) const;
120  G4VisExtent GetExtent () const;
121  G4Polyhedron* CreatePolyhedron () const;
122  G4Polyhedron* GetPolyhedron () const;
123 
124  public: // without description
125 
126  G4Tet(__void__&);
127  // Fake default constructor for usage restricted to direct object
128  // persistency for clients requiring preallocation of memory for
129  // persistifiable objects.
130 
131  G4Tet(const G4Tet& rhs);
132  G4Tet& operator=(const G4Tet& rhs);
133  // Copy constructor and assignment operator.
134 
135  const char* CVSHeaderVers()
136  { return "$Id: G4Tet.hh 106603 2017-10-16 09:17:44Z gcosmo $"; }
137  const char* CVSFileVers()
138  { return CVSVers; }
140  { warningFlag=flag; }
141  static G4bool CheckDegeneracy(G4ThreeVector anchor,
142  G4ThreeVector p2,
143  G4ThreeVector p3,
144  G4ThreeVector p4);
145  std::vector<G4ThreeVector> GetVertices() const;
146  // Return the four vertices of the shape.
147 
148  private:
149 
151 
154 
156  G4ThreeVector p3, G4double& area) const;
157  static const char CVSVers[];
158 
159  private:
160 
163 
165 
169 };
170 
171 //#endif
172 
173 #endif
G4double fCdotN134
Definition: G4Tet.hh:166
G4ThreeVector fNormal142
Definition: G4Tet.hh:162
G4ThreeVector fAnchor
Definition: G4Tet.hh:161
std::ostream & StreamInfo(std::ostream &os) const
Definition: G4Tet.cc:661
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Definition: G4Tet.cc:303
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
Definition: G4Tet.cc:326
static const char CVSVers[]
Definition: G4Tet.hh:157
static G4bool CheckDegeneracy(G4ThreeVector anchor, G4ThreeVector p2, G4ThreeVector p3, G4ThreeVector p4)
Definition: G4Tet.cc:277
G4ThreeVector GetPointOnSurface() const
Definition: G4Tet.cc:711
G4double fDx
Definition: G4Tet.hh:168
G4double fZMax
Definition: G4Tet.hh:167
const char * p
Definition: xmltok.h:285
G4double fYMax
Definition: G4Tet.hh:167
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Definition: G4Tet.cc:462
G4ThreeVector fNormal123
Definition: G4Tet.hh:162
virtual ~G4Tet()
Definition: G4Tet.cc:214
G4double fCdotN123
Definition: G4Tet.hh:166
const char * CVSHeaderVers()
Definition: G4Tet.hh:135
G4double fCubicVolume
Definition: G4Tet.hh:150
G4double GetSurfaceArea()
Definition: G4Tet.cc:756
G4double fXMin
Definition: G4Tet.hh:167
EInside Inside(const G4ThreeVector &p) const
Definition: G4Tet.cc:371
G4double GetCubicVolume()
Definition: G4Tet.cc:747
G4double fYMin
Definition: G4Tet.hh:167
std::vector< G4ThreeVector > GetVertices() const
Definition: G4Tet.cc:732
G4double fDz
Definition: G4Tet.hh:168
G4double fCdotN142
Definition: G4Tet.hh:166
G4ThreeVector GetPointOnFace(G4ThreeVector p1, G4ThreeVector p2, G4ThreeVector p3, G4double &area) const
Definition: G4Tet.cc:690
G4Polyhedron * fpPolyhedron
Definition: G4Tet.hh:153
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4Tet & operator=(const G4Tet &rhs)
Definition: G4Tet.cc:244
G4ThreeVector fMiddle
Definition: G4Tet.hh:161
G4bool warningFlag
Definition: G4Tet.hh:164
G4ThreeVector fP3
Definition: G4Tet.hh:161
G4ThreeVector fNormal234
Definition: G4Tet.hh:162
void DescribeYourselfTo(G4VGraphicsScene &scene) const
Definition: G4Tet.cc:767
G4double fDy
Definition: G4Tet.hh:168
G4double fZMin
Definition: G4Tet.hh:167
G4double fCdotN234
Definition: G4Tet.hh:166
G4Polyhedron * CreatePolyhedron() const
Definition: G4Tet.cc:785
int G4int
Definition: G4Types.hh:78
EInside
Definition: geomdefs.hh:58
G4Tet(const G4String &pName, G4ThreeVector anchor, G4ThreeVector p2, G4ThreeVector p3, G4ThreeVector p4, G4bool *degeneracyFlag=0)
Definition: G4Tet.cc:98
EAxis
Definition: geomdefs.hh:54
const char * CVSFileVers()
Definition: G4Tet.hh:137
G4ThreeVector fP2
Definition: G4Tet.hh:161
G4VSolid * Clone() const
Definition: G4Tet.cc:652
Char_t n[5]
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
Definition: G4Tet.cc:555
G4GeometryType GetEntityType() const
Definition: G4Tet.cc:643
G4ThreeVector fP4
Definition: G4Tet.hh:161
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
Definition: G4Tet.cc:402
G4double fXMax
Definition: G4Tet.hh:167
G4VisExtent GetExtent() const
Definition: G4Tet.cc:776
G4ThreeVector fNormal134
Definition: G4Tet.hh:162
void PrintWarnings(G4bool flag)
Definition: G4Tet.hh:139
Definition: G4Tet.hh:66
G4Polyhedron * GetPolyhedron() const
Definition: G4Tet.cc:804
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
Definition: G4Tet.cc:293
G4double fMaxSize
Definition: G4Tet.hh:168
G4double fSurfaceArea
Definition: G4Tet.hh:150
G4double fTol
Definition: G4Tet.hh:168
G4bool fRebuildPolyhedron
Definition: G4Tet.hh:152