|
quantities/Position.hGo to the documentation of this file.00001 //============================================================================ 00002 // Author : Alessandro Pinto <apinto@eecs.berkeley.edu> 00003 // University of California, Berkeley 00004 // 545 Cory Hall, Berkeley, CA 94720 00005 // Copyright : See COPYING file that comes with this distribution 00006 //============================================================================ 00007 00008 #ifndef POSITION_H_ 00009 #define POSITION_H_ 00010 00011 #include <iostream> 00012 #include <string> 00013 #include <vector> 00014 #include "math.h" 00015 #include "../core/Quantity.h" 00016 00017 namespace cosi { 00018 00019 class Position : public Quantity { 00020 std::vector<double> mPosition; 00021 public: 00022 Position(); 00023 Position(double pX, double pY, double pZ); 00024 ~Position(); 00025 00026 Position Get(); 00027 void Set(Position pP); 00028 std::vector<double> GetValue(); 00029 00030 double GetX() const; 00031 double GetY() const; 00032 double GetZ() const; 00033 00034 bool operator ==(Position pP); 00035 00036 Position operator+(Position pT); 00037 00038 Position operator-(Position pT); 00039 00040 bool operator<(const Position &pP) const ; 00041 00042 friend std::ostream& operator <<(std::ostream &pOs, const Position &pP); 00043 00044 static std::string sQuantityType; 00045 static std::string sQuantityName; 00046 00047 }; 00048 00049 extern double Norm1(Position P1, Position P2); 00050 extern double Norm2(Position P1, Position P2); 00051 00052 } 00053 00054 #endif /*POSITION_H_*/ Generated on Sun Sep 7 18:37:43 2008 for COSI by 1.5.4 |