58 static const G4double kMatrixPrecision = 10E-10;
61 if(cosb > kMatrixPrecision)
63 x = std::atan2(mtx.
zy(), mtx.
zz());
64 y = std::atan2(-mtx.
zx(), cosb);
65 z = std::atan2(mtx.
yx(), mtx.
xx());
69 x = std::atan2(-mtx.
yz(), mtx.
yy());
70 y = std::atan2(-mtx.
zx(), cosb);
91 scaleElement->setAttributeNode(
NewAttribute(
"name", name));
95 element->appendChild(scaleElement);
109 rotationElement->setAttributeNode(
NewAttribute(
"name", name));
110 rotationElement->setAttributeNode(
NewAttribute(
"x", x / degree));
111 rotationElement->setAttributeNode(
NewAttribute(
"y", y / degree));
112 rotationElement->setAttributeNode(
NewAttribute(
"z", z / degree));
113 rotationElement->setAttributeNode(
NewAttribute(
"unit",
"deg"));
114 element->appendChild(rotationElement);
128 positionElement->setAttributeNode(
NewAttribute(
"name", name));
129 positionElement->setAttributeNode(
NewAttribute(
"x", x / mm));
130 positionElement->setAttributeNode(
NewAttribute(
"y", y / mm));
131 positionElement->setAttributeNode(
NewAttribute(
"z", z / mm));
132 positionElement->setAttributeNode(
NewAttribute(
"unit",
"mm"));
133 element->appendChild(positionElement);
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
virtual void DefineWrite(xercesc::DOMElement *)
void Scale_vectorWrite(xercesc::DOMElement *, const G4String &, const G4String &, const G4ThreeVector &)
xercesc::DOMElement * defineElement
void Position_vectorWrite(xercesc::DOMElement *, const G4String &, const G4String &, const G4ThreeVector &)
void Rotation_vectorWrite(xercesc::DOMElement *, const G4String &, const G4String &, const G4ThreeVector &)
static const G4double kLinearPrecision
static const G4double kAngularPrecision
virtual ~G4GDMLWriteDefine()
G4ThreeVector GetAngles(const G4RotationMatrix &)
static const G4double kRelativePrecision
xercesc::DOMElement * NewElement(const G4String &)
xercesc::DOMAttr * NewAttribute(const G4String &, const G4String &)