00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 // 00030 // class G4GDMLReadSolids 00031 // 00032 // Class description: 00033 // 00034 // GDML class for loading solids according to specifications in Geant4. 00035 00036 // History: 00037 // - Created. Zoltan Torzsok, November 2007 00038 // ------------------------------------------------------------------------- 00039 00040 #ifndef _G4GDMLREADSOLIDS_INCLUDED_ 00041 #define _G4GDMLREADSOLIDS_INCLUDED_ 00042 00043 #include "G4Types.hh" 00044 #include "G4GDMLReadMaterials.hh" 00045 #include "G4ExtrudedSolid.hh" 00046 00047 class G4VSolid; 00048 class G4QuadrangularFacet; 00049 class G4TriangularFacet; 00050 class G4SurfaceProperty; 00051 00052 class G4GDMLReadSolids : public G4GDMLReadMaterials 00053 { 00054 enum BooleanOp {UNION,SUBTRACTION,INTERSECTION}; 00055 typedef struct { G4double rmin,rmax,z; } zplaneType; 00056 00057 public: 00058 00059 G4VSolid* GetSolid(const G4String&) const; 00060 G4SurfaceProperty* GetSurfaceProperty(const G4String&) const; 00061 00062 virtual void SolidsRead(const xercesc::DOMElement* const); 00063 00064 protected: 00065 00066 G4GDMLReadSolids(); 00067 virtual ~G4GDMLReadSolids(); 00068 00069 void BooleanRead(const xercesc::DOMElement* const,const BooleanOp); 00070 void BoxRead(const xercesc::DOMElement* const); 00071 void ConeRead(const xercesc::DOMElement* const); 00072 void ElconeRead(const xercesc::DOMElement* const); 00073 void EllipsoidRead(const xercesc::DOMElement* const); 00074 void EltubeRead(const xercesc::DOMElement* const); 00075 void XtruRead(const xercesc::DOMElement* const); 00076 void HypeRead(const xercesc::DOMElement* const); 00077 void OrbRead(const xercesc::DOMElement* const); 00078 void ParaRead(const xercesc::DOMElement* const); 00079 void ParaboloidRead(const xercesc::DOMElement* const); 00080 void PolyconeRead(const xercesc::DOMElement* const); 00081 void PolyhedraRead(const xercesc::DOMElement* const); 00082 G4QuadrangularFacet* QuadrangularRead(const xercesc::DOMElement* const); 00083 void ReflectedSolidRead(const xercesc::DOMElement* const); 00084 G4ExtrudedSolid::ZSection SectionRead(const xercesc::DOMElement* const,G4double); 00085 void SphereRead(const xercesc::DOMElement* const); 00086 void TessellatedRead(const xercesc::DOMElement* const); 00087 void TetRead(const xercesc::DOMElement* const); 00088 void TorusRead(const xercesc::DOMElement* const); 00089 void GenTrapRead(const xercesc::DOMElement* const); 00090 void TrapRead(const xercesc::DOMElement* const); 00091 void TrdRead(const xercesc::DOMElement* const); 00092 void TubeRead(const xercesc::DOMElement* const); 00093 void CutTubeRead(const xercesc::DOMElement* const); 00094 void TwistedboxRead(const xercesc::DOMElement* const); 00095 void TwistedtrapRead(const xercesc::DOMElement* const); 00096 void TwistedtrdRead(const xercesc::DOMElement* const); 00097 void TwistedtubsRead(const xercesc::DOMElement* const); 00098 G4TriangularFacet* TriangularRead(const xercesc::DOMElement* const); 00099 G4TwoVector TwoDimVertexRead(const xercesc::DOMElement* const,G4double); 00100 zplaneType ZplaneRead(const xercesc::DOMElement* const); 00101 void OpticalSurfaceRead(const xercesc::DOMElement* const); 00102 }; 00103 00104 #endif