00001 /* 00002 * lib-controler-gmap : Le contrôleur de 3-G-cartes, surcouche de lib-controler. 00003 * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC 00004 * http://www.sic.sp2mi.univ-poitiers.fr/ 00005 * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS, 00006 * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/ 00007 * 00008 * This file is part of lib-controler-gmap 00009 * 00010 * This program is free software: you can redistribute it and/or modify 00011 * it under the terms of the GNU Lesser General Public License as published by 00012 * the Free Software Foundation, either version 3 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public License 00021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 00024 //****************************************************************************** 00025 // Ce fichier est une partie de "controler-gmap.hh". 00026 //****************************************************************************** 00027 00028 public: 00029 00031 void setObjectTranslationVector(const CVertex & AVector); 00032 CVertex getObjectTranslationVector() const; 00033 00034 void setObjectTranslationPonderation(bool AActive); 00035 bool getObjectTranslationPonderation() const; 00036 void toggleObjectTranslationPonderation(); 00038 00040 void setObjectRotationAxeVertex(const CVertex & AAxeVertex); 00041 CVertex getObjectRotationAxeVertex() const; 00042 00043 void setObjectRotationAxeVector(const CVertex & AAxeVector); 00044 CVertex getObjectRotationAxeVector() const; 00045 00046 void setObjectRotationAngle(float AAngle); 00047 float getObjectRotationAngle() const; 00048 00049 void setObjectRotationPonderation(bool AActive); 00050 bool getObjectRotationPonderation() const; 00051 void toggleObjectRotationPonderation(); 00053 00055 void setObjectScaleType(TScaleType AScaleType); 00056 TScaleType getObjectScaleType() const; 00057 00058 void setObjectScaleCenter(const CVertex & ACenter); 00059 CVertex getObjectScaleCenter() const; 00060 00061 void setObjectScaleVector(const CVertex & AVector); 00062 CVertex getObjectScaleVector() const; 00063 00064 void setObjectScaleIso(bool AValue); 00065 bool getObjectScaleIso() const; 00066 void toggleObjectScaleIso(); 00067 00068 void setObjectScaleIsoCoef(float AValue); 00069 float getObjectScaleIsoCoef() const; 00070 00071 void setObjectScaleCoef(const CVertex & AValue); 00072 CVertex getObjectScaleCoef() const; 00073 00074 void setObjectScaleCoef(int ADim, float AValue); 00075 float getObjectScaleCoef(int ADim) const; 00076 00077 void setObjectScalePonderation(bool AActive); 00078 bool getObjectScalePonderation() const; 00079 void toggleObjectScalePonderation(); 00081 00082 //****************************************************************************** 00083 00084 private: 00085 00086 //@name Méthodes pour gérer la pondération 00088 void addPonderationCoefs(); 00089 void delPonderationCoefs(); 00090 void updatePonderationCoefs(); 00092 00093 //@name Méthodes permettant de changer de mode 00095 void modeObjectTransformationBegin(bool APonderation); 00096 void modeTranslationBegin(); 00097 void modeRotationBegin(); 00098 void modeScaleBegin(); 00099 00100 void modeObjectTransformationEnd(bool APonderation); 00101 void modeTranslationEnd(); 00102 void modeRotationEnd(); 00103 void modeScaleEnd(); 00104 00106 00107 //@name Méthodes pour la gestion de la souris 00109 00116 void modeTranslationOperationStart(); 00117 void modeRotationOperationStart(); 00118 void modeScaleOperationStart(); 00119 00126 void modeTranslationOperationMove(); 00127 void modeRotationOperationMove(); 00128 void modeScaleOperationMove(); 00129 00136 // Regroupe mode{Translation,Rotation,Scale}OperationStop : 00137 void modeTransformationOperationStop(); 00138 00139 //@name Champs privés pour les déformations (translation, rotation, homothétie) 00141 00142 int FDeformationMark; 00143 int FDirectInfoVertex; 00144 int FDirectInfoPonderation; 00145 00146 bool FDeformationDone; 00147 00149 00150 //******************************************************************************
1.5.8