Geant4  10.02
G4UTet.cc
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 // $Id:$
31 //
32 //
33 // Implementation for G4UTet wrapper class
34 // --------------------------------------------------------------------
35 
36 #include "G4Tet.hh"
37 #include "G4UTet.hh"
38 
39 #if defined(G4GEOM_USE_USOLIDS)
40 
42 //
43 // Constructor - create a tetrahedron
44 // This class is implemented separately from general polyhedra,
45 // because the simplex geometry can be computed very quickly,
46 // which may become important in situations imported from mesh generators,
47 // in which a very large number of G4Tets are created.
48 // A Tet has all of its geometrical information precomputed
49 //
50 G4UTet::G4UTet(const G4String& pName,
51  G4ThreeVector anchor,
52  G4ThreeVector p2,
53  G4ThreeVector p3,
54  G4ThreeVector p4, G4bool* degeneracyFlag)
55  : G4USolid(pName, new UTet(pName,
56  UVector3(anchor.x(),anchor.y(),anchor.z()),
57  UVector3(p2.x(), p2.y(), p2.z()),
58  UVector3(p3.x(), p3.y(), p3.z()),
59  UVector3(p4.x(), p4.y(), p4.z()),
60  degeneracyFlag))
61 {
62 }
63 
65 //
66 // Fake default constructor - sets only member data and allocates memory
67 // for usage restricted to object persistency.
68 //
69 G4UTet::G4UTet( __void__& a )
70  : G4USolid(a)
71 {
72 }
73 
75 //
76 // Destructor
77 //
78 G4UTet::~G4UTet()
79 {
80 }
81 
83 //
84 // Copy constructor
85 //
86 G4UTet::G4UTet(const G4UTet& rhs)
87  : G4USolid(rhs)
88 {
89 }
90 
91 
93 //
94 // Assignment operator
95 //
96 G4UTet& G4UTet::operator = (const G4UTet& rhs)
97 {
98  // Check assignment to self
99  //
100  if (this == &rhs) { return *this; }
101 
102  // Copy base class data
103  //
104  G4USolid::operator=(rhs);
105 
106  return *this;
107 }
108 
109 #endif // G4GEOM_USE_USOLIDS
CLHEP::Hep3Vector G4ThreeVector
G4double z
Definition: TRTMaterials.hh:39
G4double a
Definition: TRTMaterials.hh:39
bool G4bool
Definition: G4Types.hh:79
const G4double x[NPOINTSGL]