16 #ifndef TY_MC_ACOUSTIC_PATH
17 #define TY_MC_ACOUSTIC_PATH
72 class IGeometryModifier;
All base classes related to 3D manipulation.
std::vector< acoustic_path * > tab_acoustic_path
std::vector< acoustic_event * > tab_acoustic_events
Class describing an event (reflection, diffraction, ...)
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-40...
This class store data and provide functions to manipulate event in the acoustic context.
double distNextEvent
Distance between this event and the next one in TYRay's list of events.
acoustic_event & operator=(const acoustic_event &other)
ACOUSTIC_EVENT_TYPES type
Event type.
double distPrevNext
Distance between event-1 and event +1.
OPoint3D pos
Event position.
int idFace1
Face id on which the event happens (reflection & diffraction)
double angle
Ray incident angle (for a shooting angle - plan x,z -)
int idFace2
Face id on which the event happens (diffraction only)
acoustic_event * next
Pointer to the next event in TYRay's list of events.
acoustic_event()
Default constructor.
~acoustic_event()
Destructor.
acoustic_event * endEvent
double angletheta
Shooting angle on a horizontal plane (x,y)
acoustic_event * previous
Pointer to the previous event in TYRay's list of events.
OPoint3D _posReceptGlobal
Receptor position in the global frame.
virtual size_t getnbEvents()
Return the number of events of the ray.
static void set_sampler_step(double sampler_step_)
Set the sampler step.
virtual void cleanEventsTab()
clean tab of events
virtual void addEvent(acoustic_event *TYEvent)
Add an event to the events list of the ray.
virtual void setPosReceptGlobal(const OPoint3D &pos)
Set the receptor position in the global frame.
virtual ~acoustic_path()
Destructor.
virtual double getLength()
Return total length of the ray taking account of all events.
virtual size_t getNbEventType(const ACOUSTIC_EVENT_TYPES &eventType)
return the number of events of a type
static double sampler_step
max size of step between events after spatial sampling
virtual bool deepCopy(acoustic_path *pOther)
Deep copy of a ray mainly the events tab.
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 (refl...
unsigned int source_idx
Source id.
virtual unsigned int getIdentifiant() const
Get the ray id.
virtual void setNextDistance(ACOUSTIC_EVENT_TYPES eventType)
Compute distance between events of the type "eventType" and set distNextEvent to each event matching ...
virtual acoustic_path & operator=(const acoustic_path &other)
equal operator
virtual void setSource(unsigned int source_idx_, OPoint3D &globalPosition)
Set the ray source.
virtual void setSource(unsigned int source_idx_)
Set the ray source.
unsigned int _identifiant
Ray id.
virtual unsigned int getRecepteur_idx()
Get the receptor id.
OPoint3D _posSourceGlobal
Source position in the global frame.
acoustic_path()
Default constructor.
virtual void setRecepteur(unsigned int receptor_idx_, OPoint3D &globalPosition)
Set the ray receptor. The last polyline point is updated.
virtual void setEvents(tab_acoustic_events &tabEvents)
Set the events list of the ray.
virtual OPoint3D & getPosReceptGlobal()
Get the receptor position in the global frame.
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 (exampl...
void compute_shot_angle()
Compute shot angle from source.
unsigned int receptor_idx
Receptor id.
virtual unsigned int getSource_idx()
Get the source id.
virtual const tab_acoustic_events & getEvents() const
virtual void setIdentifiant(unsigned int id)
Set the ray id.
virtual void setPosSourceGlobal(const OPoint3D &pos)
Set the source position in the global frame.
virtual void copyEvents(const acoustic_path *tyRay, ACOUSTIC_EVENT_TYPES eventType)
copy only events matching eventType to _events tab
virtual void setRecepteur(unsigned int receptor_idx_)
Set the ray receptor.
void build_links_between_events()
TYRayEvent has to know is direct neighbourg (before and after him)
virtual OPoint3D & getPosSourceGlobal()
Get the source position in the global frame.
tab_acoustic_events _events
Events vector containing the events list (and their positions) of the associated ray.
virtual tab_acoustic_events & getEvents()
Get the events list of the ray.
virtual void setAngles(ACOUSTIC_EVENT_TYPES eventType)
Compute angles of incoming ray segment at event point.