Geant4 Cross Reference |
1 // -*- C++ -*- 1 // -*- C++ -*- 2 // ------------------------------------------- 2 // --------------------------------------------------------------------------- 3 // 3 // 4 // This file is a part of the CLHEP - a Class 4 // This file is a part of the CLHEP - a Class Library for High Energy Physics. 5 // 5 // 6 // This is the implementation of those methods 6 // This is the implementation of those methods of the Hep3Vector class which 7 // require linking of the HepRotation class. 7 // require linking of the HepRotation class. These methods have been broken 8 // out of ThreeVector.cc. 8 // out of ThreeVector.cc. 9 // 9 // 10 10 11 #include "CLHEP/Vector/ThreeVector.h" 11 #include "CLHEP/Vector/ThreeVector.h" 12 #include "CLHEP/Vector/Rotation.h" 12 #include "CLHEP/Vector/Rotation.h" 13 13 14 namespace CLHEP { 14 namespace CLHEP { 15 15 16 Hep3Vector & Hep3Vector::operator *= (const He 16 Hep3Vector & Hep3Vector::operator *= (const HepRotation & m1) { 17 return *this = m1 * (*this); 17 return *this = m1 * (*this); 18 } 18 } 19 19 20 Hep3Vector & Hep3Vector::transform(const HepRo 20 Hep3Vector & Hep3Vector::transform(const HepRotation & m1) { 21 return *this = m1 * (*this); 21 return *this = m1 * (*this); 22 } 22 } 23 23 24 Hep3Vector & Hep3Vector::rotate(double angle1, 24 Hep3Vector & Hep3Vector::rotate(double angle1, const Hep3Vector & aaxis){ 25 HepRotation trans; 25 HepRotation trans; 26 trans.rotate(angle1, aaxis); 26 trans.rotate(angle1, aaxis); 27 operator*=(trans); 27 operator*=(trans); 28 return *this; 28 return *this; 29 } 29 } 30 30 31 } // namespace CLHEP 31 } // namespace CLHEP 32 32