Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticSurface.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_ACOUSTICSURFACE__
21 #define __TY_ACOUSTICSURFACE__
22 
24 #include "TYAcousticInterface.h"
30 
35  public TYColorInterface,
36  public TYAcousticInterface,
37  public TYSurfaceInterface
38 {
41 
42  // Methodes
43 public:
55  virtual ~TYAcousticSurface();
56 
60  bool operator==(const TYAcousticSurface& other) const;
62  bool operator!=(const TYAcousticSurface& other) const;
63 
77  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
78 
79  virtual std::string toString() const;
80 
81  virtual DOM_Element toXML(DOM_Element& domElement);
82  virtual int fromXML(DOM_Element domElement);
83 
84  virtual void setIsAcousticModified(bool isModified);
85 
86  virtual void setDensiteSrcsH(double densite, bool recursif = true);
87  virtual void setDensiteSrcsV(double densite, bool recursif = true);
88 
89  virtual void propagateRegime();
90  virtual void propagateAtt(LPTYAttenuateur pAtt);
91  virtual void setCurRegime(int regime);
92  virtual TYTabSourcePonctuelleGeoNode getSrcs() const;
93  virtual TYSourcePonctuelle srcPonctEquiv() const;
94  virtual void distriSrcs();
95  virtual void remAllSrcs();
96  virtual bool setSrcsLw();
97  virtual bool updateAcoustic(const bool& force = false);
98 
99  virtual double surface() const;
100  virtual OVector3D normal() const;
101  virtual OPlan plan() const;
102  virtual TYTabPoint getContour(int n = -1) const;
103  virtual TYTabPoint3D getOContour(int n = -1) const;
104  virtual int intersects(const TYSurfaceInterface* pSurf, OSegment3D& seg) const;
105  virtual int intersects(const OSegment3D& seg, OPoint3D& pt) const;
106  virtual int intersects(const OPoint3D& pt) const;
107 
112 
116  virtual const OPlan& getPlan() const
117  {
118  return _pBoundingRect->getPlan();
119  }
120 
125  {
126  return _pSrcSurf;
127  }
132  {
133  return _pSrcSurf;
134  }
138  void setSrcSurf(const LPTYSourceSurfacic pSrcSurf)
139  {
140  _pSrcSurf = pSrcSurf;
141  _pSrcSurf->setParent(this);
142  }
143 
148  {
149  return _pBoundingRect;
150  }
151 
155  bool getIsSub()
156  {
157  return _isSub;
158  }
162  void setIsSub(bool isSub)
163  {
164  _isSub = isSub;
165  }
166 
171  virtual LPTYMateriauConstruction getMateriau() const;
172 
182  TYSpectre setGlobalLW(const TYSpectre& spectre, const double& surfGlobale, const int& regime = -1);
183 
185  virtual void setIsRayonnant(bool rayonnant = true, bool recursif = true);
186 
188  virtual void exportCSV(std::ofstream& ofs);
189 
190  // Membres
191 protected:
194 
197 
199  bool _isSub;
200 };
201 
203 typedef std::vector<LPTYAcousticSurface> TYTabLPAcousticSurface;
209 typedef std::vector<LPTYAcousticSurfaceGeoNode> TYTabAcousticSurfaceGeoNode;
210 
211 #endif // __TY_ACOUSTICSURFACE__
QDomElement DOM_Element
Definition: QT2DOM.h:30
TYGeometryNode TYAcousticSurfaceGeoNode
Noeud geometrique de type TYAcousticSurface.
std::vector< LPTYAcousticSurface > TYTabLPAcousticSurface
Tableau de TYAcousticSurfaces.
std::vector< LPTYAcousticSurfaceGeoNode > TYTabAcousticSurfaceGeoNode
Collection de noeuds geometriques de type TYAcousticSurface.
SmartPtr< TYAcousticSurfaceGeoNode > LPTYAcousticSurfaceGeoNode
Smart Pointer sur TYAcousticSurfaceGeoNode.
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
std::deque< OPoint3D > TYTabPoint3D
Collection de OPoint3D.
Definition: TYDefines.h:403
#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.
Plan defined by its equation : ax+by+cz+d=0.
Definition: plan.h:31
The 3D point class.
Definition: 3d.h:487
Class to define a segment.
Definition: 3d.h:1089
The 3D vector class.
Definition: 3d.h:298
virtual void setDensiteSrcsV(double densite, bool recursif=true)
TYAcousticSurface & operator=(const TYAcousticSurface &other)
Operateur =.
virtual void remAllSrcs()
virtual int intersects(const TYSurfaceInterface *pSurf, OSegment3D &seg) const
bool _isSub
Indicateur qui precise si la surface est un sous-element d'une face (fenetre ou bouche d'aeration).
const LPTYSourceSurfacic getSrcSurf() const
virtual void setCurRegime(int regime)
virtual double surface() const
bool operator==(const TYAcousticSurface &other) const
Operateur ==.
virtual TYTabPoint3D getOContour(int n=-1) const
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual void propagateAtt(LPTYAttenuateur pAtt)
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
virtual void distriSrcs()
virtual void exportCSV(std::ofstream &ofs)
Export au format csv sur un flux transmis.
TYSpectre setGlobalLW(const TYSpectre &spectre, const double &surfGlobale, const int &regime=-1)
LPTYSourceSurfacic getSrcSurf()
LPTYRectangle _pBoundingRect
Rectangle englobant.
void setSrcSurf(const LPTYSourceSurfacic pSrcSurf)
virtual std::string toString() const
virtual void setDensiteSrcsH(double densite, bool recursif=true)
virtual LPTYSpectre getRealPowerSpectrum()
virtual const OPlan & getPlan() const
virtual LPTYMateriauConstruction getMateriau() const
virtual void propagateRegime()
virtual bool setSrcsLw()
TYRectangle * getBoundingRect()
virtual void setIsAcousticModified(bool isModified)
void setIsSub(bool isSub)
virtual TYTabPoint getContour(int n=-1) const
virtual void setIsRayonnant(bool rayonnant=true, bool recursif=true)
Get/set de l'etat rayonnant ou pas.
virtual OPlan plan() const
virtual TYSourcePonctuelle srcPonctEquiv() const
virtual DOM_Element toXML(DOM_Element &domElement)
virtual OVector3D normal() const
LPTYSourceSurfacic _pSrcSurf
Source surfacique.
bool operator!=(const TYAcousticSurface &other) const
Operateur !=.
virtual int fromXML(DOM_Element domElement)
virtual bool updateAcoustic(const bool &force=false)
void setParent(TYElement *pParent)
Definition: TYElement.h:692
virtual const OPlan & getPlan() const
Definition: TYRectangle.h:252