Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

utilities.h

Go to the documentation of this file.
00001 00003 00004 // / 00005 // Projet : Générateur de cylindres généralisés / 00006 // / 00007 // Nom du fichier : utilities.h / 00008 // / 00009 // Creation : 20/11/2005 / 00010 // / 00011 // Description : contient les fonctions partagées par plusieurs classes. / / 00012 // / 00013 // Auteurs : - Guitteny Fabrice / 00014 // - Idiart Baptiste / 00015 // - Le Goff Erwan / 00016 // / 00018 00019 #ifndef UTILITIES_H 00020 #define UTILITIES_H 00021 00022 #include <stdlib.h> 00023 #include <vector> 00024 #include "math.h" 00025 00026 #include <qpainter.h> 00027 00028 #include "../primitives/point.h" 00029 00030 // cast d'un QPoint en Point3D 00031 Point3D * qPointToPoint3D(const QPoint& point); 00032 00033 // cast d'un Point3D * en QPoint 00034 QPoint point3DToQPoint(Point3D * point); 00035 00036 // calcul de la distance entre 2 QPoint 00037 double calculateDistance(const QPoint& center, const QPoint& pTemp); 00038 00039 // égalité entre 2 QPoints 00040 bool equalQPoint(QPoint pA, QPoint pB); 00041 00042 // savoir si 2 QPoints sont "proches" 00043 bool isNear (QPoint p, QPoint pref); 00044 00045 // savoir si on est près d'un point déjà défini 00046 // on retourne l'indice du point de référence dans le vecteur 00047 int nearPoint(QPoint point, vector<QPoint> vect); 00048 00049 // changement de repère : changement aller 00050 Point3D changeCoordinateSystem(const Point3D& point, const Point3D& origin); 00051 00052 // changement de repère : changement retour 00053 Point3D changeCoordinateSystemReverse(const Point3D& point, const Point3D& origin); 00054 00055 // effacer un vector de points 3D 00056 void clearVector(vector<Point3D *> vect); 00057 00058 #endif 00059

Generated on Tue Nov 29 21:58:58 2005 for CylinderGenerator by doxygen 1.3.7