Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYTask.h
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 #ifndef __TY_TASK__
17 #define __TY_TASK__
18 
21 
22 class nodes_pool_t;
23 class triangle_pool_t;
24 class material_pool_t;
25 
29 class TYTask : public OTask
30 {
31 public:
39  TYTask(const tympan::nodes_pool_t& nodes, const tympan::triangle_pool_t& triangles,
40  const tympan::material_pool_t& materials, int nNbTrajets);
41 
42  ~TYTask();
43 
44  void main();
45 
46 private:
51  virtual void getRayonFromTrajet(OSegment3D& rayon) = 0;
52 
57  virtual void selectFaces(OSegment3D& rayon) = 0;
58 
69  virtual void computePath(TabPoint3D& ptsTop, TabPoint3D& ptsLeft, TabPoint3D& ptsRight) = 0;
70 
78  virtual void launchAcousticComputation(TabPoint3D& ptsTop, TabPoint3D& ptsLeft, TabPoint3D& ptsRight) = 0;
79 
80 protected:
81  std::deque<TYSIntersection> _tabIntersect;
82 
83 private:
84  unsigned int _nNbTrajets;
85 
89 };
90 
92 
93 #endif // __TY_TASK__
std::vector< OPoint3D > TabPoint3D
Definition: 3d.h:483
SmartPtr< TYTask > LPTYTask
Smart Pointer on TYTask.
Definition: TYTask.h:91
Class to define a segment.
Definition: 3d.h:1141
Task of a threads collection.
Definition: threading.h:168
Task of a thread collection for Tympan.
Definition: TYTask.h:30
virtual void computePath(TabPoint3D &ptsTop, TabPoint3D &ptsLeft, TabPoint3D &ptsRight)=0
Delegate to solver the computation of the intersecting top, left and right points between the scene a...
void main()
Main procedure to run the task.
Definition: TYTask.cpp:28
const tympan::material_pool_t & _materials
Definition: TYTask.h:88
virtual void getRayonFromTrajet(OSegment3D &rayon)=0
Build a ray from the source->receptor Trajet.
const tympan::nodes_pool_t & _nodes
Definition: TYTask.h:86
~TYTask()
Destructor.
Definition: TYTask.cpp:26
unsigned int _nNbTrajets
Path number.
Definition: TYTask.h:84
virtual void selectFaces(OSegment3D &rayon)=0
Delegate to solver the build of the intersecting faces between the scene and the ray.
std::deque< TYSIntersection > _tabIntersect
Array of intersections.
Definition: TYTask.h:81
virtual void launchAcousticComputation(TabPoint3D &ptsTop, TabPoint3D &ptsLeft, TabPoint3D &ptsRight)=0
Delegate to solver the acoustic computation for this task.
TYTask(const tympan::nodes_pool_t &nodes, const tympan::triangle_pool_t &triangles, const tympan::material_pool_t &materials, int nNbTrajets)
Constructor.
Definition: TYTask.cpp:20
const tympan::triangle_pool_t & _triangles
Definition: TYTask.h:87
std::deque< Point > nodes_pool_t
std::deque< material_ptr_t > material_pool_t
Definition: entities.hpp:56
std::deque< AcousticTriangle > triangle_pool_t
Array of AcousticTriangle.
Definition: entities.hpp:227