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

Acoustic path. More...

#include <acoustic_path.h>

Inheritance diagram for acoustic_path:
Inheritance graph
[legend]
Collaboration diagram for acoustic_path:
Collaboration graph
[legend]

Public Member Functions

 acoustic_path ()
 Default constructor. More...
 
virtual ~acoustic_path ()
 Destructor. More...
 
 acoustic_path (unsigned int source_idx, unsigned int receptor_idx, tab_acoustic_events &_events)
 Build the acoustic path with a source id, a receptor id and a list of acoustic events positions (reflection, diffraction, etc...) More...
 
 acoustic_path (const acoustic_path &ray)
 Copy constructor of a acoustic path. More...
 
virtual void cleanEventsTab ()
 clean tab of events More...
 
virtual acoustic_pathoperator= (const acoustic_path &other)
 equal operator More...
 
virtual bool deepCopy (acoustic_path *pOther)
 Deep copy of a ray mainly the events tab. More...
 
virtual void tyRayCorrection (IGeometryModifier *transformer)
 Curve acoustic_path with respect to meteo influence This is only for watching curved rays on screen. More...
 
virtual void setSource (unsigned int source_idx_, OPoint3D &globalPosition)
 Set the ray source. More...
 
virtual void setSource (unsigned int source_idx_)
 Set the ray source. More...
 
virtual unsigned int getSource_idx ()
 Get the source id. More...
 
virtual void setRecepteur (unsigned int receptor_idx_, OPoint3D &globalPosition)
 Set the ray receptor. The last polyline point is updated. More...
 
virtual void setRecepteur (unsigned int receptor_idx_)
 Set the ray receptor. More...
 
virtual unsigned int getRecepteur_idx ()
 Get the receptor id. More...
 
virtual void setIdentifiant (unsigned int id)
 Set the ray id. More...
 
virtual unsigned int getIdentifiant () const
 Get the ray id. More...
 
virtual void addEvent (acoustic_event *TYEvent)
 Add an event to the events list of the ray. More...
 
virtual tab_acoustic_eventsgetEvents ()
 Get the events list of the ray. More...
 
virtual const tab_acoustic_eventsgetEvents () const
 
virtual void setEvents (tab_acoustic_events &tabEvents)
 Set the events list of the ray. More...
 
virtual std::vector< int > getIndexOfEvents (const int &eventType) const
 return a tab of indexes of events of the same type in a ray you can merge two types of events (example TYREFLEXION | TYRECEPTEUR) vector returned count all events of the two types More...
 
virtual unsigned int getNbEventType (const ACOUSTIC_EVENT_TYPES &eventType)
 return the number of events of a type More...
 
virtual void copyEvents (const acoustic_path *tyRay, ACOUSTIC_EVENT_TYPES eventType)
 copy only events matching eventType to _events tab More...
 
virtual void setNextDistance (ACOUSTIC_EVENT_TYPES eventType)
 Compute distance between events of the type "eventType" and set distNextEvent to each event matching enventType. More...
 
virtual void setAngles (ACOUSTIC_EVENT_TYPES eventType)
 Compute angles of incoming ray segment at event point. More...
 
virtual double getLength ()
 Return total length of the ray taking account of all events. More...
 
virtual int getnbEvents ()
 Return the number of events of the ray. More...
 
virtual void setPosSourceGlobal (const OPoint3D &pos)
 Set the source position in the global frame. More...
 
virtual OPoint3DgetPosSourceGlobal ()
 Get the source position in the global frame. More...
 
virtual void setPosReceptGlobal (const OPoint3D &pos)
 Set the receptor position in the global frame. More...
 
virtual OPoint3DgetPosReceptGlobal ()
 Get the receptor position in the global frame. More...
 
virtual void overSample (IGeometryModifier *transformer, const double &dMin)
 Add events to ray. More...
 
virtual void sampleAndCorrection (IGeometryModifier *transformer)
 Computes angle and length correction \ by calling the three previous functions \ Creates two matrix which have corrected lengths and angles. More...
 
virtual void endLenghtCompute (IGeometryModifier *transformer)
 compute the length between an event and the next pertinent event (i.e. between a diffraction and the next reflection or receptor) More...
 
virtual void angleCompute (IGeometryModifier *transformer)
 compute the angle between incident ray and the face More...
 
virtual void nextLenghtCompute (IGeometryModifier *transformer)
 compute the length between an event and the next event More...
 
virtual void prevNextLengthCompute (IGeometryModifier *transformer)
 Computes the length between event-1 and event+1. More...
 
virtual void eventPosCompute (IGeometryModifier *transformer)
 compute the length between an event and the next event More...
 
virtual double lengthCorrection (acoustic_event *ev1, const acoustic_event *ev2, IGeometryModifier *transformer)
 Computes length correction on path \ Works on over-sampled TYRays \ Creates a vector which has all corrected path lengths. More...
 
virtual double angleCorrection (const acoustic_event *ev1, acoustic_event *ev2, const acoustic_event *ev3, IGeometryModifier *transformer)
 Computes angle correction on path ev1 -> previous event ev2 -> event to which compute angle ev3 -> next event. More...
 
void build_links_between_events ()
 TYRayEvent has to know is direct neighbourg (before and after him) More...
 
void compute_shot_angle ()
 Compute shot angle from source. More...
 

Static Public Member Functions

static void set_sampler_step (double sampler_step_)
 Set the sampler step. More...
 

Protected Attributes

unsigned int _identifiant
 Ray id. More...
 
unsigned int source_idx
 Source id. More...
 
unsigned int receptor_idx
 Receptor id. More...
 
OPoint3D _posSourceGlobal
 Source position in the global frame. More...
 
OPoint3D _posReceptGlobal
 Receptor position in the global frame. More...
 
tab_acoustic_events _events
 Events vector containing the events list (and their positions) of the associated ray. More...
 

Static Protected Attributes

static double sampler_step = 20.0
 max size of step between events after spatial sampling More...
 

Detailed Description

Acoustic path.

Definition at line 75 of file acoustic_path.h.

Constructor & Destructor Documentation

◆ acoustic_path() [1/3]

acoustic_path::acoustic_path ( )

Default constructor.

Definition at line 87 of file acoustic_path.cpp.

◆ ~acoustic_path()

acoustic_path::~acoustic_path ( )
virtual

Destructor.

Definition at line 96 of file acoustic_path.cpp.

◆ acoustic_path() [2/3]

acoustic_path::acoustic_path ( unsigned int  source_idx,
unsigned int  receptor_idx,
tab_acoustic_events _events 
)

Build the acoustic path with a source id, a receptor id and a list of acoustic events positions (reflection, diffraction, etc...)

◆ acoustic_path() [3/3]

acoustic_path::acoustic_path ( const acoustic_path ray)

Copy constructor of a acoustic path.

Definition at line 91 of file acoustic_path.cpp.

Member Function Documentation

◆ addEvent()

void acoustic_path::addEvent ( acoustic_event TYEvent)
inlinevirtual

Add an event to the events list of the ray.

Definition at line 175 of file acoustic_path.h.

Here is the caller graph for this function:

◆ angleCompute()

void acoustic_path::angleCompute ( IGeometryModifier transformer)
virtual

compute the angle between incident ray and the face

Definition at line 390 of file acoustic_path.cpp.

◆ angleCorrection()

void acoustic_path::angleCorrection ( const acoustic_event ev1,
acoustic_event ev2,
const acoustic_event ev3,
IGeometryModifier transformer 
)
virtual

Computes angle correction on path ev1 -> previous event ev2 -> event to which compute angle ev3 -> next event.

Definition at line 408 of file acoustic_path.cpp.

Here is the call graph for this function:

◆ build_links_between_events()

void acoustic_path::build_links_between_events ( )

TYRayEvent has to know is direct neighbourg (before and after him)

It also has to know his the next REFLEXION event or (if not exist) the RECEPTOR

Definition at line 277 of file acoustic_path.cpp.

Here is the caller graph for this function:

◆ cleanEventsTab()

void acoustic_path::cleanEventsTab ( )
virtual

clean tab of events

Definition at line 101 of file acoustic_path.cpp.

Here is the caller graph for this function:

◆ compute_shot_angle()

void acoustic_path::compute_shot_angle ( )

Compute shot angle from source.

Definition at line 295 of file acoustic_path.cpp.

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

◆ copyEvents()

void acoustic_path::copyEvents ( const acoustic_path tyRay,
ACOUSTIC_EVENT_TYPES  eventType 
)
virtual

copy only events matching eventType to _events tab

Definition at line 188 of file acoustic_path.cpp.

Here is the call graph for this function:

◆ deepCopy()

bool acoustic_path::deepCopy ( acoustic_path pOther)
virtual

Deep copy of a ray mainly the events tab.

Definition at line 131 of file acoustic_path.cpp.

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

◆ endLenghtCompute()

void acoustic_path::endLenghtCompute ( IGeometryModifier transformer)
virtual

compute the length between an event and the next pertinent event (i.e. between a diffraction and the next reflection or receptor)

Definition at line 372 of file acoustic_path.cpp.

◆ eventPosCompute()

void acoustic_path::eventPosCompute ( IGeometryModifier transformer)
virtual

compute the length between an event and the next event

Definition at line 399 of file acoustic_path.cpp.

Here is the call graph for this function:

◆ getEvents() [1/2]

std::vector< Event > & acoustic_path::getEvents ( )
inlinevirtual

Get the events list of the ray.

Definition at line 181 of file acoustic_path.h.

Here is the caller graph for this function:

◆ getEvents() [2/2]

virtual const tab_acoustic_events& acoustic_path::getEvents ( ) const
inlinevirtual

Definition at line 182 of file acoustic_path.h.

◆ getIdentifiant()

int acoustic_path::getIdentifiant ( ) const
inlinevirtual

Get the ray id.

Definition at line 169 of file acoustic_path.h.

Here is the caller graph for this function:

◆ getIndexOfEvents()

vector< unsigned int > acoustic_path::getIndexOfEvents ( const int &  eventType) const
virtual

return a tab of indexes of events of the same type in a ray you can merge two types of events (example TYREFLEXION | TYRECEPTEUR) vector returned count all events of the two types

Definition at line 174 of file acoustic_path.cpp.

Here is the caller graph for this function:

◆ getLength()

double acoustic_path::getLength ( )
virtual

Return total length of the ray taking account of all events.

Definition at line 163 of file acoustic_path.cpp.

◆ getnbEvents()

int acoustic_path::getnbEvents ( )
inlinevirtual

Return the number of events of the ray.

Definition at line 235 of file acoustic_path.h.

◆ getNbEventType()

unsigned int acoustic_path::getNbEventType ( const ACOUSTIC_EVENT_TYPES eventType)
inlinevirtual

return the number of events of a type

Definition at line 203 of file acoustic_path.h.

◆ getPosReceptGlobal()

OPoint3D & acoustic_path::getPosReceptGlobal ( )
inlinevirtual

Get the receptor position in the global frame.

Definition at line 259 of file acoustic_path.h.

◆ getPosSourceGlobal()

OPoint3D & acoustic_path::getPosSourceGlobal ( )
inlinevirtual

Get the source position in the global frame.

Definition at line 247 of file acoustic_path.h.

◆ getRecepteur_idx()

unsigned int acoustic_path::getRecepteur_idx ( )
inlinevirtual

Get the receptor id.

Definition at line 157 of file acoustic_path.h.

◆ getSource_idx()

unsigned int acoustic_path::getSource_idx ( )
inlinevirtual

Get the source id.

Definition at line 138 of file acoustic_path.h.

◆ lengthCorrection()

void acoustic_path::lengthCorrection ( acoustic_event ev1,
const acoustic_event ev2,
IGeometryModifier transformer 
)
virtual

Computes length correction on path \ Works on over-sampled TYRays \ Creates a vector which has all corrected path lengths.

Definition at line 351 of file acoustic_path.cpp.

Here is the call graph for this function:

◆ nextLenghtCompute()

void acoustic_path::nextLenghtCompute ( IGeometryModifier transformer)
virtual

compute the length between an event and the next event

Definition at line 342 of file acoustic_path.cpp.

◆ operator=()

acoustic_path & acoustic_path::operator= ( const acoustic_path other)
virtual

equal operator

Definition at line 115 of file acoustic_path.cpp.

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

◆ overSample()

void acoustic_path::overSample ( IGeometryModifier transformer,
const double &  dMin 
)
virtual

Add events to ray.

Definition at line 239 of file acoustic_path.cpp.

Here is the call graph for this function:

◆ prevNextLengthCompute()

void acoustic_path::prevNextLengthCompute ( IGeometryModifier transformer)
virtual

Computes the length between event-1 and event+1.

Definition at line 381 of file acoustic_path.cpp.

◆ sampleAndCorrection()

void acoustic_path::sampleAndCorrection ( IGeometryModifier transformer)
virtual

Computes angle and length correction \ by calling the three previous functions \ Creates two matrix which have corrected lengths and angles.

Definition at line 324 of file acoustic_path.cpp.

◆ set_sampler_step()

static void acoustic_path::set_sampler_step ( double  sampler_step_)
inlinestatic

Set the sampler step.

Definition at line 323 of file acoustic_path.h.

Here is the caller graph for this function:

◆ setAngles()

void acoustic_path::setAngles ( ACOUSTIC_EVENT_TYPES  eventType)
virtual

Compute angles of incoming ray segment at event point.

Definition at line 225 of file acoustic_path.cpp.

Here is the call graph for this function:

◆ setEvents()

virtual void acoustic_path::setEvents ( tab_acoustic_events tabEvents)
inlinevirtual

Set the events list of the ray.

Warning
The first acoustic event should match the source
and the last one should match the receptor.

Definition at line 189 of file acoustic_path.h.

◆ setIdentifiant()

void acoustic_path::setIdentifiant ( unsigned int  id)
inlinevirtual

Set the ray id.

Definition at line 163 of file acoustic_path.h.

◆ setNextDistance()

void acoustic_path::setNextDistance ( ACOUSTIC_EVENT_TYPES  eventType)
virtual

Compute distance between events of the type "eventType" and set distNextEvent to each event matching enventType.

Definition at line 204 of file acoustic_path.cpp.

◆ setPosReceptGlobal()

void acoustic_path::setPosReceptGlobal ( const OPoint3D pos)
inlinevirtual

Set the receptor position in the global frame.

Definition at line 253 of file acoustic_path.h.

◆ setPosSourceGlobal()

void acoustic_path::setPosSourceGlobal ( const OPoint3D pos)
inlinevirtual

Set the source position in the global frame.

Definition at line 241 of file acoustic_path.h.

◆ setRecepteur() [1/2]

void acoustic_path::setRecepteur ( unsigned int  receptor_idx_,
OPoint3D globalPosition 
)
virtual

Set the ray receptor. The last polyline point is updated.

Definition at line 157 of file acoustic_path.cpp.

Here is the caller graph for this function:

◆ setRecepteur() [2/2]

void acoustic_path::setRecepteur ( unsigned int  receptor_idx_)
inlinevirtual

Set the ray receptor.

Definition at line 150 of file acoustic_path.h.

◆ setSource() [1/2]

void acoustic_path::setSource ( unsigned int  source_idx_,
OPoint3D globalPosition 
)
virtual

Set the ray source.

Definition at line 151 of file acoustic_path.cpp.

Here is the caller graph for this function:

◆ setSource() [2/2]

void acoustic_path::setSource ( unsigned int  source_idx_)
inlinevirtual

Set the ray source.

Definition at line 131 of file acoustic_path.h.

◆ tyRayCorrection()

void acoustic_path::tyRayCorrection ( IGeometryModifier transformer)
virtual

Curve acoustic_path with respect to meteo influence This is only for watching curved rays on screen.

Definition at line 430 of file acoustic_path.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _events

tab_acoustic_events acoustic_path::_events
protected

Events vector containing the events list (and their positions) of the associated ray.

Definition at line 346 of file acoustic_path.h.

◆ _identifiant

unsigned int acoustic_path::_identifiant
protected

Ray id.

Definition at line 340 of file acoustic_path.h.

◆ _posReceptGlobal

OPoint3D acoustic_path::_posReceptGlobal
protected

Receptor position in the global frame.

Definition at line 344 of file acoustic_path.h.

◆ _posSourceGlobal

OPoint3D acoustic_path::_posSourceGlobal
protected

Source position in the global frame.

Definition at line 343 of file acoustic_path.h.

◆ receptor_idx

unsigned int acoustic_path::receptor_idx
protected

Receptor id.

Definition at line 342 of file acoustic_path.h.

◆ sampler_step

double acoustic_path::sampler_step = 20.0
staticprotected

max size of step between events after spatial sampling

Definition at line 339 of file acoustic_path.h.

◆ source_idx

unsigned int acoustic_path::source_idx
protected

Source id.

Definition at line 341 of file acoustic_path.h.


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