Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYRectangularMaillage.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14  */
15 
16 /*
17  *
18  *
19  *
20  *
21  */
22 
23 #ifndef __TY_RECTANGULAR_MAILLAGE__
24 #define __TY_RECTANGULAR_MAILLAGE__
25 
27 #include "TYMaillage.h"
28 
39 {
43 
44  // Methodes
45 public:
52 
59 
65  virtual ~TYRectangularMaillage();
66 
69 
71  bool operator==(const TYRectangularMaillage& other) const;
72 
74  bool operator!=(const TYRectangularMaillage& other) const;
75 
84  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
85 
86  virtual std::string toString() const;
87 
88  virtual DOM_Element toXML(DOM_Element& domElement);
89  virtual int fromXML(DOM_Element domElement);
90 
91  bool toXML(const std::string& sFilePath);
92 
93  bool fromXML(const std::string& sFilePath);
94 
95  std::string toXMLString();
96 
97  bool fromXMLString(const std::string& sXMLString);
98 
102  virtual void clearResult();
103 
111  virtual void make(LPTYRectangle pRect, double densiteX = TY_MAILLAGE_DEFAULT_DENSITE,
112  double densiteY = TY_MAILLAGE_DEFAULT_DENSITE);
113 
120  {
121  return _pRect;
122  }
123 
129  double getDensiteX() const
130  {
131  return _densiteX;
132  }
133 
139  double getDensiteY() const
140  {
141  return _densiteY;
142  }
143 
148  void getDimensionsAndSteps(unsigned long& x, unsigned long& y, OVector3D& stepx, OVector3D& stepy) const;
149 
156  {
157  return &_posLabel;
158  }
159 
166  virtual int getIndexPtCalcul(int x, int y) const;
167 
173  virtual void getDimensions(int& x, int& y) const;
174 
175  // Membres
176 protected:
178 
181 
183  double _densiteX;
184 
186  double _densiteY;
187 
189  double _nbPointsX;
190 };
191 
194 
197 
200 
202 typedef std::vector<LPTYRectangularMaillageGeoNode> TYTabRectangularMaillageGeoNode;
203 
204 #endif // __TY_RECTANGULAR_MAILLAGE__
QDomElement DOM_Element
Definition: QT2DOM.h:30
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:432
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
std::vector< LPTYRectangularMaillageGeoNode > TYTabRectangularMaillageGeoNode
Collection de noeuds geometriques de type TYRectangularMaillage.
SmartPtr< TYRectangularMaillageGeoNode > LPTYRectangularMaillageGeoNode
Smart Pointer sur TYRectangularMaillageGeoNode.
SmartPtr< TYRectangularMaillage > LPTYRectangularMaillage
Smart Pointer sur TYRectangularMaillage.
TYGeometryNode TYRectangularMaillageGeoNode
Noeud geometrique de type TYRectangularMaillage.
The 3D vector class.
Definition: 3d.h:298
Classe de definition d'un maillage.
Definition: TYMaillage.h:51
Classe de definition d'un maillage rectangulaire.
virtual DOM_Element toXML(DOM_Element &domElement)
bool fromXMLString(const std::string &sXMLString)
virtual int fromXML(DOM_Element domElement)
virtual ~TYRectangularMaillage()
Destructeur. Le destructeur de la classe TYRectangularMaillage.
double getDensiteY() const
Retourne la densite de points de calcul en Y.
bool operator==(const TYRectangularMaillage &other) const
Operateur ==.
virtual void getDimensions(int &x, int &y) const
Return the dimensions in x and y.
LPTYRectangle getRectangle() const
Retourne le rectangle associe a ce maillage.
void getDimensionsAndSteps(unsigned long &x, unsigned long &y, OVector3D &stepx, OVector3D &stepy) const
Renvoie le nombre de lignes et de colonnes du maillage.En fonction de ses dimensions en 3D et de la d...
double _nbPointsX
Numbers of point in row.
virtual std::string toString() const
TYPoint * getPosLabel()
Renvoie la position sur la maillage permettant l'affichage du label et de la legende.
LPTYRectangle _pRect
Le rectangle associe a ce maillage.
bool operator!=(const TYRectangularMaillage &other) const
Operateur !=.
virtual int getIndexPtCalcul(int x, int y) const
Return the index.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
double getDensiteX() const
Retourne la densite de points de calcul en X.
TYRectangularMaillage & operator=(const TYRectangularMaillage &other)
Operateur =.
double _densiteX
La densite de points de calcul en X.
double _densiteY
La densite de points de calcul en Y.
virtual void make(LPTYRectangle pRect, double densiteX=TY_MAILLAGE_DEFAULT_DENSITE, double densiteY=TY_MAILLAGE_DEFAULT_DENSITE)
Rempli la structure de points de calcul a partir d'un rectangle et de densites de points.
TYRectangularMaillage()
Constructeur. Le constructeur de la classe TYRectangularMaillage.