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 #ifndef PARAMETER_CREATION_HH 00026 #define PARAMETER_CREATION_HH 00027 //****************************************************************************** 00028 #include "parameter.hh" 00029 #include "vector.hh" 00030 //****************************************************************************** 00031 //@name Flags pour la création de cubes (maillés en dimension < 3) 00032 00034 #define CUBE_X1 (1 << 0) 00035 #define CUBE_X2 (1 << 1) 00036 #define CUBE_Y1 (1 << 2) 00037 #define CUBE_Y2 (1 << 3) 00038 #define CUBE_Z1 (1 << 4) 00039 #define CUBE_Z2 (1 << 5) 00040 00041 #define CUBE_ALL (CUBE_X1 | CUBE_X2 | CUBE_Y1 | CUBE_Y2 | CUBE_Z1 | CUBE_Z2) 00042 00043 #define CUBE_RING_X (CUBE_Y1 | CUBE_Y2 | CUBE_Z1 | CUBE_Z2) 00044 #define CUBE_RING_Y (CUBE_X1 | CUBE_X2 | CUBE_Z1 | CUBE_Z2) 00045 #define CUBE_RING_Z (CUBE_X1 | CUBE_X2 | CUBE_Y1 | CUBE_Y2) 00046 00047 00048 //****************************************************************************** 00049 class CVertex; 00050 00051 namespace GMap3d 00052 { 00053 class CParameterCreation : public CParameter 00054 { 00055 public: 00057 00058 CParameterCreation(int ANbRef = 0); 00059 CParameterCreation(const CParameterCreation &); 00060 virtual ~CParameterCreation(); 00061 virtual CParameter* copy() const; 00062 00064 00066 00067 virtual void save(std::ostream &); 00068 virtual void load(std::istream &); 00069 virtual void reinit(); 00070 00072 00074 00075 int getPolygonNbEdges() const; 00076 void setPolygonNbEdges(int ANbEdges); 00077 00079 00081 00082 int getMeshNbSubdivisionsX() const; 00083 int getMeshNbSubdivisionsY() const; 00084 int getMeshNbSubdivisionsZ() const; 00085 00086 void setMeshNbSubdivisionsX(int ASx); 00087 void setMeshNbSubdivisionsY(int ASy); 00088 void setMeshNbSubdivisionsZ(int ASz); 00089 00090 int getMeshDimension() const; 00091 void setMeshDimension(int ADimension); 00092 00093 int getMeshSubdivisionDimension() const; 00094 void setMeshSubdivisionDimension(int ADimension); 00095 00096 bool getMeshCreatedFacesActive() const; 00097 00098 unsigned char getMeshCreatedFaces() const; 00099 bool getMeshCreatedFace(unsigned char AFace) const; 00100 00101 void setMeshCreatedFaces(unsigned char AFaces); 00102 void setMeshCreatedFace(unsigned char AFace, bool AValue = true); 00103 00105 00107 00108 int getCylinderNbMeridians() const; 00109 void setCylinderNbMeridians(int ANb); 00110 00111 int getCylinderNbParallels() const; 00112 void setCylinderNbParallels(int ANb); 00113 00114 bool getCylinderClosedUp() const; 00115 void setCylinderClosedUp(bool AClosed); 00116 00117 bool getCylinderClosedDown() const; 00118 void setCylinderClosedDown(bool AClosed); 00119 00121 00123 00124 int getPyramidNbMeridians() const; 00125 void setPyramidNbMeridians(int ANb); 00126 00127 int getPyramidNbParallels() const; 00128 void setPyramidNbParallels(int ANb); 00129 00130 bool getPyramidClosed() const; 00131 void setPyramidClosed(bool AClosed); 00132 00134 00136 00137 int getSphereNbMeridians() const; 00138 void setSphereNbMeridians(int ANb); 00139 00140 int getSphereNbParallels() const; 00141 void setSphereNbParallels(int ANb); 00142 00144 00146 00147 int getTorusNbMeridians() const; 00148 void setTorusNbMeridians(int ANb); 00149 00150 int getTorusNbParallels() const; 00151 void setTorusNbParallels(int ANb); 00152 00153 float getTorusRadiusRapport() const; 00154 void setTorusRadiusRapport(float AValue); 00155 00157 00159 virtual int getType() const; 00160 00161 private: 00162 // Nombre d'arêtes du polygone 00163 int FPolygonNbEdges; 00164 00165 // Maillages 00166 int FMeshNbSubdivisions[3]; 00167 int FMeshDimension; 00168 int FMeshSubdivisionDimension; 00169 unsigned char FCreatedFaces; 00170 00171 // Cylindre 00172 int FCylinderNbMeridians; // Nombre de méridiens du cylindre 00173 int FCylinderNbParallels; // Nombre de paralèlles du cylindre 00174 bool FCylinderClosedUp; // Fermeture ou non du bord 1 00175 bool FCylinderClosedDown; // Fermeture ou non du bord 2 00176 00177 // Pyramide 00178 int FPyramidNbMeridians; // Nombre de méridiens de la pyramide 00179 int FPyramidNbParallels; // Nombre de paralèlles de la pyramide 00180 bool FPyramidClosed; // Fermeture ou non de la base 00181 00182 // Sphère 00183 int FSphereNbMeridians; // Nombre de méridiens de la sphère 00184 int FSphereNbParallels; // Nombre de paralèlles de la sphère 00185 00186 // Tore 00187 int FTorusNbMeridians; // Nombre de méridiens du tore 00188 int FTorusNbParallels; // Nombre de paralèlles du tore 00189 float FTorusRadiusRapport; // Rapport entre le petit rayon et le grand 00190 }; 00191 00192 } // namespace GMap3d 00193 //****************************************************************************** 00194 #endif // PARAMETER_CREATION_HH 00195 //******************************************************************************