Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYChemin.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 #ifndef __TY_CHEMIN__
17 #define __TY_CHEMIN__
18 
19 #include <deque>
20 #include "TYEtape.h"
23 
31 typedef enum
32 {
44 class TYChemin
45 {
46  // Methods
47 public:
57  TYChemin(const TYChemin& other);
62  virtual ~TYChemin();
63 
65  TYChemin& operator=(const TYChemin& other);
67  bool operator==(const TYChemin& other) const;
69  bool operator!=(const TYChemin& other) const;
70 
75  void calcAttenuation(const TYTabEtape& tabEtapes, const AtmosphericConditions& atmos);
76 
84  {
85  return _attenuation;
86  }
88  {
89  return _attenuation;
90  }
91 
97  {
98  _attenuation = att;
99  }
107  double getLongueur()
108  {
109  return _longueur;
110  }
111  const double getLongueur() const
112  {
113  return _longueur;
114  }
115 
116  void setLongueur(const double& longueur)
117  {
118  _longueur = longueur;
119  }
120 
129  double getDistance()
130  {
131  return _distance;
132  }
133  const double getDistance() const
134  {
135  return _distance;
136  }
137 
138  void setDistance(const double& distance)
139  {
140  _distance = distance;
141  }
142 
147  void setType(const int& type)
148  {
149  _typeChemin = (TYTypeChemin)type;
150  }
151  const
152 
158  int
159  getType() const
160  {
161  return _typeChemin;
162  }
163  // Members
168  void build_eq_path(const TYTabEtape& tabEtapes);
170 
171 protected:
174 
176  double _longueur;
177 
179  double _distance;
180 
183 
186 };
187 
189 typedef std::deque<TYChemin> TYTabChemin;
190 
191 #endif // __TY_CHEMIN__
TYTypeChemin
Definition: TYChemin.h:32
std::deque< TYChemin > TYTabChemin
TYChemin collection.
Definition: TYChemin.h:255
std::deque< TYEtape > TYTabEtape
TYEtape collection.
Definition: TYEtape.h:193
@ CHEMIN_ECRAN
Definition: TYChemin.h:35
@ CHEMIN_REFLEX
Definition: TYChemin.h:36
@ CHEMIN_SOL
Definition: TYChemin.h:34
@ CHEMIN_DIRECT
Definition: TYChemin.h:33
Class for the definition of atmospheric conditions.
The 3D point class.
Definition: 3d.h:487
Representation of one of the most optimal path between source and receptor: S—>R. The class TYChemin ...
Definition: TYChemin.h:71
const double getDistance() const
Definition: TYChemin.h:133
double getDistance()
Definition: TYChemin.h:129
double getLongueur()
Definition: TYChemin.h:107
double _distance
Direct distance between source and receptor.
Definition: TYChemin.h:236
void calcAttenuation(const TYTabEtape &tabEtapes, const AtmosphericConditions &atmos, double dp=0.0, double hs=0.0, double hr=0.0, double Gs=0.5, double Gm=0.5, double Gr=0.5)
Definition: TYChemin.cpp:87
TYChemin & operator=(const TYChemin &other)
Operator =.
bool operator==(const TYChemin &other) const
Operator ==.
void setType(const int &type)
Change the path type.
Definition: TYChemin.h:147
TYTypeChemin _typeChemin
Path type (has an influence on the algorithm)
Definition: TYChemin.h:230
virtual ~TYChemin()
acoustic_path * _eq_path
Equivalent acoustic_path.
Definition: TYChemin.h:246
const OSpectreComplex & getAttenuation() const
Definition: TYChemin.h:87
bool operator!=(const TYChemin &other) const
Operator !=.
int getType() const
Definition: TYChemin.h:159
OSpectreOctave _attenuation
Definition: TYChemin.h:243
void setDistance(const double &distance)
Definition: TYChemin.h:138
acoustic_path * get_ray(OPoint3D ptR)
void setLongueur(const double &longueur)
Definition: TYChemin.h:116
const double getLongueur() const
Definition: TYChemin.h:111
void build_eq_path(const TYTabEtape &tabEtapes)
OSpectreComplex & getAttenuation()
Definition: TYChemin.h:83
void setAttenuation(const OSpectreComplex &att)
Set the attenuation.
Definition: TYChemin.h:96
TYChemin(const TYChemin &other)
OSpectreComplex _attenuation
Attenuation spectrum of the path.
Definition: TYChemin.h:182
double _longueur
Total path length.
Definition: TYChemin.h:233
Acoustic path.
Definition: acoustic_path.h:78