Page principale | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Composants | Déclarations | Pages associées

curve.h

Aller à la documentation de ce fichier.
00001 /* ***********************************************************************************
00002         Writer:         Sebastien Bloc
00003         Copyright:      2004
00004         eMail:          sebastien.bloc@free.fr
00005         URL:            http://mignonsoft.free.fr
00006 
00007         This program is free software; you can redistribute it and/or
00008         modify it under the terms of the GNU General Public License
00009         as published by the Free Software Foundation; either version 2
00010         of the License, or (at your option) any later version.
00011 
00012         This program is distributed in the hope that it will be useful,
00013         but WITHOUT ANY WARRANTY; without even the implied warranty of
00014         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015         GNU General Public License for more details.
00016         http://www.gnu.org/copyleft/gpl.html
00017 *********************************************************************************** */
00018 
00023 #ifndef INCLUDE_CURVE_H
00024 #define INCLUDE_CURVE_H
00025 
00026 #include "3d.h"
00027 #include "coordonate.h"
00028 
00032 class Curve
00033 {
00034 public:
00035         int nbCutX;     // nb de decoupe en X
00036         int nbCutY;     // nb de decoupe en y
00037         Coordonate<GLdouble> center; // centre de l'incurvation
00038 
00039 public:
00040         Curve()
00041         {
00042                 Zero();
00043         }
00044 
00045         void Zero()
00046         {
00047                 nbCutX=1;
00048                 nbCutY=1;
00049                 center.Set(0.5,0.5);
00050         }
00051 
00052         void operator=(Curve &source)
00053         {
00054                 nbCutX = source.nbCutX;
00055                 nbCutY = source.nbCutY;
00056                 center = source.center;
00057         }
00058 
00059         BOOL Set(GLdouble zCenter,int nbCut) 
00060         {
00061                 if (nbCut<0) return FALSE;
00062                 nbCutX = nbCut;
00063                 nbCutY = nbCut;
00064                 center.Set(0.5,0.5,zCenter);
00065                 return TRUE;
00066         }
00067 
00068         BOOL Set(GLdouble zCenter,int _nbCutX,int _nbCutY) 
00069         {
00070                 if ((nbCutX<0)||(nbCutY<0)) return FALSE;
00071                 nbCutX = _nbCutX;
00072                 nbCutY = _nbCutY;
00073                 center.Set(0.5,0.5,zCenter);
00074                 return TRUE;
00075         }
00076 
00077         BOOL IsActive()
00078         {
00079                 return ((nbCutX>1)||(nbCutY>1))?TRUE:FALSE;
00080         }
00081 };
00082 
00083 #endif

Généré le Thu Apr 8 18:52:12 2004 pour 3D Controls par doxygen 1.3.6