Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSourcePonctuelle.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
16 /*
17  *
18  */
19 
20 #ifndef __TY_SOURCEPONCTUELLE__
21 #define __TY_SOURCEPONCTUELLE__
22 
26 #include "TYSource.h"
27 #include "TYDirectivity.h"
28 
37 typedef enum
38 {
45 
46 class OSegment3D;
47 
52 {
56 
57  // Methodes
58 public:
70  virtual ~TYSourcePonctuelle();
71 
75  bool operator==(const TYSourcePonctuelle& other) const;
77  bool operator!=(const TYSourcePonctuelle& other) const;
78 
87  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
88 
89  virtual std::string toString() const;
90 
91  virtual DOM_Element toXML(DOM_Element& domElement);
92  virtual int fromXML(DOM_Element domElement);
93 
97  int getType() const
98  {
99  return _type;
100  }
104  void setType(int type);
105 
109  int getObject() const
110  {
111  return _object;
112  }
116  void setObject(int object)
117  {
118  _object = object;
119  }
120 
124  int getTypeRaynt() const
125  {
126  return _typeRaynt;
127  }
132  {
133  _typeRaynt = type;
134  }
135 
140  {
141  return _pPos;
142  }
146  const LPTYPoint getPos() const
147  {
148  return _pPos;
149  }
153  void setPos(const LPTYPoint pPos)
154  {
155  _pPos = pPos;
156  setIsGeometryModified(true);
157  }
158 
163  {
164  return _orientation;
165  }
169  const OVector3D& getOrientation() const
170  {
171  return _orientation;
172  }
176  void setOrientation(const OVector3D& orientation)
177  {
178  _orientation = orientation;
179  }
180 
185  void setHauteur(double hauteur)
186  {
187  _hauteur = hauteur;
188  setIsGeometryModified(true);
189  }
190 
195  double getHauteur()
196  {
197  return _hauteur;
198  }
199  const double getHauteur() const
200  {
201  return _hauteur;
202  }
203 
207  void setDirectivity(TYDirectivity* directivity_)
208  {
209  Directivity = directivity_;
210  }
211 
213  {
214  return Directivity;
215  }
216 
220  enum
221  {
225  TypeUser
226  };
227 
231  enum
232  {
236  objectStar
237  };
238 
239  // Membres
240 protected:
242  int _type;
243 
246 
248  int _object;
249 
252 
255 
257  double _hauteur;
258 
261 private:
263  static const double _tabRA[];
265  static const double _tabCor[];
266 };
267 
273 typedef std::vector<LPTYSourcePonctuelleGeoNode> TYTabSourcePonctuelleGeoNode;
274 // Tableau associatif regroupant un pointeur sur TYElement a un tableau de sources
275 typedef std::map<TYElement*, TYTabSourcePonctuelleGeoNode> TYMapElementTabSources;
276 
277 #endif // __TY_SOURCEPONCTUELLE__
QDomElement DOM_Element
Definition: QT2DOM.h:30
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:430
#define OPROTODECL(classname)
Definition: TYElement.h:64
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:385
std::map< TYElement *, TYTabSourcePonctuelleGeoNode > TYMapElementTabSources
TYGeometryNode TYSourcePonctuelleGeoNode
Noeud geometrique de type TYSourcePonctuelle.
std::vector< LPTYSourcePonctuelleGeoNode > TYTabSourcePonctuelleGeoNode
Collection de noeuds geometriques de type TYSourcePonctuelle.
SmartPtr< TYSourcePonctuelleGeoNode > LPTYSourcePonctuelleGeoNode
Smart Pointer sur TYSourcePonctuelleGeoNode.
TYTypeRaynt
@ SOLID
@ CALCULATED
@ SPHERIC
@ FORCED
@ HEMISPHERIC
Class to define a segment.
Definition: 3d.h:1141
The 3D vector class.
Definition: 3d.h:298
virtual void setIsGeometryModified(bool isModified)
Definition: TYElement.cpp:253
static const double _tabCor[]
Tableau des facteurs de correction.
int _type
Type de cette source.
void setDirectivity(TYDirectivity *directivity_)
: Get/Set directivity to source
virtual int fromXML(DOM_Element domElement)
bool operator!=(const TYSourcePonctuelle &other) const
Operateur !=.
double _hauteur
La hauteur de la source par rapport a l'altitude (dans le cas de source utilisateur).
int _typeRaynt
Type de rayonnement.
OVector3D _orientation
Orientation.
TYDirectivity * getDirectivity() const
virtual DOM_Element toXML(DOM_Element &domElement)
void setOrientation(const OVector3D &orientation)
void setObject(int object)
void setPos(const LPTYPoint pPos)
OVector3D & getOrientation()
void setTypeRaynt(TYTypeRaynt type)
TYSourcePonctuelle & operator=(const TYSourcePonctuelle &other)
Operateur =.
static const double _tabRA[]
Tableau des facteurs de forme RA.
TYDirectivity * Directivity
const OVector3D & getOrientation() const
int _object
Object representant la source.
void setHauteur(double hauteur)
LPTYPoint _pPos
Position.
bool operator==(const TYSourcePonctuelle &other) const
Operateur ==.
const double getHauteur() const
virtual std::string toString() const
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
const LPTYPoint getPos() const