00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef _G4GDMLWRITEDEFINE_INCLUDED_
00041 #define _G4GDMLWRITEDEFINE_INCLUDED_
00042
00043 #include "G4Types.hh"
00044 #include "G4ThreeVector.hh"
00045 #include "G4RotationMatrix.hh"
00046
00047 #include "G4GDMLWrite.hh"
00048
00049 class G4GDMLWriteDefine : public G4GDMLWrite
00050 {
00051
00052 public:
00053
00054 G4ThreeVector GetAngles(const G4RotationMatrix&);
00055 void ScaleWrite(xercesc::DOMElement* element,
00056 const G4String& name, const G4ThreeVector& scl)
00057 { Scale_vectorWrite(element,"scale",name,scl); }
00058 void RotationWrite(xercesc::DOMElement* element,
00059 const G4String& name, const G4ThreeVector& rot)
00060 { Rotation_vectorWrite(element,"rotation",name,rot); }
00061 void PositionWrite(xercesc::DOMElement* element,
00062 const G4String& name, const G4ThreeVector& pos)
00063 { Position_vectorWrite(element,"position",name,pos); }
00064 void FirstrotationWrite(xercesc::DOMElement* element,
00065 const G4String& name, const G4ThreeVector& rot)
00066 { Rotation_vectorWrite(element,"firstrotation",name,rot); }
00067 void FirstpositionWrite(xercesc::DOMElement* element,
00068 const G4String& name, const G4ThreeVector& pos)
00069 { Position_vectorWrite(element,"firstposition",name,pos); }
00070 void AddPosition(const G4String& name, const G4ThreeVector& pos)
00071 { Position_vectorWrite(defineElement,"position",name,pos); }
00072
00073 virtual void DefineWrite(xercesc::DOMElement*);
00074
00075 protected:
00076
00077 G4GDMLWriteDefine();
00078 virtual ~G4GDMLWriteDefine();
00079
00080 void Scale_vectorWrite(xercesc::DOMElement*, const G4String&,
00081 const G4String&, const G4ThreeVector&);
00082 void Rotation_vectorWrite(xercesc::DOMElement*, const G4String&,
00083 const G4String&, const G4ThreeVector&);
00084 void Position_vectorWrite(xercesc::DOMElement*, const G4String&,
00085 const G4String&, const G4ThreeVector&);
00086
00087 protected:
00088
00089 static const G4double kRelativePrecision;
00090 static const G4double kAngularPrecision;
00091 static const G4double kLinearPrecision;
00092
00093 xercesc::DOMElement* defineElement;
00094
00095 };
00096
00097 #endif