QGeomVector.hh

Go to the documentation of this file.
00001 
00002 #ifndef _Q_GEOM_VECTOR_HH_
00003 #define _Q_GEOM_VECTOR_HH_
00004 
00005 #include <math.h>
00006 
00012 class QGeomVector
00013 {
00014 public:
00016    QGeomVector();
00017 
00019    QGeomVector(double x, double y, double z);
00020 
00022    virtual ~QGeomVector();
00023 
00025    double GetX() const { return fX; }
00026    
00028    double GetY() const { return fY; }
00029    
00031    double GetZ() const { return fZ; }
00032 
00038    double GetDistance(const QGeomVector& other) const;
00039    
00041    double GetLength() const { return sqrt(fX*fX+fY*fY+fZ*fZ); }
00042 
00044    QGeomVector operator+(const QGeomVector& other) const;
00045    
00047    QGeomVector operator-(const QGeomVector& other) const;
00048 
00049 private:
00050    double fX;
00051    double fY;
00052    double fZ;
00053 };
00054 #endif

Generated on Tue Nov 16 10:49:55 2010 for CUORE Software by  doxygen 1.5.6