Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYEcran.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_ECRAN__
24 #define __TY_ECRAN__
25 
26 class OSegment3D;
27 
30 
34 class TYEcran : public TYAcousticFaceSet
35 {
39 
40  // Methodes
41 public:
45  TYEcran();
49  TYEcran(const TYEcran& other);
53  virtual ~TYEcran();
54 
58  TYEcran& operator=(const TYEcran& other);
62  bool operator==(const TYEcran& other) const;
66  bool operator!=(const TYEcran& other) const;
67 
81  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
82 
83  virtual std::string toString() const;
84 
85  virtual DOM_Element toXML(DOM_Element& domElement);
86  virtual int fromXML(DOM_Element domElement);
87 
88  virtual void getChilds(LPTYElementArray& childs, bool recursif = true);
89 
90  virtual int intersects(const OSegment3D& seg, TYTabPoint& ptList) const;
91 
93 
98  virtual int isInside(const TYPoint& pt) const;
99 
100  void setacousticFacesPourCalcul(bool bPourCalculTrajet);
101 
107  TYTabPoint getContour() const;
108 
112  TYTabLPPolygon getContours() const;
113 
119  void setHauteur(double hauteur);
125  double getHauteur() const;
126 
132  void setEpaisseur(double epaisseur);
138  double getEpaisseur() const;
139 
147  bool setElements(TYTabPoint tabPts, double hauteur = 2.0, double epaisseur = 0.5);
148 
153  void updateGeometry();
154 
155 protected:
156  // Membres
157 protected:
159  double _hauteur;
161  double _epaisseur;
162 
163 private:
167 
172 
173  // Ajoute pour obtenir un contour simple pour les ecrans
175 
176  // Fonctions annexes pour la construction des faces du volume de l'ecran
178 };
179 
185 typedef std::vector<LPTYEcranGeoNode> TYTabEcranGeoNode;
186 
187 #endif // __TY_ECRAN__
QDomElement DOM_Element
Definition: QT2DOM.h:30
std::vector< LPTYAcousticSurfaceGeoNode > TYTabAcousticSurfaceGeoNode
Collection de noeuds geometriques de type TYAcousticSurface.
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
std::vector< LPTYPolygon > TYTabLPPolygon
Collection de pointeurs de TYPolygon.
Definition: TYDefines.h:349
SmartPtr< TYEcranGeoNode > LPTYEcranGeoNode
Smart Pointer sur TYEcranGeoNode.
Definition: TYEcran.h:183
std::vector< LPTYEcranGeoNode > TYTabEcranGeoNode
Collection de noeuds geometriques de type TYEcran.
Definition: TYEcran.h:185
TYGeometryNode TYEcranGeoNode
Noeud geometrique de type TYEcran.
Definition: TYEcran.h:181
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:432
std::vector< LPTYElement > LPTYElementArray
Definition: TYElement.h:345
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
Class to define a segment.
Definition: 3d.h:1089
The 3D vector class.
Definition: 3d.h:298
void setEpaisseur(double epaisseur)
Definition: TYEcran.cpp:353
void setacousticFacesPourCalcul(bool bPourCalculTrajet)
Definition: TYEcran.cpp:603
bool _bPourCalculTrajet
Definition: TYEcran.h:174
bool _bHauteurModified
la hauteur a ete modifiee
Definition: TYEcran.h:169
void updateGeometry()
Definition: TYEcran.cpp:372
TYTabPoint getContour() const
Definition: TYEcran.cpp:266
virtual ~TYEcran()
Definition: TYEcran.cpp:93
double getHauteur() const
Definition: TYEcran.cpp:362
TYPolygon * newFace(OVector3D s0, OVector3D s1, OVector3D s2, OVector3D s3)
Definition: TYEcran.cpp:382
virtual TYTabAcousticSurfaceGeoNode acousticFaces()
Definition: TYEcran.cpp:608
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYEcran.cpp:179
virtual std::string toString() const
Definition: TYEcran.cpp:174
TYTabPoint _squelette
Definition: TYEcran.h:166
bool operator==(const TYEcran &other) const
Definition: TYEcran.cpp:118
double _hauteur
hauteur de l'ecran
Definition: TYEcran.h:159
TYTabLPPolygon getContours() const
Definition: TYEcran.cpp:295
bool setElements(TYTabPoint tabPts, double hauteur=2.0, double epaisseur=0.5)
Definition: TYEcran.cpp:403
TYEcran()
Definition: TYEcran.cpp:35
TYEcran & operator=(const TYEcran &other)
Definition: TYEcran.cpp:100
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
Definition: TYEcran.cpp:261
bool operator!=(const TYEcran &other) const
Definition: TYEcran.cpp:146
double getEpaisseur() const
Definition: TYEcran.cpp:367
bool _bEpaisseurModified
l'epaisseur a ete modifiee
Definition: TYEcran.h:171
virtual int fromXML(DOM_Element domElement)
Definition: TYEcran.cpp:202
double _epaisseur
epaisseur de l'ecran
Definition: TYEcran.h:161
virtual int isInside(const TYPoint &pt) const
Definition: TYEcran.cpp:631
virtual int intersects(const OSegment3D &seg, TYTabPoint &ptList) const
Definition: TYEcran.cpp:598
void setHauteur(double hauteur)
Definition: TYEcran.cpp:344
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYEcran.cpp:151