00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "GT2005Particle.h"
00011 #include "Tools/Debugging/Debugging.h"
00012 #include "Tools/Actorics/RobotDimensions.h"
00013 #include "Tools/FieldDimensions.h"
00014 #include "Platform/SystemCall.h"
00015 #include "Tools/Debugging/DebugDrawings.h"
00016 #include "Platform/GTAssert.h"
00017
00018 GT2005Particle::GT2005Particle()
00019 {
00020 pose.x = 0;
00021 pose.y = 0;
00022 this->vx = 0;
00023 this->vy = 0;
00024 probability = 0;
00025 vprob = 0;
00026 seenvx = 0;
00027 seenvy = 0;
00028 provx = 0;
00029 provy = 0;
00030 }
00031
00032 GT2005Particle::GT2005Particle(double x, double y, double vx, double vy,
00033 double prob, double vProb)
00034 {
00035 pose.x = x;
00036 pose.y = y;
00037 this->vx = vx;
00038 this->vy = vy;
00039 probability = prob;
00040 vprob = vProb;
00041 seenvx = 0;
00042 seenvy = 0;
00043 provx = 0;
00044 provy = 0;
00045 }
00046
00047 Vector2<double> GT2005Particle::getPosition() const
00048 {
00049 Vector2<double> position(pose.x, pose.y);
00050 return position;
00051 }
00052
00053 Vector2<double> GT2005Particle::getVelocity() const
00054 {
00055 Vector2<double> velocity(vx, vy);
00056 return velocity;
00057 }
00058
00059 void GT2005Particle::setPosition(double x, double y)
00060 {
00061 this->pose.x = x;
00062 this->pose.y = y;
00063 }
00064
00065 void GT2005Particle::setVelocity(double vx, double vy)
00066 {
00067 this->vx = vx;
00068 this->vy = vy;
00069 }
00070
00071 void GT2005Particle::setParameters(double x, double y, double vx, double vy,
00072 double prob, double vProb)
00073 {
00074 this->pose.x = x;
00075 this->pose.y = y;
00076 this->vx = vx;
00077 this->vy = vy;
00078 this->probability = prob;
00079 this->vprob = vProb;
00080 this->seenvx = 0;
00081 this->seenvy = 0;
00082 this->provx = 0;
00083 this->provy = 0;
00084 }
00085