Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSourcePonctuelle.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_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  }
157 
162  {
163  return _orientation;
164  }
168  const OVector3D& getOrientation() const
169  {
170  return _orientation;
171  }
175  void setOrientation(const OVector3D& orientation)
176  {
177  _orientation = orientation;
178  }
179 
184  void setHauteur(double hauteur)
185  {
186  _hauteur = hauteur;
187  setIsGeometryModified(true);
188  }
189 
194  double getHauteur()
195  {
196  return _hauteur;
197  }
198  const double getHauteur() const
199  {
200  return _hauteur;
201  }
202 
206  void setDirectivity(TYDirectivity* directivity_)
207  {
208  Directivity = directivity_;
209  }
210 
212  {
213  return Directivity;
214  }
215 
219  enum
220  {
224  TypeUser
225  };
226 
230  enum
231  {
235  objectStar
236  };
237 
238  // Membres
239 protected:
241  int _type;
242 
245 
247  int _object;
248 
251 
254 
256  double _hauteur;
257 
260 private:
262  static const double _tabRA[];
264  static const double _tabCor[];
265 };
266 
272 typedef std::vector<LPTYSourcePonctuelleGeoNode> TYTabSourcePonctuelleGeoNode;
273 // Tableau associatif regroupant un pointeur sur TYElement a un tableau de sources
274 typedef std::map<TYElement*, TYTabSourcePonctuelleGeoNode> TYMapElementTabSources;
275 
276 #endif // __TY_SOURCEPONCTUELLE__
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::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:1089
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