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

bspline.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 : bspline.h / 00008 // / 00009 // Creation : 20/11/2005 / 00010 // / 00011 // Description : La classe Bspline permet de spécifier et de dessiner des bsplines. / 00012 // / 00013 // Auteurs : - Guitteny Fabrice / 00014 // - Idiart Baptiste / 00015 // - Le Goff Erwan / 00016 // / 00018 00019 #ifndef BSPLINE_H 00020 #define BSPLINE_H 00021 00022 #include<iostream> 00023 #include <qpainter.h> 00024 #include <vector> 00025 #include "primitive.h" 00026 00027 using namespace std; 00028 00037 00038 // Classe Bspline // 00040 00041 class Bspline : public Primitive 00042 { 00043 00044 public : 00045 00047 Bspline(); 00048 00052 Bspline(const vector<Point3D *>& lPoints); 00053 00057 Bspline(const Bspline& spl); 00058 00059 // destructeur 00060 ~Bspline() {}; 00061 00065 virtual void display(QPainter& paint); 00066 00071 virtual void setPrimitive(QPoint & refPoint, QPoint & modifPoint); 00072 00076 virtual void toXML(QDomElement &elem); 00077 00081 vector<Point3D *> getCtrlPointsList() const; 00082 00086 void addPoint(Point3D * point); 00087 00092 void addPointPosI(Point3D *point, const unsigned int pos); 00093 00094 private : 00095 00096 // fonctions de création des bsplines 00097 double blend(int k, int t, int * u, double v); 00098 Point3D calculatePoint(int * u, int n, int t, double v); 00099 void calculateNodes(int * u, int n, int t); 00100 00101 }; 00102 00103 #endif 00104

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