From 9aab8a34ad597c2b46cdde3d7cdc1e44c66c9596 Mon Sep 17 00:00:00 2001 From: gaillaro Date: Fri, 6 May 2005 14:43:00 +0000 Subject: modifs avant match vendredi --- 2005/i/robert/src/ovision/see/eraser.hh | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to '2005/i/robert/src/ovision/see/eraser.hh') diff --git a/2005/i/robert/src/ovision/see/eraser.hh b/2005/i/robert/src/ovision/see/eraser.hh index 7a98626..b35bb09 100644 --- a/2005/i/robert/src/ovision/see/eraser.hh +++ b/2005/i/robert/src/ovision/see/eraser.hh @@ -24,28 +24,45 @@ #define eraser_h #include +#include #include "oconfig.hh" +struct Zone; + /// Filtre les objets par taille class Eraser { /// Classe oconfig OConfig *oconfig_; /// Tableau des tailles pour une quille verticale - std::vector tabVMin; - std::vector tabVMax; + std::vector tabVMin_; + std::vector tabVMax_; /// Tableau des tailles pour une quille oblique - std::vector tabOMin; - std::vector tabOMax; + std::vector tabOMin_; + std::vector tabOMax_; + /// Résolution des tableaux précédents + int res_; + /// Hauteur maximum de l'image + int maxHeight_; public: /// Constructeur - Eraser (const std::string &filename, const int resolution); + Eraser (const int maxHeight, const int resolution); /// Destructeur ~Eraser (void); + /// Ouvre le fichier de données + void init (const std::string &filename = "../runtime/rc/eraser"); + /// Objet à la bonne taille ? + bool killOrNot (const Zone &zone); + /// Zone trop petite + bool isTooSmall (const Zone &zone); + /// Zone trop grande + bool isTooBig (const Zone &zone); private: + /// Remplissage de la table + void add (const char c, const int y, const int min, const int max); }; #endif // eraser_h -- cgit v1.2.3