Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticRectangleNode.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 #ifndef __TY_ACOUSTICRECTANGLENODE__
21 #define __TY_ACOUSTICRECTANGLENODE__
22 
23 #include "TYAcousticSurfaceNode.h"
24 
25 typedef std::vector<LPTYRectangle> TYTabLPRectangle;
26 
31 {
35 
36  // Methodes
37 public:
49  virtual ~TYAcousticRectangleNode();
50 
54  bool operator==(const TYAcousticRectangleNode& other) const;
56  bool operator!=(const TYAcousticRectangleNode& other) const;
57 
71  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
72 
73  virtual std::string toString() const;
74 
75  virtual DOM_Element toXML(DOM_Element& domElement);
76  virtual int fromXML(DOM_Element domElement);
77 
78  virtual TYTabSourcePonctuelleGeoNode getSrcs() const;
79  virtual TYSourcePonctuelle srcPonctEquiv() const;
80  virtual void distriSrcs();
81  virtual bool setSrcsLw();
82  virtual double activeSurface();
83  virtual bool remAcousticSurf(const LPTYAcousticSurfaceGeoNode pAccSurfGeoNode);
84  virtual bool remAcousticSurf(const LPTYAcousticSurface pAccSurf);
85  virtual bool remAcousticSurf(QString idAccSurf);
86  virtual void remAllSrcs();
87 
94  virtual void setSizeX(float sizeX);
101  virtual void setSizeY(float sizeY);
109  virtual void setSize(float sizeX, float sizeY);
116  void getSize(float& sizeX, float& sizeY);
122  virtual float getSizeX();
128  virtual float getSizeY();
129 
136  void scale(float factorX, float factorY);
142  void scale(float factor)
143  {
144  scale(factor, factor);
145  }
146 
157  virtual bool makeGrid(int nbCol, int nbRow);
158 
167  bool addSubRect(LPTYAcousticRectangleGeoNode pAccRectGeoNode);
177  bool addSubRect(LPTYAcousticRectangle pAccRect, TYRepere repRect);
178 
183  virtual void updateGrid();
184 
185 protected:
198  bool makeGrid(int nbCol, int nbRow, const char* childType);
199 
207  void updateGrid(const char* childType);
208 
209 private:
219  bool findNearestRect(const LPTYRectangle currentRect, const TYTabLPRectangle tabGlobal, const short signe,
220  const short dir, TYRectangle& rect);
221 
222  // Membres
223 protected:
224 };
225 
231 typedef std::vector<LPTYAcousticRectangleNodeGeoNode> TYTabAcousticRectangleNodeGeoNode;
232 
233 #endif // __TY_ACOUSTICRECTANGLENODE__
QDomElement DOM_Element
Definition: QT2DOM.h:30
std::vector< LPTYAcousticRectangleNodeGeoNode > TYTabAcousticRectangleNodeGeoNode
Collection de noeuds geometriques de type TYAcousticRectangleNode.
SmartPtr< TYAcousticRectangleNodeGeoNode > LPTYAcousticRectangleNodeGeoNode
Smart Pointer sur TYAcousticRectangleNodeGeoNode.
std::vector< LPTYRectangle > TYTabLPRectangle
TYGeometryNode TYAcousticRectangleNodeGeoNode
Noeud geometrique de type TYAcousticRectangleNode.
#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< LPTYSourcePonctuelleGeoNode > TYTabSourcePonctuelleGeoNode
Collection de noeuds geometriques de type TYSourcePonctuelle.
virtual std::string toString() const
virtual DOM_Element toXML(DOM_Element &domElement)
bool findNearestRect(const LPTYRectangle currentRect, const TYTabLPRectangle tabGlobal, const short signe, const short dir, TYRectangle &rect)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
bool addSubRect(LPTYAcousticRectangleGeoNode pAccRectGeoNode)
void getSize(float &sizeX, float &sizeY)
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
bool operator==(const TYAcousticRectangleNode &other) const
Operateur ==.
void scale(float factorX, float factorY)
virtual void setSize(float sizeX, float sizeY)
virtual TYSourcePonctuelle srcPonctEquiv() const
bool operator!=(const TYAcousticRectangleNode &other) const
Operateur !=.
virtual bool remAcousticSurf(const LPTYAcousticSurfaceGeoNode pAccSurfGeoNode)
TYAcousticRectangleNode & operator=(const TYAcousticRectangleNode &other)
Operateur =.
virtual void setSizeX(float sizeX)
virtual bool makeGrid(int nbCol, int nbRow)
virtual void setSizeY(float sizeY)
virtual int fromXML(DOM_Element domElement)