CLHEP/Geometry/Vector3D.h

00001 // -*- C++ -*-
00002 // $Id: Vector3D.h,v 1.10 2002/04/19 16:33:40 evc Exp $
00003 // ---------------------------------------------------------------------------
00004 //
00005 // This file is a part of the CLHEP - a Class Library for High Energy Physics.
00006 //
00007 // History:
00008 // 13.09.96 E.Chernyaev - initial version
00009 // 12.06.01 E.Chernyaev - CLHEP-1.7: introduction of BasicVector3D to decouple
00010 //                        the functionality from Hep3Vector
00011 //
00012  
00013 #ifndef HEP_VECTOR3D_H
00014 #define HEP_VECTOR3D_H
00015 
00016 #include "CLHEP/config/CLHEP.h"
00017 #include "CLHEP/Geometry/BasicVector3D.h"
00018 
00019 class HepTransform3D;
00020 
00031 class HepVector3D : public BasicVector3D {
00032  public:
00034   HepVector3D() {}
00035 
00037   HepVector3D(double x, double y, double z) : BasicVector3D(x,y,z) {}
00038 
00040   HepVector3D(const BasicVector3D & v) : BasicVector3D(v) {}
00041 
00047   HepVector3D(const Hep3Vector & v) : BasicVector3D(v) {}
00048 
00050   ~HepVector3D() {}
00051 
00053   HepVector3D & operator=(const HepVector3D & v) {
00054     set(v.x(),v.y(),v.z()); return *this;
00055   }
00056 
00059   HepVector3D & operator=(const BasicVector3D & v) {
00060     set(v.x(),v.y(),v.z()); return *this;
00061   }
00062 
00064   HepVector3D& transform(const HepTransform3D &m);
00065 };
00066 
00067 #include "CLHEP/Geometry/Transform3D.h"
00068 
00069 inline HepVector3D & HepVector3D::transform(const HepTransform3D &m) {
00070   return *this = m * (*this);
00071 }
00072 
00073 #endif /* HEP_VECTOR3D_H */

Class Library for High Energy Physics (version 1.8)