pParticle.H
00001 #ifndef P_PARTICLE
00002 #define P_PARTICLE
00003 class pParticle{
00004 public:
00005
00006
00007 Point2D<float> p;
00008
00009 float prob;
00010 float orientation;
00011
00012 pParticle();
00013 pParticle(const pParticle&);
00014 pParticle(short int, short int);
00015 pParticle(short int , short int , float );
00016
00017 pParticle(short int , short int , float , float);
00018
00019 bool operator< (const pParticle&);
00020 bool operator> (const pParticle&);
00021 bool operator== (const pParticle&);
00022
00023 void setProb(const float);
00024 void setProb(float&);
00025 float getProb();
00026
00027 ~pParticle();
00028
00029 };
00030
00031 inline pParticle::pParticle():p(0,0),prob(0),orientation(0){}
00032 inline pParticle::pParticle(const pParticle& p1):p(p1.p),prob(p1.prob),orientation(p1.orientation) {}
00033 inline pParticle::pParticle(short int x, short int y):p(x,y),prob(0),orientation(0){}
00034 inline pParticle::pParticle(short int x, short int y, float p):p(x,y),prob(p),orientation(0){}
00035
00036 inline pParticle::pParticle(short int x, short int y, float p, float o):p(x,y),prob(p),orientation(o){}
00037
00038 inline bool pParticle::operator< (const pParticle& p1){
00039 return (this->prob) < (p1.prob) ;
00040 }
00041 inline bool pParticle::operator> (const pParticle& p1){
00042 return (this->prob) > (p1.prob);
00043 }
00044 inline bool pParticle::operator== (const pParticle& p1){
00045 return (this->prob) == (p1.prob);
00046 }
00047
00048 inline void pParticle::setProb(const float p){
00049 this->prob = p;
00050 }
00051 inline void pParticle::setProb(float& p){
00052 this->prob = p;
00053 }
00054 inline float pParticle::getProb(){
00055 return this->prob;
00056 }
00057
00058
00059 inline pParticle::~pParticle(){
00060 delete &p;
00061 }
00062
00063 #endif