Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYTrajet9613Solver.cpp
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 #include "TYTrajet9613Solver.h"
18 
20  : TYTrajet(asrc_, arcpt_)
21 {
22 }
23 
25 {
26  reset();
27 }
28 
30 {
31  _chemins.clear();
32  _cheminsDirect.clear();
33 }
34 
36 {
37  if (this != &other)
38  {
39  TYTrajet::operator=(other);
40  _chemins = other._chemins;
41  _sLP = other._sLP;
42  }
43  return *this;
44 }
45 
47 {
48  if (this != &other)
49  {
50  if (TYTrajet::operator!=(other))
51  {
52  return false;
53  }
54  if (_chemins != other._chemins)
55  {
56  return false;
57  }
58  if (_sLP != other._sLP)
59  {
60  return false;
61  };
62  }
63 
64  return true;
65 }
66 
68 {
69  return !operator==(other);
70 }
71 
73 {
74  _chemins.push_back(chemin);
75 }
76 
78 {
79  _cheminsDirect.push_back(chemin);
80 }
81 
83 {
84  _tabRays.clear();
85  for (size_t i = 0; i < _chemins.size(); i++)
86  {
87  _tabRays.push_back(_chemins[i].get_ray(_ptR));
88  }
89 }
Representation of one of the most optimal path between source and receptor: S—>R. The class TYChemin ...
This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths,...
virtual ~TYTrajet9613Solver()
Destructor.
TYTrajet9613Solver(tympan::AcousticSource &asrc_, tympan::AcousticReceptor &arcpt_)
Constructor.
void addCheminDirect(const TYChemin9613Solver &chemin)
Add a new path to the array of direct paths.
void addChemin(const TYChemin9613Solver &chemin)
Add a new path.
TYTabChemin9613Solver _chemins
Paths collection.
void reset() override
Reset method.
TYTrajet9613Solver & operator=(const TYTrajet9613Solver &other)
Operator =.
bool operator==(const TYTrajet9613Solver &other) const
Operator ==.
TYTabChemin9613Solver _cheminsDirect
Direct paths collection (without obstacles)
bool operator!=(const TYTrajet9613Solver &other) const
Operator !=.
This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths,...
Definition: TYTrajet.h:33
OPoint3D _ptR
Receptor point definition in the site frame.
Definition: TYTrajet.h:139
std::vector< acoustic_path * > _tabRays
Vector of rays equivalent to chemin.
Definition: TYTrajet.h:145
TYTrajet & operator=(const TYTrajet &other)
Operator =.
Definition: TYTrajet.cpp:43
Describes an acoustic receptor.
Definition: entities.hpp:403
Describes an acoustic source.
Definition: entities.hpp:381
This file provides class for solver configuration.