Code_TYMPAN  4.2.0
Industrial site acoustic simulation
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | List of all members
TYTrajet Class Reference

This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths, in addition to the direct path. More...

#include <TYTrajet.h>

Collaboration diagram for TYTrajet:
Collaboration graph
[legend]

Public Member Functions

 TYTrajet (tympan::AcousticSource &asrc_, tympan::AcousticReceptor &arcpt_)
 Constructor. More...
 
 TYTrajet (const TYTrajet &other)
 Copy constructor. More...
 
virtual ~TYTrajet ()
 Destructor. More...
 
TYTrajetoperator= (const TYTrajet &other)
 Operator =. More...
 
bool operator== (const TYTrajet &other) const
 Operator ==. More...
 
bool operator!= (const TYTrajet &other) const
 Operator !=. More...
 
void reset ()
 Reset method. More...
 
double getDistance ()
 Get/Set the distance between source and receptor. More...
 
const double getDistance () const
 
void setDistance (const double &distance)
 
size_t getNbChemins ()
 Return the number of path in *this (in addition to the direct path). More...
 
TYTabChemingetChemins ()
 Return the collection of paths of *this. More...
 
TYTabChemingetCheminsDirect ()
 Return an array of the direct paths. More...
 
void addChemin (const TYChemin &chemin)
 Add a new path. More...
 
void addCheminDirect (const TYChemin &chemin)
 Add a new path to the array of direct paths. More...
 
TYChemin getChemin (int index)
 Return a path thanks to its index. More...
 
OSpectre getPNoOp ()
 Return the attenuation without computation (computed by an external function) More...
 
void setPtSetPtR (const OPoint3D &pt1, const OPoint3D &pt2)
 Get/Set points for source and receptor. More...
 
void getPtSetPtR (OPoint3D &pt1, OPoint3D &pt2)
 
void setPtSetPtRfromOSeg3D (const OSegment3D &seg)
 Get/Set points for source and receptor with an OSegment3D. More...
 
void getPtSetPtRfromOSeg3D (OSegment3D &seg) const
 
OSpectregetSpectre ()
 Get/Set the spectrum at the receptor point. More...
 
const OSpectre getSpectre () const
 
void setSpectre (const OSpectre &spectre)
 
OSpectre getPEnergetique (const AtmosphericConditions &atmos)
 Compute the acoustic pressure (phase modulation) on the journey. More...
 
OSpectre getPInterference (const AtmosphericConditions &atmos)
 Compute the quadratic pressure on the journey. More...
 
std::vector< acoustic_path * > & get_tab_rays ()
 

Public Attributes

tympan::AcousticSourceasrc
 Business source. More...
 
tympan::source_idx asrc_idx
 
tympan::AcousticReceptorarcpt
 Business receptor. More...
 
tympan::receptor_idx arcpt_idx
 

Protected Attributes

OPoint3D _ptS
 Source point definition in the site frame. More...
 
OPoint3D _ptR
 Receptor point definition in the site frame. More...
 
TYTabChemin _chemins
 Paths collection. More...
 
TYTabChemin _cheminsDirect
 Direct paths collection (without obstacles) More...
 
double _distance
 Distance between source and receptor. More...
 
OSpectre _sLP
 Spectrum at the receptor point of the journey which integrates geometrical divergence and the source power. More...
 
std::vector< acoustic_path * > _tabRays
 Vector of rays equivalent to chemin. More...
 

Private Member Functions

OSpectre correctTiers (const OSpectreComplex &si, const OSpectreComplex &sj, const AtmosphericConditions &atmos, const double &ri, const double &rj) const
 
void build_tab_rays ()
 
 FRIEND_TEST (test_TYTrajet, getPInterference)
 
 FRIEND_TEST (test_TYTrajet, getPEnergetique)
 

Detailed Description

This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths, in addition to the direct path.

Version
v 1.1
Date
2008/01/21
Author
Projet_Tympan

Definition at line 35 of file TYTrajet.h.

Constructor & Destructor Documentation

◆ TYTrajet() [1/2]

TYTrajet::TYTrajet ( tympan::AcousticSource asrc_,
tympan::AcousticReceptor arcpt_ 
)

Constructor.

Parameters
asrc_Source
arcpt_Receptor

Definition at line 20 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ TYTrajet() [2/2]

TYTrajet::TYTrajet ( const TYTrajet other)

Copy constructor.

Definition at line 32 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ ~TYTrajet()

TYTrajet::~TYTrajet ( )
virtual

Destructor.

Definition at line 44 of file TYTrajet.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addChemin()

void TYTrajet::addChemin ( const TYChemin chemin)

Add a new path.

Definition at line 96 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ addCheminDirect()

void TYTrajet::addCheminDirect ( const TYChemin chemin)

Add a new path to the array of direct paths.

Definition at line 101 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ build_tab_rays()

void TYTrajet::build_tab_rays ( )
private

Definition at line 373 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ correctTiers()

OSpectre TYTrajet::correctTiers ( const OSpectreComplex si,
const OSpectreComplex sj,
const AtmosphericConditions atmos,
const double &  ri,
const double &  rj 
) const
private

Definition at line 338 of file TYTrajet.cpp.

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

◆ FRIEND_TEST() [1/2]

TYTrajet::FRIEND_TEST ( test_TYTrajet  ,
getPInterference   
)
private
Here is the caller graph for this function:

◆ FRIEND_TEST() [2/2]

TYTrajet::FRIEND_TEST ( test_TYTrajet  ,
getPEnergetique   
)
private

◆ get_tab_rays()

std::vector< acoustic_path * > & TYTrajet::get_tab_rays ( )

Definition at line 382 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ getChemin()

TYChemin TYTrajet::getChemin ( int  index)
inline

Return a path thanks to its index.

Returns
_chemins.at(index)

Definition at line 121 of file TYTrajet.h.

Here is the call graph for this function:

◆ getChemins()

TYTabChemin & TYTrajet::getChemins ( )
inline

Return the collection of paths of *this.

Returns
_chemins

Definition at line 95 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getCheminsDirect()

TYTabChemin & TYTrajet::getCheminsDirect ( )
inline

Return an array of the direct paths.

Returns
_cheminsDirect

Definition at line 102 of file TYTrajet.h.

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

◆ getDistance() [1/2]

double TYTrajet::getDistance ( )
inline

Get/Set the distance between source and receptor.

const double getDistance()

Returns
_distance

Definition at line 78 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getDistance() [2/2]

const double TYTrajet::getDistance ( ) const
inline

Definition at line 79 of file TYTrajet.h.

◆ getNbChemins()

size_t TYTrajet::getNbChemins ( )
inline

Return the number of path in *this (in addition to the direct path).

Returns
_chemins.size()

Definition at line 88 of file TYTrajet.h.

◆ getPEnergetique()

OSpectre TYTrajet::getPEnergetique ( const AtmosphericConditions atmos)

Compute the acoustic pressure (phase modulation) on the journey.

Definition at line 111 of file TYTrajet.cpp.

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

◆ getPInterference()

OSpectre TYTrajet::getPInterference ( const AtmosphericConditions atmos)

Compute the quadratic pressure on the journey.

Definition at line 181 of file TYTrajet.cpp.

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

◆ getPNoOp()

OSpectre TYTrajet::getPNoOp ( )

Return the attenuation without computation (computed by an external function)

Definition at line 106 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ getPtSetPtR()

void TYTrajet::getPtSetPtR ( OPoint3D pt1,
OPoint3D pt2 
)
inline

Definition at line 135 of file TYTrajet.h.

◆ getPtSetPtRfromOSeg3D()

void TYTrajet::getPtSetPtRfromOSeg3D ( OSegment3D seg) const
inline

Definition at line 143 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getSpectre() [1/2]

TYSpectre & TYTrajet::getSpectre ( )
inline

Get/Set the spectrum at the receptor point.

const TYSpectre getSpectre() void setSpectre(const TYSpectre& spectre)

Returns
_sLP

Definition at line 155 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getSpectre() [2/2]

const OSpectre TYTrajet::getSpectre ( ) const
inline

Definition at line 156 of file TYTrajet.h.

◆ operator!=()

bool TYTrajet::operator!= ( const TYTrajet other) const

Operator !=.

Definition at line 91 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ operator=()

TYTrajet & TYTrajet::operator= ( const TYTrajet other)

Operator =.

Definition at line 56 of file TYTrajet.cpp.

◆ operator==()

bool TYTrajet::operator== ( const TYTrajet other) const

Operator ==.

Definition at line 73 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ reset()

void TYTrajet::reset ( void  )

Reset method.

Definition at line 49 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ setDistance()

void TYTrajet::setDistance ( const double &  distance)
inline

Definition at line 81 of file TYTrajet.h.

◆ setPtSetPtR()

void TYTrajet::setPtSetPtR ( const OPoint3D pt1,
const OPoint3D pt2 
)
inline

Get/Set points for source and receptor.

void getPtSetPtR(OPoint3D& pt1, OPoint3D& pt2)

Definition at line 134 of file TYTrajet.h.

◆ setPtSetPtRfromOSeg3D()

void TYTrajet::setPtSetPtRfromOSeg3D ( const OSegment3D seg)
inline

Get/Set points for source and receptor with an OSegment3D.

void getPtSetPtRfromOSeg3D(OSegment3D& seg)

Definition at line 142 of file TYTrajet.h.

◆ setSpectre()

void TYTrajet::setSpectre ( const OSpectre spectre)
inline

Definition at line 157 of file TYTrajet.h.

Here is the call graph for this function:

Member Data Documentation

◆ _chemins

TYTabChemin TYTrajet::_chemins
protected

Paths collection.

Definition at line 199 of file TYTrajet.h.

◆ _cheminsDirect

TYTabChemin TYTrajet::_cheminsDirect
protected

Direct paths collection (without obstacles)

Definition at line 202 of file TYTrajet.h.

◆ _distance

double TYTrajet::_distance
protected

Distance between source and receptor.

Definition at line 205 of file TYTrajet.h.

◆ _ptR

OPoint3D TYTrajet::_ptR
protected

Receptor point definition in the site frame.

Definition at line 196 of file TYTrajet.h.

◆ _ptS

OPoint3D TYTrajet::_ptS
protected

Source point definition in the site frame.

Definition at line 193 of file TYTrajet.h.

◆ _sLP

OSpectre TYTrajet::_sLP
protected

Spectrum at the receptor point of the journey which integrates geometrical divergence and the source power.

Definition at line 209 of file TYTrajet.h.

◆ _tabRays

std::vector<acoustic_path*> TYTrajet::_tabRays
protected

Vector of rays equivalent to chemin.

Definition at line 212 of file TYTrajet.h.

◆ arcpt

tympan::AcousticReceptor& TYTrajet::arcpt

Business receptor.

Definition at line 186 of file TYTrajet.h.

◆ arcpt_idx

tympan::receptor_idx TYTrajet::arcpt_idx

Definition at line 187 of file TYTrajet.h.

◆ asrc

tympan::AcousticSource& TYTrajet::asrc

Business source.

Definition at line 182 of file TYTrajet.h.

◆ asrc_idx

tympan::source_idx TYTrajet::asrc_idx

Definition at line 183 of file TYTrajet.h.


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