Moka controlers
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
parameter-operations.hh
Go to the documentation of this file.
1 /*
2  * lib-controler-gmap : Le contrôleur de 3-G-cartes, surcouche de lib-controler.
3  * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS,
6  * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/
7  *
8  * This file is part of lib-controler-gmap
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 //******************************************************************************
25 #ifndef PARAMETER_OPERATIONS_HH
26 #define PARAMETER_OPERATIONS_HH
27 //******************************************************************************
28 #include "controler-gmap-types.hh"
29 #include "parameter.hh"
30 #include "vertex.hh"
31 #include "transformation-matrix.hh"
32 //******************************************************************************
33 namespace GMap3d
34 {
36  {
37  public:
39  CParameterOperations(int ANbRef = 0);
41  virtual ~CParameterOperations();
42  virtual CParameter * copy() const;
44 
46 
47  virtual void save(std::ostream &);
48  virtual void load(std::istream &);
49  virtual void reinit();
50 
52 
54  virtual int getType() const;
55 
56  /*@name Paramètres de plaquage
57  */
59  void setRotateCells(bool ABool);
60  bool getRotateCells() const;
61 
62  void setScaleCells(bool ABool);
63  bool getScaleCells() const;
64 
65  void setTranslateCells(bool ABool);
66  bool getTranslateCells() const;
68 
69  /*@name Paramètres de maillage
70  */
72  int getMeshNbSubdivisionsX() const;
73  int getMeshNbSubdivisionsY() const;
74  int getMeshNbSubdivisionsZ() const;
75 
76  void setMeshNbSubdivisionsX(int ASx);
77  void setMeshNbSubdivisionsY(int ASy);
78  void setMeshNbSubdivisionsZ(int ASz);
79 
81  void setMeshSubdivisionDimensionFrom(int ADim);
82 
83  int getMeshSubdivisionDimensionTo () const;
84  void setMeshSubdivisionDimensionTo (int ADim);
85 
86  bool getInterpolationMerges() const;
87  void setInterpolationMerges(bool ABool);
88 
89  bool getInterpolationSews() const;
90  void setInterpolationSews(bool ABool);
91 
92  bool isActiveInterpolationSews() const;
94 
95  /*@name Paramètres de lissage
96  */
98  bool getSmoothMerges() const;
99  void setSmoothMerges(bool ABool);
100 
101  bool getSmoothSews() const;
102  void setSmoothSews(bool ABool);
103 
105  void setSmoothMethod(TSmoothType AValue);
106  const CTransformationMatrix & getMeshMatrix() const;
107 
108  bool isActiveSmoothMerges() const;
109  bool isActiveSmoothSews () const;
111 
112  /*@name Paramètres d'extrusion
113  */
115  float getExtrusionCoef() const;
116  void setExtrusionCoef(float ACoef);
117 
118  float getExtrusionRevolutionAngle() const;
119  void setExtrusionRevolutionAngle(float AAngle);
120 
121  bool getExtrusionAdjacentSews() const;
122  void setExtrusionAdjacentSews(bool ABool);
123 
125  void setExtrusionInitialPositionMode(int AValue);
126 
128  void setExtrusionInitialDirectionMode(int AValue);
129 
130  bool getExtrusionDirection() const;
131  void setExtrusionDirection(bool ABool);
132 
133  bool getExtrusionScale() const;
134  void setExtrusionScale(bool ABool);
135 
136  bool getExtrusionPonderateSection() const;
137  void setExtrusionPonderateSection(bool ABool);
138 
139  int getExtrusionRevolutionNbEdges() const;
140  void setExtrusionRevolutionNbEdges(int AValue);
142 
143  /*@name Paramètres d'arrondi
144  */
146  float getDefaultRoundingCoefForVertices() const;
147  void setDefaultRoundingCoefForVertices(float ACoef);
148 
149  float getDefaultRoundingCoefForEdges() const;
150  void setDefaultRoundingCoefForEdges(float ACoef);
151 
152  float getDefaultRoundingCoefForFaces() const;
153  void setDefaultRoundingCoefForFaces(float ACoef);
155 
156  private:
157  // Paramètres de plaquage :
158  bool FRotateCells;
159  bool FScaleCells;
160  bool FTranslateCells;
161 
162  // Paramètres de maillage :
163  int FMeshNbSubdivisions[3];
164  bool FInterpolationMerges;
165  bool FInterpolationSews ;
166 
167  // Paramètres de lissage :
168  bool FSmoothMerges;
169  bool FSmoothSews;
170  TSmoothType FSmoothMethod;
171 
172  // Paramètres d'extrusion :
173  float FExtrusionCoef;
174  float FExtrusionRevolutionAngle;
175  bool FExtrusionAdjacentSews;
176  int FExtrusionInitialPositionMode;
177  int FExtrusionInitialDirectionMode;
178  bool FExtrusionDirection;
179  bool FExtrusionScale;
180  bool FExtrusionPonderateSection;
181  int FExtrusionRevolutionNbEdges;
182 
183  // Paramètres de chanfreinage :
184  float FRoundingDefaultCoefs[3];
185  };
186 
187 } // namespace GMap3d
188 //******************************************************************************
189 #endif // PARAMETER_OPERATIONS_HH
190 //******************************************************************************