From 356a80697a3268aae77681b055e5e835aa2d1a71 Mon Sep 17 00:00:00 2001 From: schodet Date: Mon, 5 May 2003 18:34:25 +0000 Subject: Add: Support de la camera. Sub: size_thresholds. --- 2003/i/buzz/src/vision/size_thresholds.cc | 53 ------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 2003/i/buzz/src/vision/size_thresholds.cc (limited to '2003/i/buzz/src/vision/size_thresholds.cc') diff --git a/2003/i/buzz/src/vision/size_thresholds.cc b/2003/i/buzz/src/vision/size_thresholds.cc deleted file mode 100644 index 3a65d4c..0000000 --- a/2003/i/buzz/src/vision/size_thresholds.cc +++ /dev/null @@ -1,53 +0,0 @@ -// size_thresholds.cc - Chargement de seuils de taille de palets. -// buzz - Programme du robot Efrei Robotique I1-I2 2003 -// Copyright (C) 2003 Nicolas Schodet -#include "size_thresholds.h" - -#include - -// Constructeur. -SizeThresholds::SizeThresholds (const char *filename) -{ - FILE *fp; - SizeThreshold **pt; - int n; - int type, wm, wM, hm, hM; - // Ouvre le fichier. - fp = fopen (filename, "r"); - if (!fp) throw "SizeThresholds::SizeThresholds: fopen failled"; - // Charge chaque lignes. - pt = &m_thresholds; - while (!feof (fp)) - { - n = fscanf (fp, "%d %d %d %d %d\n", &type, &wm, &wM, - &hm, &hM); - if (n != 5) - { - fclose (fp); - throw "SizeThresholds::SizeThresholds: Bad format."; - } - // Ajoute un nouveaux seuil a la collection. - *pt = new SizeThreshold; - (*pt)->type = type; - (*pt)->wm = wm; - (*pt)->wM = wM; - (*pt)->hm = hm; - (*pt)->hM = hM; - pt = &(*pt)->next; - } - // Ferme la liste de seuils. - *pt = 0; - // Ferme le fichier. - fclose (fp); -} - -// Destructeur. -SizeThresholds::~SizeThresholds (void) -{ - SizeThreshold *p, *p2; - for (p = m_thresholds; p; p = p2) - { - p2 = p->next; - delete p; - } -} -- cgit v1.2.3