Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TYCalculParcours Class Reference

Class for computing path used by TYAcousticPathFinder. More...

#include <TYCalculParcours.h>

Collaboration diagram for TYCalculParcours:
Collaboration graph
[legend]

Public Member Functions

 TYCalculParcours (int nNbSegMax, bool _bVertical)
 Constructor. More...
 
 TYCalculParcours (TYSetGeometriqueParcours *geoImporterDXF, TYSetGeometriqueParcours *geoSR, bool _bVertical)
 Other constructor. More...
 
 ~TYCalculParcours ()
 Destructor. More...
 
void InitChangementVariable2D3D (bool bAxeXMoinsSignifiant)
 Select the 2D plane and set _indexXInOut, _indexYInOut, _indexZInOut. More...
 
void AjouterSegmentCoupe (double *ptA, double *ptB, bool isInfra, bool isEcran)
 Add a segment defined by 2 points. More...
 
void AjouterSegmentSR (double *ptA, double *ptB)
 Add points A (source) and B (receptor) More...
 
void PointTrajetGauche (int i, double *pt)
 Return the ith point of the left geometric path. More...
 
void PointTrajetDroite (int i, double *pt)
 Return the ith point of the right geometric path. More...
 
int NombrePointsTrajetDroite ()
 Return the points number of the left geometric path. More...
 
int NombrePointsTrajetGauche ()
 Return the points number of the right geometric path. More...
 
bool Traitement ()
 Build the left and right geometric paths. More...
 

Private Member Functions

 FRIEND_TEST (test_TYCalculParcours, InitChangementVariable2D3D)
 
 FRIEND_TEST (test_TYCalculParcours, AjouterSegmentSR)
 
 FRIEND_TEST (test_TYCalculParcours, AjouterSegmentCoupe)
 
 FRIEND_TEST (test_TYCalculParcours, PointTrajetGauche)
 
 FRIEND_TEST (test_TYCalculParcours, PointTrajetDroite)
 
 FRIEND_TEST (test_TYCalculParcours, Traitement)
 
void PointTrajet (int i, double *pt, TYSetGeometriqueParcours *geo)
 copy coordinates from the point of index i from the object geo into pt More...
 
void AjouterSegment (double *ptA, double *ptB, bool isInfra, bool isEcran, TYSetGeometriqueParcours *geo)
 creates and add vector AB into geo More...
 
bool CalculTrajet (TYSetGeometriqueParcours &geoCourant, bool bCoteGauche, bool *PointsAGauche, bool *PointsADroite, TYSetGeometriqueParcours &geoPremierePasse, TYSetGeometriqueParcours *&geoTrajet)
 select the points that could be included in the path More...
 
int Traite (TYSetGeometriqueParcours &geoDernierePasseGauche, TYSetGeometriqueParcours &geoDernierePasseDroite, TYSetGeometriqueParcours *&geoTrajetGauche, TYSetGeometriqueParcours *&geoTrajetDroite)
 Handles the pathfinding for lateral and vertical paths. More...
 

Private Attributes

int _nNbSegMax
 Number of segments (encountered faces) More...
 
bool _bVertical
 True if horizontal view. More...
 
int _indexXInOut
 
int _indexYInOut
 
int _indexZInOut
 
TYSetGeometriqueParcours_geoImporterDXF
 
TYSetGeometriqueParcours_geoSR
 
TYSetGeometriqueParcours _geoDernierePasseGauche
 
TYSetGeometriqueParcours _geoDernierePasseDroite
 
TYSetGeometriqueParcours_geoTrajetGauche
 Paths list on the left. More...
 
TYSetGeometriqueParcours_geoTrajetDroite
 Paths list on the right. More...
 
std::vector< TYPointParcours * > _vectorPoint
 
std::vector< bool > _estUnPointIntersectant
 

Detailed Description

Class for computing path used by TYAcousticPathFinder.

Definition at line 35 of file TYCalculParcours.h.

Constructor & Destructor Documentation

◆ TYCalculParcours() [1/2]

TYCalculParcours::TYCalculParcours ( int  nNbSegMax,
bool  _bVertical 
)

Constructor.

Parameters
nNbSegMaxMax number of segments for the path
_bVerticalTrue if vertical paths are computed, false if horizontal paths are computed

Definition at line 29 of file TYCalculParcours.cpp.

Here is the call graph for this function:

◆ TYCalculParcours() [2/2]

TYCalculParcours::TYCalculParcours ( TYSetGeometriqueParcours geoImporterDXF,
TYSetGeometriqueParcours geoSR,
bool  _bVertical 
)

Other constructor.

Definition at line 95 of file TYCalculParcours.cpp.

◆ ~TYCalculParcours()

TYCalculParcours::~TYCalculParcours ( )

Destructor.

Definition at line 51 of file TYCalculParcours.cpp.

Member Function Documentation

◆ AjouterSegment()

void TYCalculParcours::AjouterSegment ( double *  ptA,
double *  ptB,
bool  isInfra,
bool  isEcran,
TYSetGeometriqueParcours geo 
)
private

creates and add vector AB into geo

Parameters
double*ptA
double*ptB
boolisInfra
boolisEcran
TYSetGeometriqueParcours*geo

Definition at line 104 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AjouterSegmentCoupe()

void TYCalculParcours::AjouterSegmentCoupe ( double *  ptA,
double *  ptB,
bool  isInfra,
bool  isEcran 
)

Add a segment defined by 2 points.

Parameters
ptAPoint A
ptBPoint B
isInfraBoolean true if infra
isEcranBoolean trie if screen

Definition at line 220 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AjouterSegmentSR()

void TYCalculParcours::AjouterSegmentSR ( double *  ptA,
double *  ptB 
)

Add points A (source) and B (receptor)

Definition at line 226 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculTrajet()

bool TYCalculParcours::CalculTrajet ( TYSetGeometriqueParcours geoCourant,
bool  bCoteGauche,
bool *  PointsAGauche,
bool *  PointsADroite,
TYSetGeometriqueParcours geoPremierePasse,
TYSetGeometriqueParcours *&  geoTrajet 
)
private

select the points that could be included in the path

Parameters
TYSetGeometriqueParcours&geoCourant
boolbCoteGauche
bool*PointsAGauche
bool*PointsADroite
TYSetGeometriqueParcours&geoPremierePasse
TYSetGeometriqueParcours*&geoTrajet
Returns
true if there is a valid path, false if there isn't

Definition at line 297 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FRIEND_TEST() [1/6]

TYCalculParcours::FRIEND_TEST ( test_TYCalculParcours  ,
AjouterSegmentCoupe   
)
private

◆ FRIEND_TEST() [2/6]

TYCalculParcours::FRIEND_TEST ( test_TYCalculParcours  ,
AjouterSegmentSR   
)
private

◆ FRIEND_TEST() [3/6]

TYCalculParcours::FRIEND_TEST ( test_TYCalculParcours  ,
InitChangementVariable2D3D   
)
private

◆ FRIEND_TEST() [4/6]

TYCalculParcours::FRIEND_TEST ( test_TYCalculParcours  ,
PointTrajetDroite   
)
private

◆ FRIEND_TEST() [5/6]

TYCalculParcours::FRIEND_TEST ( test_TYCalculParcours  ,
PointTrajetGauche   
)
private

◆ FRIEND_TEST() [6/6]

TYCalculParcours::FRIEND_TEST ( test_TYCalculParcours  ,
Traitement   
)
private

◆ InitChangementVariable2D3D()

void TYCalculParcours::InitChangementVariable2D3D ( bool  bAxeXMoinsSignifiant)

Select the 2D plane and set _indexXInOut, _indexYInOut, _indexZInOut.

Parameters
bAxeXMoinsSignifiantTrue for horizontal view if Source-Receptor is more Y oriented than X oriented

Definition at line 59 of file TYCalculParcours.cpp.

Here is the caller graph for this function:

◆ NombrePointsTrajetDroite()

int TYCalculParcours::NombrePointsTrajetDroite ( )

Return the points number of the left geometric path.

Definition at line 256 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NombrePointsTrajetGauche()

int TYCalculParcours::NombrePointsTrajetGauche ( )

Return the points number of the right geometric path.

Definition at line 271 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PointTrajet()

void TYCalculParcours::PointTrajet ( int  i,
double *  pt,
TYSetGeometriqueParcours geo 
)
private

copy coordinates from the point of index i from the object geo into pt

Parameters
inti
double*pt
TYSetGeometriqueParcours*geo

Definition at line 248 of file TYCalculParcours.cpp.

Here is the caller graph for this function:

◆ PointTrajetDroite()

void TYCalculParcours::PointTrajetDroite ( int  i,
double *  pt 
)

Return the ith point of the right geometric path.

Definition at line 243 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PointTrajetGauche()

void TYCalculParcours::PointTrajetGauche ( int  i,
double *  pt 
)

Return the ith point of the left geometric path.

Definition at line 238 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Traite()

int TYCalculParcours::Traite ( TYSetGeometriqueParcours geoDernierePasseGauche,
TYSetGeometriqueParcours geoDernierePasseDroite,
TYSetGeometriqueParcours *&  geoTrajetGauche,
TYSetGeometriqueParcours *&  geoTrajetDroite 
)
private

Handles the pathfinding for lateral and vertical paths.

Parameters
TYSetGeometriqueParcours&geoDernierePasseGauche
TYSetGeometriqueParcours&geoDernierePasseDroite
TYSetGeometriqueParcours*&geoTrajetGauche
TYSetGeometriqueParcours*&geoTrajetDroite
Returns
-1 if the segment SR doesn't exist, 0 otherwise //FIXME : why is this not a bool ?

Definition at line 352 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Traitement()

bool TYCalculParcours::Traitement ( )

Build the left and right geometric paths.

Definition at line 286 of file TYCalculParcours.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _bVertical

bool TYCalculParcours::_bVertical
private

True if horizontal view.

Definition at line 128 of file TYCalculParcours.h.

◆ _estUnPointIntersectant

std::vector<bool> TYCalculParcours::_estUnPointIntersectant
private

Definition at line 140 of file TYCalculParcours.h.

◆ _geoDernierePasseDroite

TYSetGeometriqueParcours TYCalculParcours::_geoDernierePasseDroite
private

Definition at line 135 of file TYCalculParcours.h.

◆ _geoDernierePasseGauche

TYSetGeometriqueParcours TYCalculParcours::_geoDernierePasseGauche
private

Definition at line 134 of file TYCalculParcours.h.

◆ _geoImporterDXF

TYSetGeometriqueParcours* TYCalculParcours::_geoImporterDXF
private

Definition at line 132 of file TYCalculParcours.h.

◆ _geoSR

TYSetGeometriqueParcours* TYCalculParcours::_geoSR
private

Definition at line 133 of file TYCalculParcours.h.

◆ _geoTrajetDroite

TYSetGeometriqueParcours* TYCalculParcours::_geoTrajetDroite
private

Paths list on the right.

Definition at line 137 of file TYCalculParcours.h.

◆ _geoTrajetGauche

TYSetGeometriqueParcours* TYCalculParcours::_geoTrajetGauche
private

Paths list on the left.

Definition at line 136 of file TYCalculParcours.h.

◆ _indexXInOut

int TYCalculParcours::_indexXInOut
private

Definition at line 129 of file TYCalculParcours.h.

◆ _indexYInOut

int TYCalculParcours::_indexYInOut
private

Definition at line 130 of file TYCalculParcours.h.

◆ _indexZInOut

int TYCalculParcours::_indexZInOut
private

Definition at line 131 of file TYCalculParcours.h.

◆ _nNbSegMax

int TYCalculParcours::_nNbSegMax
private

Number of segments (encountered faces)

Definition at line 127 of file TYCalculParcours.h.

◆ _vectorPoint

std::vector<TYPointParcours*> TYCalculParcours::_vectorPoint
private

Definition at line 139 of file TYCalculParcours.h.


The documentation for this class was generated from the following files: