Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4VFacet.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 and of QinetiQ Ltd, *
20 // * subject to DEFCON 705 IPR conditions. *
21 // * By using, copying, modifying or distributing the software (or *
22 // * any work based on the software) you agree to acknowledge its *
23 // * use in resulting scientific publications, and indicate your *
24 // * acceptance of all terms of the Geant4 Software license. *
25 // ********************************************************************
26 //
27 // $Id: G4VFacet.hh 95801 2016-02-25 10:59:41Z gcosmo $
28 //
29 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30 //
31 // Class G4VFacet
32 //
33 // Class description:
34 //
35 // Base class defining the facets which are components of a
36 // G4TessellatedSolid shape.
37 
38 // CHANGE HISTORY
39 // --------------
40 //
41 // 31 October 2004, P R Truscott, QinetiQ Ltd, UK - Created.
42 // 12 October 2012, M Gayer, CERN, - Reviewed optimized implementation.
43 //
45 
46 #ifndef G4VFacet_hh
47 #define G4VFacet_hh
48 
49 #include <iostream>
50 #include <vector>
51 
52 #include "globals.hh"
53 #include "G4ThreeVector.hh"
54 #include "G4VSolid.hh"
55 
57 
58 class G4TessellatedSolid;
59 
60 class G4VFacet
61 {
62  public:
63 
64  virtual ~G4VFacet ();
65 
66  G4bool operator== (const G4VFacet &right) const;
67 
68  virtual G4int GetNumberOfVertices () const = 0;
69  virtual G4ThreeVector GetVertex (G4int i) const = 0;
70  virtual void SetVertex (G4int i, const G4ThreeVector &val) = 0;
71  virtual G4GeometryType GetEntityType () const = 0;
72  virtual G4ThreeVector GetSurfaceNormal () const = 0;
73  virtual G4bool IsDefined () const = 0;
74  virtual G4ThreeVector GetCircumcentre () const = 0;
75  virtual G4double GetRadius () const = 0;
76  virtual G4VFacet *GetClone () = 0;
77  virtual G4double Distance (const G4ThreeVector&, G4double) = 0;
78  virtual G4double Distance (const G4ThreeVector&, G4double,
79  const G4bool) = 0;
80  virtual G4double Extent (const G4ThreeVector) = 0;
81  virtual G4bool Intersect (const G4ThreeVector&, const G4ThreeVector &,
82  const G4bool , G4double &, G4double &,
83  G4ThreeVector &) = 0;
84  virtual G4double GetArea() const = 0;
85  virtual G4ThreeVector GetPointOnFace() const = 0;
86 
87  void ApplyTranslation (const G4ThreeVector v);
88 
89  std::ostream &StreamInfo(std::ostream &os) const;
90 
91  G4bool IsInside(const G4ThreeVector &p) const;
92 
93  virtual G4int AllocatedMemory() = 0;
94  virtual void SetVertexIndex (G4int i, G4int j) = 0;
95  virtual G4int GetVertexIndex (G4int i) const = 0;
96 
97  virtual void SetVertices(std::vector<G4ThreeVector> *vertices) = 0;
98 
99  protected:
100 
101  static const G4double dirTolerance;
102  static const G4double kCarTolerance;
103 };
104 
105 #endif
virtual G4int GetVertexIndex(G4int i) const =0
virtual G4ThreeVector GetSurfaceNormal() const =0
G4bool operator==(const G4VFacet &right) const
Definition: G4VFacet.cc:59
G4bool IsInside(const G4ThreeVector &p) const
Definition: G4VFacet.cc:114
virtual G4double GetArea() const =0
virtual ~G4VFacet()
Definition: G4VFacet.cc:53
virtual void SetVertex(G4int i, const G4ThreeVector &val)=0
virtual G4VFacet * GetClone()=0
G4FacetVertexType
Definition: G4VFacet.hh:56
const char * p
Definition: xmltok.h:285
std::ostream & StreamInfo(std::ostream &os) const
Definition: G4VFacet.cc:98
virtual void SetVertexIndex(G4int i, G4int j)=0
virtual G4ThreeVector GetVertex(G4int i) const =0
virtual G4double Distance(const G4ThreeVector &, G4double)=0
static const G4double dirTolerance
Definition: G4VFacet.hh:101
static const G4double kCarTolerance
Definition: G4VFacet.hh:102
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
virtual G4bool IsDefined() const =0
virtual G4GeometryType GetEntityType() const =0
virtual G4int GetNumberOfVertices() const =0
int G4int
Definition: G4Types.hh:78
virtual G4ThreeVector GetCircumcentre() const =0
virtual G4bool Intersect(const G4ThreeVector &, const G4ThreeVector &, const G4bool, G4double &, G4double &, G4ThreeVector &)=0
virtual G4double GetRadius() const =0
virtual void SetVertices(std::vector< G4ThreeVector > *vertices)=0
virtual G4double Extent(const G4ThreeVector)=0
void ApplyTranslation(const G4ThreeVector v)
Definition: G4VFacet.cc:87
virtual G4int AllocatedMemory()=0
virtual G4ThreeVector GetPointOnFace() const =0