Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYCalculParcours.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 TYCALCUL_PARCOURS_H
24 #define TYCALCUL_PARCOURS_H
25 
26 #include <gtest/gtest_prod.h>
27 
28 #include "TYPointParcours.h"
30 #include <vector>
31 
36 {
37 public:
43  TYCalculParcours(int nNbSegMax, bool _bVertical);
46  bool _bVertical);
53  void InitChangementVariable2D3D(bool bAxeXMoinsSignifiant);
54 
55  // Unused attribute:
56  // int NumPlanCoupe;
57 
65  void AjouterSegmentCoupe(double* ptA, double* ptB, bool isInfra, bool isEcran);
67  void AjouterSegmentSR(double* ptA, double* ptB);
69  void PointTrajetGauche(int i, double* pt);
71  void PointTrajetDroite(int i, double* pt);
77  bool Traitement();
78 
79 private:
80  FRIEND_TEST(test_TYCalculParcours, InitChangementVariable2D3D);
81  FRIEND_TEST(test_TYCalculParcours, AjouterSegmentSR);
82  FRIEND_TEST(test_TYCalculParcours, AjouterSegmentCoupe);
83  FRIEND_TEST(test_TYCalculParcours, PointTrajetGauche);
84  FRIEND_TEST(test_TYCalculParcours, PointTrajetDroite);
85  FRIEND_TEST(test_TYCalculParcours, Traitement);
92  void PointTrajet(int i, double* pt, TYSetGeometriqueParcours* geo);
101  void AjouterSegment(double* ptA, double* ptB, bool isInfra, bool isEcran, TYSetGeometriqueParcours* geo);
112  bool CalculTrajet(TYSetGeometriqueParcours& geoCourant, bool bCoteGauche, bool* PointsAGauche,
113  bool* PointsADroite, TYSetGeometriqueParcours& geoPremierePasse,
114  TYSetGeometriqueParcours*& geoTrajet);
123  int Traite(TYSetGeometriqueParcours& geoDernierePasseGauche,
124  TYSetGeometriqueParcours& geoDernierePasseDroite, TYSetGeometriqueParcours*& geoTrajetGauche,
125  TYSetGeometriqueParcours*& geoTrajetDroite);
126 
128  bool _bVertical;
138 
139  std::vector<TYPointParcours*> _vectorPoint;
140  std::vector<bool> _estUnPointIntersectant; // Array indicating if a point intersects SR
141 };
142 
143 #endif // TYCALCUL_PARCOURS_H
Class for computing path used by TYAcousticPathFinder.
TYSetGeometriqueParcours * _geoImporterDXF
TYSetGeometriqueParcours * _geoSR
std::vector< bool > _estUnPointIntersectant
void AjouterSegmentSR(double *ptA, double *ptB)
Add points A (source) and B (receptor)
void AjouterSegmentCoupe(double *ptA, double *ptB, bool isInfra, bool isEcran)
Add a segment defined by 2 points.
int _nNbSegMax
Number of segments (encountered faces)
void InitChangementVariable2D3D(bool bAxeXMoinsSignifiant)
Select the 2D plane and set _indexXInOut, _indexYInOut, _indexZInOut.
FRIEND_TEST(test_TYCalculParcours, PointTrajetGauche)
int Traite(TYSetGeometriqueParcours &geoDernierePasseGauche, TYSetGeometriqueParcours &geoDernierePasseDroite, TYSetGeometriqueParcours *&geoTrajetGauche, TYSetGeometriqueParcours *&geoTrajetDroite)
Handles the pathfinding for lateral and vertical paths.
TYSetGeometriqueParcours * _geoTrajetGauche
Paths list on the left.
FRIEND_TEST(test_TYCalculParcours, PointTrajetDroite)
~TYCalculParcours()
Destructor.
bool Traitement()
Build the left and right geometric paths.
FRIEND_TEST(test_TYCalculParcours, AjouterSegmentCoupe)
TYCalculParcours(int nNbSegMax, bool _bVertical)
Constructor.
void PointTrajetDroite(int i, double *pt)
Return the ith point of the right geometric path.
int NombrePointsTrajetDroite()
Return the points number of the left geometric path.
void PointTrajetGauche(int i, double *pt)
Return the ith point of the left geometric path.
int NombrePointsTrajetGauche()
Return the points number of the right geometric path.
FRIEND_TEST(test_TYCalculParcours, InitChangementVariable2D3D)
bool _bVertical
True if horizontal view.
void AjouterSegment(double *ptA, double *ptB, bool isInfra, bool isEcran, TYSetGeometriqueParcours *geo)
creates and add vector AB into geo
FRIEND_TEST(test_TYCalculParcours, Traitement)
FRIEND_TEST(test_TYCalculParcours, AjouterSegmentSR)
TYSetGeometriqueParcours _geoDernierePasseGauche
TYSetGeometriqueParcours * _geoTrajetDroite
Paths list on the right.
TYSetGeometriqueParcours _geoDernierePasseDroite
std::vector< TYPointParcours * > _vectorPoint
void PointTrajet(int i, double *pt, TYSetGeometriqueParcours *geo)
copy coordinates from the point of index i from the object geo into pt
bool CalculTrajet(TYSetGeometriqueParcours &geoCourant, bool bCoteGauche, bool *PointsAGauche, bool *PointsADroite, TYSetGeometriqueParcours &geoPremierePasse, TYSetGeometriqueParcours *&geoTrajet)
select the points that could be included in the path
Class to build a geometric path used by the TYCalculParcours class.