Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // 26 // 27 27 28 #include "G4Polyhedron.hh" 28 #include "G4Polyhedron.hh" 29 29 30 G4Polyhedron::G4Polyhedron () << 30 G4Polyhedron::G4Polyhedron (): 31 = default; << 31 fNumberOfRotationStepsAtTimeOfCreation (fNumberOfRotationSteps) 32 << 33 G4Polyhedron::G4Polyhedron (G4int Nvert, G4int << 34 HepPolyhedron (Nvert, Nface) << 35 {} 32 {} 36 33 37 G4Polyhedron::~G4Polyhedron () = default; << 34 G4Polyhedron::~G4Polyhedron () {} 38 35 39 G4Polyhedron::G4Polyhedron (const HepPolyhedro 36 G4Polyhedron::G4Polyhedron (const HepPolyhedron& from) 40 : HepPolyhedron(from) 37 : HepPolyhedron(from) 41 { 38 { 42 fNumberOfRotationStepsAtTimeOfCreation = 39 fNumberOfRotationStepsAtTimeOfCreation = 43 from.fNumberOfRotationSteps; 40 from.fNumberOfRotationSteps; 44 } 41 } 45 42 46 G4PolyhedronBox::G4PolyhedronBox (G4double dx, 43 G4PolyhedronBox::G4PolyhedronBox (G4double dx, G4double dy, G4double dz): 47 G4Polyhedron (HepPolyhedronBox (dx, dy, dz)) 44 G4Polyhedron (HepPolyhedronBox (dx, dy, dz)) {} 48 45 49 G4PolyhedronBox::~G4PolyhedronBox () = default << 46 G4PolyhedronBox::~G4PolyhedronBox () {} 50 47 51 G4PolyhedronCone::G4PolyhedronCone (G4double R << 48 G4PolyhedronCone::G4PolyhedronCone (G4double Rmn1, G4double Rmx1, 52 G4double R 49 G4double Rmn2, G4double Rmx2, G4double Dz): 53 G4Polyhedron (HepPolyhedronCone (Rmn1, Rmx1, 50 G4Polyhedron (HepPolyhedronCone (Rmn1, Rmx1, Rmn2, Rmx2, Dz)) {} 54 51 55 G4PolyhedronCone::~G4PolyhedronCone () = defau << 52 G4PolyhedronCone::~G4PolyhedronCone () {} 56 53 57 G4PolyhedronCons::G4PolyhedronCons (G4double R << 54 G4PolyhedronCons::G4PolyhedronCons (G4double Rmn1, G4double Rmx1, 58 G4double R 55 G4double Rmn2, G4double Rmx2, G4double Dz, 59 G4double P 56 G4double Phi1, G4double Dphi): 60 G4Polyhedron (HepPolyhedronCons (Rmn1, Rmx1, 57 G4Polyhedron (HepPolyhedronCons (Rmn1, Rmx1, Rmn2, Rmx2, Dz, Phi1, Dphi)) {} 61 58 62 G4PolyhedronCons::~G4PolyhedronCons () = defau << 59 G4PolyhedronCons::~G4PolyhedronCons () {} 63 60 64 G4PolyhedronPara::G4PolyhedronPara (G4double D 61 G4PolyhedronPara::G4PolyhedronPara (G4double Dx, G4double Dy, G4double Dz, 65 G4double A 62 G4double Alpha, G4double Theta, 66 G4double P 63 G4double Phi): 67 G4Polyhedron (HepPolyhedronPara (Dx, Dy, Dz, 64 G4Polyhedron (HepPolyhedronPara (Dx, Dy, Dz, Alpha, Theta, Phi)) {} 68 65 69 G4PolyhedronPara::~G4PolyhedronPara () = defau << 66 G4PolyhedronPara::~G4PolyhedronPara () {} 70 67 71 G4PolyhedronPcon::G4PolyhedronPcon (G4double p 68 G4PolyhedronPcon::G4PolyhedronPcon (G4double phi, G4double dphi, G4int nz, 72 const G4do 69 const G4double *z, 73 const G4do 70 const G4double *rmin, 74 const G4do 71 const G4double *rmax): 75 G4Polyhedron (HepPolyhedronPcon (phi, dphi, 72 G4Polyhedron (HepPolyhedronPcon (phi, dphi, nz, z, rmin, rmax)) {} 76 73 77 G4PolyhedronPcon::G4PolyhedronPcon (G4double p << 74 G4PolyhedronPcon::~G4PolyhedronPcon () {} 78 const std: << 79 G4Polyhedron (HepPolyhedronPcon(phi, dphi, r << 80 << 81 G4PolyhedronPcon::~G4PolyhedronPcon () = defau << 82 75 83 G4PolyhedronPgon::G4PolyhedronPgon (G4double p 76 G4PolyhedronPgon::G4PolyhedronPgon (G4double phi, G4double dphi, G4int npdv, 84 G4int nz, 77 G4int nz, 85 const G4do 78 const G4double *z, 86 const G4do 79 const G4double *rmin, 87 const G4do 80 const G4double *rmax): 88 G4Polyhedron (HepPolyhedronPgon (phi, dphi, 81 G4Polyhedron (HepPolyhedronPgon (phi, dphi, npdv, nz, z, rmin, rmax)) {} 89 82 90 G4PolyhedronPgon::G4PolyhedronPgon (G4double p << 83 G4PolyhedronPgon::~G4PolyhedronPgon () {} 91 const std: << 92 G4Polyhedron (HepPolyhedronPgon(phi, dphi, n << 93 << 94 G4PolyhedronPgon::~G4PolyhedronPgon () = defau << 95 84 96 G4PolyhedronSphere::G4PolyhedronSphere (G4doub 85 G4PolyhedronSphere::G4PolyhedronSphere (G4double rmin, G4double rmax, 97 G4doub 86 G4double phi, G4double dphi, 98 G4doub 87 G4double the, G4double dthe): 99 G4Polyhedron (HepPolyhedronSphere (rmin, rma 88 G4Polyhedron (HepPolyhedronSphere (rmin, rmax, phi, dphi, the, dthe)) {} 100 89 101 G4PolyhedronSphere::~G4PolyhedronSphere () = d << 90 G4PolyhedronSphere::~G4PolyhedronSphere () {} 102 << 103 G4PolyhedronTet::G4PolyhedronTet (const G4doub << 104 const G4doub << 105 const G4doub << 106 const G4doub << 107 G4Polyhedron (HepPolyhedronTet (p0, p1, p2, << 108 << 109 G4PolyhedronTet::~G4PolyhedronTet () = default << 110 91 111 G4PolyhedronTorus::G4PolyhedronTorus (G4double 92 G4PolyhedronTorus::G4PolyhedronTorus (G4double rmin, G4double rmax, 112 G4double 93 G4double rtor, 113 G4double 94 G4double phi, G4double dphi): 114 G4Polyhedron (HepPolyhedronTorus (rmin, rmax 95 G4Polyhedron (HepPolyhedronTorus (rmin, rmax, rtor, phi, dphi)) {} 115 96 116 G4PolyhedronTorus::~G4PolyhedronTorus () = def << 97 G4PolyhedronTorus::~G4PolyhedronTorus () {} 117 98 118 G4PolyhedronTrap::G4PolyhedronTrap (G4double D 99 G4PolyhedronTrap::G4PolyhedronTrap (G4double Dz, G4double Theta, G4double Phi, 119 G4double D 100 G4double Dy1, 120 G4double D 101 G4double Dx1, G4double Dx2, G4double Alp1, 121 G4double D 102 G4double Dy2, 122 G4double D 103 G4double Dx3, G4double Dx4, G4double Alp2): 123 G4Polyhedron (HepPolyhedronTrap (Dz, Theta, 104 G4Polyhedron (HepPolyhedronTrap (Dz, Theta, Phi, Dy1, Dx1, Dx2, Alp1, 124 Dy2, Dx3, D 105 Dy2, Dx3, Dx4, Alp2)) {} 125 106 126 G4PolyhedronTrap::~G4PolyhedronTrap () = defau << 107 G4PolyhedronTrap::~G4PolyhedronTrap () {} 127 108 128 G4PolyhedronTrd1::G4PolyhedronTrd1 (G4double D 109 G4PolyhedronTrd1::G4PolyhedronTrd1 (G4double Dx1, G4double Dx2, 129 G4double D 110 G4double Dy, G4double Dz): 130 G4Polyhedron (HepPolyhedronTrd1 (Dx1, Dx2, D 111 G4Polyhedron (HepPolyhedronTrd1 (Dx1, Dx2, Dy, Dz)) {} 131 112 132 G4PolyhedronTrd1::~G4PolyhedronTrd1 () = defau << 113 G4PolyhedronTrd1::~G4PolyhedronTrd1 () {} 133 114 134 G4PolyhedronTrd2::G4PolyhedronTrd2 (G4double D 115 G4PolyhedronTrd2::G4PolyhedronTrd2 (G4double Dx1, G4double Dx2, 135 G4double D 116 G4double Dy1, G4double Dy2, G4double Dz): 136 G4Polyhedron (HepPolyhedronTrd2 (Dx1, Dx2, D 117 G4Polyhedron (HepPolyhedronTrd2 (Dx1, Dx2, Dy1, Dy2, Dz)) {} 137 118 138 G4PolyhedronTrd2::~G4PolyhedronTrd2 () = defau << 119 G4PolyhedronTrd2::~G4PolyhedronTrd2 () {} 139 120 140 G4PolyhedronTube::G4PolyhedronTube (G4double R 121 G4PolyhedronTube::G4PolyhedronTube (G4double Rmin, G4double Rmax, G4double Dz): 141 G4Polyhedron (HepPolyhedronTube (Rmin, Rmax, 122 G4Polyhedron (HepPolyhedronTube (Rmin, Rmax, Dz)) {} 142 123 143 G4PolyhedronTube::~G4PolyhedronTube () = defau << 124 G4PolyhedronTube::~G4PolyhedronTube () {} 144 125 145 G4PolyhedronTubs::G4PolyhedronTubs (G4double R << 126 G4PolyhedronTubs::G4PolyhedronTubs (G4double Rmin, G4double Rmax, G4double Dz, 146 G4double P 127 G4double Phi1, G4double Dphi): 147 G4Polyhedron (HepPolyhedronTubs (Rmin, Rmax, 128 G4Polyhedron (HepPolyhedronTubs (Rmin, Rmax, Dz, Phi1, Dphi)) {} 148 129 149 G4PolyhedronTubs::~G4PolyhedronTubs () = defau << 130 G4PolyhedronTubs::~G4PolyhedronTubs () {} 150 131 151 G4PolyhedronParaboloid::G4PolyhedronParaboloid 132 G4PolyhedronParaboloid::G4PolyhedronParaboloid (G4double r1, G4double r2, 152 133 G4double dz, G4double sPhi, 153 134 G4double dPhi): 154 G4Polyhedron (HepPolyhedronParaboloid(r1, r2 135 G4Polyhedron (HepPolyhedronParaboloid(r1, r2, dz, sPhi, dPhi)) {} 155 136 156 G4PolyhedronParaboloid::~G4PolyhedronParaboloi << 137 G4PolyhedronParaboloid::~G4PolyhedronParaboloid () {} 157 138 158 G4PolyhedronHype::G4PolyhedronHype (G4double r 139 G4PolyhedronHype::G4PolyhedronHype (G4double r1, G4double r2, G4double tan1, 159 G4double t 140 G4double tan2, G4double halfZ): 160 G4Polyhedron (HepPolyhedronHype(r1, r2, tan1 141 G4Polyhedron (HepPolyhedronHype(r1, r2, tan1, tan2, halfZ)) {} 161 142 162 G4PolyhedronHype::~G4PolyhedronHype () = defau << 143 G4PolyhedronHype::~G4PolyhedronHype () {} 163 144 164 G4PolyhedronEllipsoid::G4PolyhedronEllipsoid ( 145 G4PolyhedronEllipsoid::G4PolyhedronEllipsoid (G4double ax, G4double by, 165 << 146 G4double cz, 166 147 G4double zCut1, G4double zCut2): 167 G4Polyhedron (HepPolyhedronEllipsoid (ax, by 148 G4Polyhedron (HepPolyhedronEllipsoid (ax, by, cz, zCut1, zCut2)) {} 168 149 169 G4PolyhedronEllipsoid::~G4PolyhedronEllipsoid << 150 G4PolyhedronEllipsoid::~G4PolyhedronEllipsoid () {} 170 151 171 G4PolyhedronEllipticalCone::G4PolyhedronEllipt 152 G4PolyhedronEllipticalCone::G4PolyhedronEllipticalCone (G4double ax, 172 153 G4double ay, 173 << 154 G4double h, 174 155 G4double zCut1): 175 G4Polyhedron (HepPolyhedronEllipticalCone (a 156 G4Polyhedron (HepPolyhedronEllipticalCone (ax, ay, h, zCut1)) {} 176 157 177 G4PolyhedronEllipticalCone::~G4PolyhedronEllip << 158 G4PolyhedronEllipticalCone::~G4PolyhedronEllipticalCone () {} 178 << 179 G4PolyhedronHyperbolicMirror::G4PolyhedronHype << 180 << 181 << 182 G4Polyhedron (HepPolyhedronHyperbolicMirror( << 183 << 184 G4PolyhedronHyperbolicMirror::~G4PolyhedronHyp << 185 << 186 G4PolyhedronTetMesh:: << 187 G4PolyhedronTetMesh(const std::vector<G4ThreeV << 188 G4Polyhedron (HepPolyhedronTetMesh(tetrahedr << 189 << 190 G4PolyhedronTetMesh::~G4PolyhedronTetMesh () = << 191 << 192 G4PolyhedronBoxMesh:: << 193 G4PolyhedronBoxMesh(G4double sizeX, G4double s << 194 const std::vector<G4ThreeV << 195 G4Polyhedron (HepPolyhedronBoxMesh(sizeX, si << 196 << 197 G4PolyhedronBoxMesh::~G4PolyhedronBoxMesh () = << 198 159 199 std::ostream& operator<<(std::ostream& os, con 160 std::ostream& operator<<(std::ostream& os, const G4Polyhedron& polyhedron) 200 { 161 { 201 os << "G4Polyhedron: " 162 os << "G4Polyhedron: " 202 << (const G4Visible&)polyhedron << '\n' 163 << (const G4Visible&)polyhedron << '\n' 203 << (const HepPolyhedron&)polyhedron; 164 << (const HepPolyhedron&)polyhedron; 204 return os; 165 return os; 205 } 166 } 206 167