File indexing completed on 2025-01-18 09:58:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef G4GDMLWRITESOLIDS_HH
0035 #define G4GDMLWRITESOLIDS_HH 1
0036
0037 #include "G4Types.hh"
0038
0039 #include "G4GDMLWriteMaterials.hh"
0040 #include "G4MultiUnion.hh"
0041
0042 class G4BooleanSolid;
0043 class G4ScaledSolid;
0044 class G4Box;
0045 class G4Cons;
0046 class G4EllipticalCone;
0047 class G4Ellipsoid;
0048 class G4EllipticalTube;
0049 class G4ExtrudedSolid;
0050 class G4Hype;
0051 class G4Orb;
0052 class G4Para;
0053 class G4Paraboloid;
0054 class G4Polycone;
0055 class G4GenericPolycone;
0056 class G4Polyhedra;
0057 class G4Sphere;
0058 class G4TessellatedSolid;
0059 class G4Tet;
0060 class G4Torus;
0061 class G4GenericTrap;
0062 class G4Trap;
0063 class G4Trd;
0064 class G4Tubs;
0065 class G4CutTubs;
0066 class G4TwistedBox;
0067 class G4TwistedTrap;
0068 class G4TwistedTrd;
0069 class G4TwistedTubs;
0070 class G4VSolid;
0071 class G4OpticalSurface;
0072
0073 class G4GDMLWriteSolids : public G4GDMLWriteMaterials
0074 {
0075 class G4ThreeVectorCompare
0076 {
0077 public:
0078
0079 G4bool operator()(const G4ThreeVector& t1, const G4ThreeVector& t2) const
0080 {
0081 if(t1.x() < t2.x()) { return true; }
0082 if(t1.x() > t2.x()) { return false; }
0083
0084 if(t1.y() < t2.y()) { return true; }
0085 if(t1.y() > t2.y()) { return false; }
0086
0087 if(t1.z() < t2.z()) { return true; }
0088
0089 return false;
0090 }
0091 };
0092
0093 public:
0094
0095 virtual void AddSolid(const G4VSolid* const);
0096 virtual void SolidsWrite(xercesc::DOMElement*);
0097
0098 protected:
0099
0100 G4GDMLWriteSolids();
0101 virtual ~G4GDMLWriteSolids();
0102
0103 void MultiUnionWrite(xercesc::DOMElement* solElement,
0104 const G4MultiUnion* const);
0105 void BooleanWrite(xercesc::DOMElement*, const G4BooleanSolid* const);
0106 void ScaledWrite(xercesc::DOMElement*, const G4ScaledSolid* const);
0107 void BoxWrite(xercesc::DOMElement*, const G4Box* const);
0108 void ConeWrite(xercesc::DOMElement*, const G4Cons* const);
0109 void ElconeWrite(xercesc::DOMElement*, const G4EllipticalCone* const);
0110 void EllipsoidWrite(xercesc::DOMElement*, const G4Ellipsoid* const);
0111 void EltubeWrite(xercesc::DOMElement*, const G4EllipticalTube* const);
0112 void XtruWrite(xercesc::DOMElement*, const G4ExtrudedSolid* const);
0113 void HypeWrite(xercesc::DOMElement*, const G4Hype* const);
0114 void OrbWrite(xercesc::DOMElement*, const G4Orb* const);
0115 void ParaWrite(xercesc::DOMElement*, const G4Para* const);
0116 void ParaboloidWrite(xercesc::DOMElement*, const G4Paraboloid* const);
0117 void PolyconeWrite(xercesc::DOMElement*, const G4Polycone* const);
0118 void GenericPolyconeWrite(xercesc::DOMElement*,
0119 const G4GenericPolycone* const);
0120 void PolyhedraWrite(xercesc::DOMElement*, const G4Polyhedra* const);
0121 void SphereWrite(xercesc::DOMElement*, const G4Sphere* const);
0122 void TessellatedWrite(xercesc::DOMElement*,
0123 const G4TessellatedSolid* const);
0124 void TetWrite(xercesc::DOMElement*, const G4Tet* const);
0125 void TorusWrite(xercesc::DOMElement*, const G4Torus* const);
0126 void GenTrapWrite(xercesc::DOMElement*, const G4GenericTrap* const);
0127 void TrapWrite(xercesc::DOMElement*, const G4Trap* const);
0128 void TrdWrite(xercesc::DOMElement*, const G4Trd* const);
0129 void TubeWrite(xercesc::DOMElement*, const G4Tubs* const);
0130 void CutTubeWrite(xercesc::DOMElement*, const G4CutTubs* const);
0131 void TwistedboxWrite(xercesc::DOMElement*, const G4TwistedBox* const);
0132 void TwistedtrapWrite(xercesc::DOMElement*, const G4TwistedTrap* const);
0133 void TwistedtrdWrite(xercesc::DOMElement*, const G4TwistedTrd* const);
0134 void TwistedtubsWrite(xercesc::DOMElement*, const G4TwistedTubs* const);
0135 void ZplaneWrite(xercesc::DOMElement*, const G4double&, const G4double&,
0136 const G4double&);
0137 void RZPointWrite(xercesc::DOMElement*, const G4double&, const G4double&);
0138 void OpticalSurfaceWrite(xercesc::DOMElement*,
0139 const G4OpticalSurface* const);
0140 void PropertyWrite(xercesc::DOMElement*, const G4OpticalSurface* const);
0141
0142 protected:
0143
0144 std::vector<const G4VSolid*> solidList;
0145 xercesc::DOMElement* solidsElement = nullptr;
0146 static const G4int maxTransforms = 8;
0147
0148
0149 };
0150
0151 #endif