File indexing completed on 2025-01-18 09:58:19
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 G4GDMLWRITEDEFINE_HH
0035 #define G4GDMLWRITEDEFINE_HH 1
0036
0037 #include "G4Types.hh"
0038 #include "G4ThreeVector.hh"
0039 #include "G4RotationMatrix.hh"
0040
0041 #include "G4GDMLWrite.hh"
0042
0043 class G4GDMLWriteDefine : public G4GDMLWrite
0044 {
0045 public:
0046
0047 G4ThreeVector GetAngles(const G4RotationMatrix&);
0048 void ScaleWrite(xercesc::DOMElement* element, const G4String& name,
0049 const G4ThreeVector& scl)
0050 {
0051 Scale_vectorWrite(element, "scale", name, scl);
0052 }
0053 void RotationWrite(xercesc::DOMElement* element, const G4String& name,
0054 const G4ThreeVector& rot)
0055 {
0056 Rotation_vectorWrite(element, "rotation", name, rot);
0057 }
0058 void PositionWrite(xercesc::DOMElement* element, const G4String& name,
0059 const G4ThreeVector& pos)
0060 {
0061 Position_vectorWrite(element, "position", name, pos);
0062 }
0063 void FirstrotationWrite(xercesc::DOMElement* element, const G4String& name,
0064 const G4ThreeVector& rot)
0065 {
0066 Rotation_vectorWrite(element, "firstrotation", name, rot);
0067 }
0068 void FirstpositionWrite(xercesc::DOMElement* element, const G4String& name,
0069 const G4ThreeVector& pos)
0070 {
0071 Position_vectorWrite(element, "firstposition", name, pos);
0072 }
0073 void AddPosition(const G4String& name, const G4ThreeVector& pos)
0074 {
0075 Position_vectorWrite(defineElement, "position", name, pos);
0076 }
0077
0078 virtual void DefineWrite(xercesc::DOMElement*);
0079
0080 protected:
0081
0082 G4GDMLWriteDefine();
0083 virtual ~G4GDMLWriteDefine();
0084
0085 void Scale_vectorWrite(xercesc::DOMElement*, const G4String&,
0086 const G4String&, const G4ThreeVector&);
0087 void Rotation_vectorWrite(xercesc::DOMElement*, const G4String&,
0088 const G4String&, const G4ThreeVector&);
0089 void Position_vectorWrite(xercesc::DOMElement*, const G4String&,
0090 const G4String&, const G4ThreeVector&);
0091
0092 protected:
0093
0094 static const G4double kRelativePrecision;
0095 static const G4double kAngularPrecision;
0096 static const G4double kLinearPrecision;
0097
0098 xercesc::DOMElement* defineElement = nullptr;
0099 };
0100
0101 #endif