summaryrefslogtreecommitdiff
path: root/2004/i/nono/src/ovision/space.h
diff options
context:
space:
mode:
Diffstat (limited to '2004/i/nono/src/ovision/space.h')
-rw-r--r--2004/i/nono/src/ovision/space.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/2004/i/nono/src/ovision/space.h b/2004/i/nono/src/ovision/space.h
index a10a913..be9686d 100644
--- a/2004/i/nono/src/ovision/space.h
+++ b/2004/i/nono/src/ovision/space.h
@@ -10,6 +10,7 @@
#define POS_ROBOT_ETALONNOGE_X 300
#include "group.h"
+#include "oconfig.h"
struct SETUP_POINT
{
@@ -21,10 +22,13 @@ struct SETUP_POINT
/// Etalonnage des distances et localisation de la balle
class Space
{
+ /// Classe config
+ OConfig *oconfig;
+
/// tableau d'index des distances
uint *tabX;
uint *tabY;
-
+
/// liste des distances etalonnees
std::vector<SETUP_POINT> setupTab;
@@ -43,7 +47,7 @@ class Space
public:
// Constructeur
- Space (int width, int height);
+ Space (int width, int height, OConfig *oconfig);
// Destructeur
~Space ();
@@ -57,6 +61,9 @@ class Space
/// Ajoute un point pour l'etalonnage
void AddSetupPoint(int x, int y, int distx, int disty);
+ /// Chargement des points a partir d'un fichier
+ void Space::LoadFromFile();
+
/// Etalonnage des distances
int Setup();
protected:
@@ -65,6 +72,9 @@ class Space
/// Calcul du determinant caracteristique
int CaracteristicDeterminant(int matrix[][4], int numRow);
+
+ /// Donne la position reelle sur la table de la balle
+ void GetPos(int locX, int locY, int posRobotX, int posRobotY, double angleRobot, int &posX, int &posY);
};
#endif // space_h