Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4UTet.hh
Go to the documentation of this file.
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:$
32 //
33 //
34 // --------------------------------------------------------------------
35 // GEANT 4 class header file
36 //
37 // G4UTet
38 //
39 // Class description:
40 //
41 // Wrapper class for UTet to make use of UTet from USolids module.
42 
43 // History:
44 // 1.11.13 G.Cosmo, CERN/PH
45 // --------------------------------------------------------------------
46 #ifndef G4UTET_HH
47 #define G4UTET_HH
48 
49 #include "G4USolid.hh"
50 
51 #if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
52 
53 #include "UTet.hh"
54 
55 #include "G4Polyhedron.hh"
56 
57 class G4UTet : public G4USolid
58 {
59 
60  public: // with description
61 
62  G4UTet(const G4String& pName,
63  G4ThreeVector anchor,
64  G4ThreeVector p2,
65  G4ThreeVector p3,
66  G4ThreeVector p4,
67  G4bool *degeneracyFlag=0);
68 
69  ~G4UTet();
70 
71  inline UTet* GetShape() const;
72 
73  inline G4GeometryType GetEntityType() const;
74 
75  public: // without description
76 
77  G4UTet(__void__&);
78  // Fake default constructor for usage restricted to direct object
79  // persistency for clients requiring preallocation of memory for
80  // persistifiable objects.
81 
82  G4UTet(const G4UTet& rhs);
83  G4UTet& operator=(const G4UTet& rhs);
84  // Copy constructor and assignment operator.
85 
86  void Extent(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
87 
88  G4bool CalculateExtent(const EAxis pAxis,
89  const G4VoxelLimits& pVoxelLimit,
90  const G4AffineTransform& pTransform,
91  G4double& pMin, G4double& pMax) const;
92 
93  G4Polyhedron* CreatePolyhedron() const;
94 
95  std::vector<G4ThreeVector> GetVertices() const;
96  // Return the four vertices of the shape.
97 };
98 
99 // --------------------------------------------------------------------
100 // Inline methods
101 // --------------------------------------------------------------------
102 
103 inline UTet* G4UTet::GetShape() const
104 {
105  return (UTet*) fShape;
106 }
107 
108 inline G4GeometryType G4UTet::GetEntityType() const
109 {
110  return "G4Tet";
111 }
112 
113 #endif // G4GEOM_USE_USOLIDS
114 
115 #endif
bool G4bool
Definition: G4Types.hh:79
EAxis
Definition: geomdefs.hh:54
double G4double
Definition: G4Types.hh:76