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