summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/space.hh
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/see/space.hh')
-rw-r--r--2005/i/robert/src/ovision/see/space.hh83
1 files changed, 29 insertions, 54 deletions
diff --git a/2005/i/robert/src/ovision/see/space.hh b/2005/i/robert/src/ovision/see/space.hh
index 0a3b224..1adaed8 100644
--- a/2005/i/robert/src/ovision/see/space.hh
+++ b/2005/i/robert/src/ovision/see/space.hh
@@ -24,81 +24,56 @@
#define space_h
#include <vector>
-#include <iostream>
-#include <stdio.h>
#include "group.hh"
#include "oconfig.hh"
-//#define NB_NODES_X 5
-//#define NB_NODES_Y 3
-
-//#define START_WEIGHT_MIN 0.1
-//#define START_WEIGHT_MAX 0.9
-
-
-struct SETUP_POINT
-{
- int x, y;
- int distx, disty;
-};
-
-
/// Etalonnage des distances et localisation de la balle
class Space
{
/// Classe config
- OConfig *oconfig;
-
+ OConfig *oconfig_;
+ /// hauteur de l'image
+ int imgHeight_;
+ /// largeur de l'image
+ int imgWidth_;
/// tableau d'index des distances
- double *tabX;
- double *tabY;
-
+ double *tabX_, *tabY_;
/// liste des distances etalonnees
- std::vector<SETUP_POINT> setupTab;
-
- /// hautdddeur de l'image
- int imgHeight;
-
- /// largeur de l'image
- int imgWidth;
-
- double aY, bY, cY;
+ struct SetupPoint;
+ std::vector<SetupPoint> setupTab;
+ double aY_, bY_, cY_;
public:
-
- // Constructeur
- Space (int width, int height);
-
- // Destructeur
+ /// Constructeur
+ Space (const int width, const int height);
+ /// Destructeur
~Space ();
-
/// Position d'un objet dans le referentiel du robot
- void GetLoc(int locImgX, int locImgY, int &locX, int &locY);
- void GetLoc(int locImgX, int locImgY, double &locX, double &locY);
-
+ void getLoc (const int locImgX, const int locImgY, int &locX, int &locY_);
+ void getLoc (const int locImgX, const int locImgY, double &locX, double &locY_);
/// Donne la position reelle sur la table de la balle
- void GetPos(double locX, double locY, double posRobotX, double posRobotY, double angleRobot, double &posX, double &posY);
-
+ void getPos (const double locX, const double locY_, const double posRobotX,
+ const double posRobotY, const double angleRobot, double &posX, double &posY);
/// Ajoute un point pour l'etalonnage
- void AddSetupPoint(int x, int y, int distx, int disty);
-
+ void addSetupPoint (const int x, const int y, const int distx, const int disty);
/// Chargement des points a partir d'un fichier
- void LoadFromFile();
-
+ void loadFromFile ();
/// Etalonnage des distances
- int Setup(double aY, double bY, double cY);
-
- protected:
-
+ int setup (const double aY_, const double bY_, const double cY_);
+
+ private:
+ struct SetupPoint
+ {
+ int x, y;
+ int distx, disty;
+ };
/// Donne les coefficients d'une ligne
- void FindCoeffLine (double x1, double y1, double x2, double y2, double &a, double &b);
-
+ void findCoeffLine (const double x1, const double y1, const double x2, const double y2, double &a, double &b);
/// Cree un fichier gnuplot avec la courbe des points donnés par la courbe x et y
- void CreateGnuPlotFile (int y = 100);
-
+ void createGnuPlotFile (const int y = 100);
/// Cree un fichier avec l'erreur en fonction des itérations
- void LogErrorPoint (FILE *f, int iter);
+ void logErrorPoint (FILE *f, const int iter);
};
#endif // space_h