00001 /* 00002 * lib-controler : Un contrôleur générique de scène 3D. 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 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 #ifndef PARAMETER_GRID_HH 00026 #define PARAMETER_GRID_HH 00027 //****************************************************************************** 00028 #include "parameter.hh" 00029 //****************************************************************************** 00039 class CParameterGrid : public CParameter 00040 { 00041 public: 00046 00049 CParameterGrid(int ANbRef = 0); 00050 CParameterGrid(const CParameterGrid &); 00051 CParameter * copy() const; 00052 00055 virtual ~CParameterGrid(); 00056 00058 00063 00068 virtual void save(std::ostream&); 00069 00074 virtual void load(std::istream&); 00075 00080 virtual void reinit(); 00081 00083 00088 int getLWGrid() const; 00089 void setLWGrid(int); 00091 00096 int getLGGrid() const; // nombre de subdivision de la grille 00097 void setLGGrid(int); 00099 00104 float getCLGrid(int AIndice) const; 00105 const float * getCLGrid() const; 00106 void setCLGrid(int AIndice, float AValue); 00107 void setCLGrid(float AValue0, float AValue1, float AValue2); 00108 void setCLGrid(float const ATab[3]); 00110 00119 bool getDisplayGridXY() const; 00120 void setDisplayGridXY(bool); 00121 void invDisplayGridXY(); 00122 00123 bool getDisplayGridYZ() const; 00124 void setDisplayGridYZ(bool); 00125 void invDisplayGridYZ(); 00126 00127 bool getDisplayGridXZ() const; 00128 void setDisplayGridXZ(bool); 00129 void invDisplayGridXZ(); 00130 00131 bool getDisplayPositiveGridX() const; 00132 void setDisplayPositiveGridX(bool); 00133 void invDisplayPositiveGridX(); 00134 00135 bool getDisplayPositiveGridY() const; 00136 void setDisplayPositiveGridY(bool); 00137 void invDisplayPositiveGridY(); 00138 00139 bool getDisplayPositiveGridZ() const; 00140 void setDisplayPositiveGridZ(bool); 00141 void invDisplayPositiveGridZ(); 00143 00145 virtual int getType() const; 00146 00148 friend std::ostream& operator << (std::ostream&, const CParameterGrid &); 00149 friend std::istream& operator >> (std::istream&, CParameterGrid &); 00150 00151 private: 00153 int FLWGrid; 00154 00156 int FLGGrid; 00157 00159 float FCLGrid[3]; 00160 00162 bool FDisplayGridXY; 00163 bool FDisplayGridYZ; 00164 bool FDisplayGridXZ; 00165 bool FDisplayPositiveGridX; 00166 bool FDisplayPositiveGridY; 00167 bool FDisplayPositiveGridZ; 00168 }; 00169 00170 //****************************************************************************** 00171 #endif // PARAMETER_GRID_HH 00172 //******************************************************************************