Code_TYMPAN  4.2.0
Industrial site acoustic simulation
DefaultCurvRayEngine.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 DEFAULT_CURV_RAY_ENGINE_H
17 #define DEFAULT_CURV_RAY_ENGINE_H
18 
20 #include <stack>
21 
25 #ifdef TEST_ACCELERATION_RECEPTORS
27 {
28 
29 public:
33  DefaultCurvRayEngine(Scene* _scene, std::vector<Source> *_sources, Solver* _solver, Scene *_recepteurs)
34  : DefaultEngine(_scene, _sources, _solver, _recepteurs) { }
37  {
38  scene = other.scene;
39  sources = other.sources;
40  solver = other.solver;
41  recepteurs = other.recepteurs;
42  }
44  virtual ~DefaultCurvRayEngine() { }
45 
47  virtual bool process();
48 
49 protected:
56  virtual bool traitementRay(Ray* r, std::list<validRay> &result);
57 };
58 #else
60 {
61 
62 public:
64 
65  DefaultCurvRayEngine(Scene* _scene, std::vector<Source> *_sources, Solver* _solver, std::vector<Recepteur> *_recepteurs)
66  : DefaultEngine(_scene, _sources, _solver, _recepteurs) { }
67 
69  {
70  scene = other.scene;
71  sources = other.sources;
72  solver = other.solver;
73  recepteurs = other.recepteurs;
74  }
75 
76  virtual ~DefaultCurvRayEngine() { }
77 
78  virtual bool process();
79 
80 protected:
81  virtual bool traitementRay(Ray* r, std::list<validRay> &result);
82 };
83 #endif
84 
85 #endif //_CURV_RAY
std::vector< Source > * sources
Pointer to all the receptors.
Definition: Engine.h:80
Engine for analytical ray curve tracing.
virtual bool traitementRay(Ray *r, std::list< validRay > &result)
Ray treatment method.
Solver * solver
Pointer to the solver.
Definition: Engine.h:82
Scene * scene
Pointer to the scene.
Definition: Engine.h:79
DefaultCurvRayEngine(Scene *_scene, std::vector< Source > *_sources, Solver *_solver, std::vector< Recepteur > *_recepteurs)
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-40...
Definition: Ray.h:38
The Solver class gives an interface to the developer to add easily a new acoustic method using ray tr...
Definition: Solver.h:42
Default Engine class.
Definition: DefaultEngine.h:25
DefaultCurvRayEngine(const DefaultCurvRayEngine &other)
This class mainly define a mesh (list of Shape) used by the Simulation object.
Definition: Scene.h:50
virtual bool process()
If implemented, process and return true if success.
Scene * recepteurs
Pointer to all the sources.
Definition: Engine.h:81