summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/eraser.hh
diff options
context:
space:
mode:
authorgaillaro2005-05-06 14:43:00 +0000
committergaillaro2005-05-06 14:43:00 +0000
commit9aab8a34ad597c2b46cdde3d7cdc1e44c66c9596 (patch)
tree33dcd7b5fddb67380ad517bccfe76a9cd54b1f4a /2005/i/robert/src/ovision/see/eraser.hh
parent1d6fa32f84b92e6dab641beb918cbb809ce1265b (diff)
modifs avant match vendredi
Diffstat (limited to '2005/i/robert/src/ovision/see/eraser.hh')
-rw-r--r--2005/i/robert/src/ovision/see/eraser.hh27
1 files changed, 22 insertions, 5 deletions
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 <vector>
+#include <string>
#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<unsigned> tabVMin;
- std::vector<unsigned> tabVMax;
+ std::vector<int> tabVMin_;
+ std::vector<int> tabVMax_;
/// Tableau des tailles pour une quille oblique
- std::vector<unsigned> tabOMin;
- std::vector<unsigned> tabOMax;
+ std::vector<int> tabOMin_;
+ std::vector<int> 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