Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYEtape.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_ETAPE_9613__
24 #define __TY_ETAPE_9613__
25 
29 
30 #include <vector>
31 #include <deque>
32 
46 class TYEtape
47 {
48  // Methods
49 public:
57  // Seems not used anymore also in DefaultSolver
58  // enum EtapeType
59  //{
60  // EtapeReflexZoneSrc,
61  // EtapeReflexZoneMid,
62  // EtapeReflexZoneRcp
63  //};
64 
69  TYEtape();
74  TYEtape(const TYEtape& other);
80  virtual ~TYEtape();
81 
83  TYEtape& operator=(const TYEtape& other);
85  bool operator==(const TYEtape& other) const;
87  bool operator!=(const TYEtape& other) const;
95  {
96  return _type;
97  }
102  {
103  _type = etapeType;
104  }
105 
113  {
114  return _pt;
115  }
116  void setPoint(const OPoint3D& pt)
117  {
118  _pt = pt;
119  }
120 
129  {
130  return _Absorption;
131  }
133  {
134  return _Absorption;
135  }
139  void setAbsorption(const OSpectreOctave& Abso)
140  {
141  _Absorption = Abso;
142  }
143 
152  {
153  return _Attenuation;
154  }
156  {
157  return _Attenuation;
158  }
163  {
164  _Attenuation = Att;
165  }
166  acoustic_event* asEvent() const;
167 
168  double getG()
169  {
170  return _G;
171  }
172 
173  const double getG() const
174  {
175  return _G;
176  }
177 
178  void setG(double G)
179  {
180  _G = G;
181  }
182 
183  // Membres
184 public:
189  double _G;
190 };
191 
193 typedef std::deque<TYEtape> TYTabEtape;
194 
195 #endif // __TY_ETAPE_9613__
All base classes related to 3D manipulation.
std::deque< TYEtape > TYTabEtape
TYEtape collection.
Definition: TYEtape.h:193
ACOUSTIC_EVENT_TYPES
Definition: acoustic_path.h:22
The 3D point class.
Definition: 3d.h:487
The TYEtape class is used to describe a part (a step) of a path (TYChemin) for the computation of tra...
Definition: TYEtape.h:47
const double getG() const
Definition: TYEtape.h:173
const OSpectreOctave getAbsorption() const
Definition: TYEtape.h:132
OPoint3D _pt
The starting point of this step.
Definition: TYEtape.h:186
TYEtape & operator=(const TYEtape &other)
Operator =.
Definition: TYEtape.cpp:27
bool operator!=(const TYEtape &other) const
Operator !=.
Definition: TYEtape.cpp:63
ACOUSTIC_EVENT_TYPES _type
Acoustic event type.
Definition: TYEtape.h:185
const OSpectreOctave getAttenuation() const
Definition: TYEtape.h:155
bool operator==(const TYEtape &other) const
Operator ==.
Definition: TYEtape.cpp:39
TYEtape()
Constructor.
Definition: TYEtape.cpp:18
OSpectreOctave getAttenuation()
Get/Set the attenuation spectrum associated to this step.
Definition: TYEtape.h:151
acoustic_event * asEvent() const
Definition: TYEtape.cpp:68
ACOUSTIC_EVENT_TYPES getType() const
Definition: TYEtape.h:94
void setPoint(const OPoint3D &pt)
Definition: TYEtape.h:116
void setG(double G)
Definition: TYEtape.h:178
double getG()
Definition: TYEtape.h:168
OSpectreOctave _Absorption
absorption Spectrum
Definition: TYEtape.h:187
OSpectreOctave _Attenuation
attenuation Spectrum
Definition: TYEtape.h:188
OPoint3D getPoint() const
Definition: TYEtape.h:112
double _G
ground factor
Definition: TYEtape.h:189
void setAbsorption(const OSpectreOctave &Abso)
Definition: TYEtape.h:139
OSpectreOctave getAbsorption()
Get/Set the absorption spectrum associated to the first point of the step.
Definition: TYEtape.h:128
void setAttenuation(const OSpectreOctave &Att)
Definition: TYEtape.h:162
virtual ~TYEtape()
Destructor.
Definition: TYEtape.cpp:25
void setType(ACOUSTIC_EVENT_TYPES etapeType)
Definition: TYEtape.h:101
This class store data and provide functions to manipulate event in the acoustic context.
Definition: acoustic_path.h:40