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 #ifdef GNUPRAGMA >> 12 #pragma implementation >> 13 #endif >> 14 11 #include "CLHEP/Vector/ThreeVector.h" 15 #include "CLHEP/Vector/ThreeVector.h" 12 #include "CLHEP/Vector/Rotation.h" 16 #include "CLHEP/Vector/Rotation.h" 13 17 14 namespace CLHEP { 18 namespace CLHEP { 15 19 16 Hep3Vector & Hep3Vector::operator *= (const He << 20 Hep3Vector & Hep3Vector::operator *= (const HepRotation & m) { 17 return *this = m1 * (*this); << 21 return *this = m * (*this); 18 } 22 } 19 23 20 Hep3Vector & Hep3Vector::transform(const HepRo << 24 Hep3Vector & Hep3Vector::transform(const HepRotation & m) { 21 return *this = m1 * (*this); << 25 return *this = m * (*this); 22 } 26 } 23 27 24 Hep3Vector & Hep3Vector::rotate(double angle1, << 28 Hep3Vector & Hep3Vector::rotate(double angle, const Hep3Vector & axis){ 25 HepRotation trans; 29 HepRotation trans; 26 trans.rotate(angle1, aaxis); << 30 trans.rotate(angle, axis); 27 operator*=(trans); 31 operator*=(trans); 28 return *this; 32 return *this; 29 } 33 } 30 34 31 } // namespace CLHEP 35 } // namespace CLHEP 32 36