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

Classe decrivant un rayon acoustique gere par un lancer de rayon. Cette classe doit permettre la modelisation de rayons pour l'affichage de Tympan. More...

#include <TYRay.h>

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

Public Member Functions

 TYRay ()
 Constructeur par defaut. More...
 
 TYRay (const acoustic_path &ap)
 Build a TYRay from an acoustic_path. More...
 
 TYRay (const TYRay &ray)
 Constructeur par copie d'un rayon. More...
 
 ~TYRay ()
 
virtual TYRayoperator= (const TYRay &other)
 equal operator More...
 
bool deepCopy (TYRay *pOther, bool copyId, bool pUseCopyTag=false)
 Deep copy of a ray mainly the events tab. More...
 
virtual DOM_Element toXML (DOM_Element &domElement)
 
virtual int fromXML (DOM_Element domElement)
 
void setSource (TYSourcePonctuelle *source)
 Place la source du rayon. More...
 
TYSourcePonctuellegetSource ()
 Recuperation de la source du rayon. More...
 
void setRecepteur (TYPointCalcul *recep)
 Place le recepteur du rayon. Le dernier point de la polyligne est mis a jour. More...
 
TYPointCalculgetRecepteur ()
 Recuperation du recepteur du rayon. More...
 
- Public Member Functions inherited from TYElement
 TYElement ()
 
 TYElement (TYElement *pParent, bool PutInInstanceList=true)
 
 TYElement (const TYElement &other, bool PutInInstanceList=true)
 
virtual ~TYElement ()
 
void setID (TYUUID id)
 
void setID (const QString &str_id)
 
const TYUUIDgetID () const
 
QString getStringID () const
 
bool hasNullID () const
 
void regenerateID ()
 
void setName (QString name)
 
void setName (std::string name)
 
virtual QString getName () const
 
void setParent (TYElement *pParent)
 
TYElementgetParent () const
 
virtual void setIsAcousticModified (bool isModified)
 
bool getIsAcousticModified ()
 
virtual void setIsGeometryModified (bool isModified)
 
bool getIsGeometryModified ()
 
TYElementoperator= (const TYElement &other)
 
bool operator== (const TYElement &other) const
 
bool operator!= (const TYElement &other) const
 
virtual bool deepCopy (const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
 
virtual std::string toString () const
 
bool callFromXMLIfEqual (DOM_Element &domElement, int *pRetVal=NULL)
 
std::string getMetierName ()
 
void * getAllUses ()
 
void setAllUses (void *allUses)
 
void cleanAllUses ()
 
virtual void updateCurrentCalcul (TYListID &listID, bool recursif=true)
 
virtual void getChilds (LPTYElementArray &childs, bool recursif=true)
 
virtual void setInCurrentCalcul (bool state, bool recurschild=true, bool recursparent=true)
 
virtual bool isInCurrentCalcul ()
 
void addCopy ()
 Increment le compteur de nombre de copies. More...
 
void setCopyCount (const unsigned int copyCount)
 Modifie la vaeur du compteur. More...
 
- Public Member Functions inherited from IRefCount
 IRefCount ()
 
virtual ~IRefCount ()
 
virtual int incRef ()
 
virtual int decRef ()
 
int getRefCount () const
 
- Public Member Functions inherited from OPrototype
virtual ~OPrototype ()
 
virtual OPrototypeclone () const =0
 
virtual const char * getClassName () const
 
bool isA (const char *className) const
 
- Public Member Functions inherited from acoustic_path
 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 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 size_t 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 size_t 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...
 
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...
 

Protected Attributes

int _identifiant
 
TYSourcePonctuelle_source
 
TYPointCalcul_recepteur
 
OPoint3D _posSourceGlobal
 
OPoint3D _posReceptGlobal
 
- Protected Attributes inherited from TYElement
QString _name
 Nom courant de l'element. More...
 
TYElement_pParent
 Reference sur l'element parent. More...
 
bool _bPutInInstanceList
 
unsigned int _copyCount
 
bool _inCurrentCalcul
 Indique si cet element est actif dans le Calcul courant. More...
 
bool _isAcousticModified
 Indicateur de modification acoustique. More...
 
bool _isGeometryModified
 Indicateur de modification de la geometrie. More...
 
LPTYElementGraphic _pGraphicObject
 L'object graphique metier associe a cet element. More...
 
void * _allUses
 Multi purpose void pointer (use for compatibility actually) More...
 
- Protected Attributes inherited from IRefCount
int m_refCount
 The reference counter. More...
 
- Protected Attributes inherited from acoustic_path
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from TYElement
static LPTYElementArray findTypeCollectionAndCallFromXML (DOM_Element parentElem, const char *type)
 
static void setLogInstances (bool log)
 
static bool getLogInstances ()
 
static TYElementgetInstance (TYUUID uuid)
 
static void purgeInstances ()
 
static bool testId (const TYUUID &id, const TYElement *pElem)
 
static TYUUID newID ()
 
static TYUUID fromString (QString id)
 
static QString toString (TYUUID &uuid)
 
static uint64 getConstructorCount ()
 
static uint64 getDestructorCount ()
 
static uint64 getIdGenerationCount ()
 
static bool getIsSavedOk ()
 
static void setIsSavedOk (const bool &toSave)
 
static void setRegenerateID (const bool &bRegenerate)
 
static bool getRegenerateID ()
 
- Static Public Member Functions inherited from OPrototype
static OPrototypefindAndClone (const char *className)
 
static int findPrototype (const char *className)
 
static OPrototypesafeDownCast (OPrototype *pObject)
 
static void add_factory (const char *, IOProtoFactory::ptr_type factory)
 
- Static Public Member Functions inherited from acoustic_path
static void set_sampler_step (double sampler_step_)
 Set the sampler step. More...
 
- Protected Member Functions inherited from OPrototype
 OPrototype ()
 
- Static Protected Attributes inherited from acoustic_path
static double sampler_step = 20.0
 max size of step between events after spatial sampling More...
 

Detailed Description

Classe decrivant un rayon acoustique gere par un lancer de rayon. Cette classe doit permettre la modelisation de rayons pour l'affichage de Tympan.

Todo:
: ajout des listes de diffractions/reflexions
Author
Projet_Tympan

Definition at line 34 of file TYRay.h.

Constructor & Destructor Documentation

◆ TYRay() [1/3]

TYRay::TYRay ( )

Constructeur par defaut.

Definition at line 26 of file TYRay.cpp.

◆ TYRay() [2/3]

TYRay::TYRay ( const acoustic_path ap)
inline

Build a TYRay from an acoustic_path.

Definition at line 50 of file TYRay.h.

◆ TYRay() [3/3]

TYRay::TYRay ( const TYRay ray)

Constructeur par copie d'un rayon.

Definition at line 32 of file TYRay.cpp.

◆ ~TYRay()

TYRay::~TYRay ( )

Definition at line 37 of file TYRay.cpp.

Member Function Documentation

◆ deepCopy()

bool TYRay::deepCopy ( TYRay pOther,
bool  copyId,
bool  pUseCopyTag = false 
)

Deep copy of a ray mainly the events tab.

Definition at line 49 of file TYRay.cpp.

Here is the call graph for this function:

◆ fromXML()

int TYRay::fromXML ( DOM_Element  domElement)
virtual

Extrait les informations a partir du noeud DOM passe afin de recuperer les parametres de la classe.

Parameters
domElementLe noeud DOM a partir duquel les parametres doivent etre recuperes.
Returns
1 si la recuperation des parametres a reussie.

Reimplemented from TYElement.

Definition at line 103 of file TYRay.cpp.

Here is the call graph for this function:

◆ getRecepteur()

TYPointControl * TYRay::getRecepteur ( )
inline

Recuperation du recepteur du rayon.

Definition at line 124 of file TYRay.h.

◆ getSource()

TYSourcePonctuelle * TYRay::getSource ( )
inline

Recuperation de la source du rayon.

Definition at line 106 of file TYRay.h.

◆ operator=()

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

equal operator

Definition at line 39 of file TYRay.cpp.

Here is the call graph for this function:

◆ setRecepteur()

void TYRay::setRecepteur ( TYPointCalcul recep)
inline

Place le recepteur du rayon. Le dernier point de la polyligne est mis a jour.

Definition at line 115 of file TYRay.h.

◆ setSource()

void TYRay::setSource ( TYSourcePonctuelle source)
inline

Place la source du rayon.

Definition at line 97 of file TYRay.h.

◆ toXML()

DOM_Element TYRay::toXML ( DOM_Element domElement)
virtual

Construit une arborescence DOM a partir du noeud passe afin de sauvegarder les parametres au format XML.

Parameters
domElementLe noeud DOM parent a partir duquel l'arborescence doit etre creee.
Returns
Le noeud DOM nouvellement cree.

Reimplemented from TYElement.

Definition at line 62 of file TYRay.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _identifiant

int TYRay::_identifiant
protected

Identifiant du rayon

Definition at line 130 of file TYRay.h.

◆ _posReceptGlobal

OPoint3D TYRay::_posReceptGlobal
protected

Definition at line 134 of file TYRay.h.

◆ _posSourceGlobal

OPoint3D TYRay::_posSourceGlobal
protected

Definition at line 133 of file TYRay.h.

◆ _recepteur

TYPointCalcul* TYRay::_recepteur
protected

Pointeur vers le recepteur du rayon

Definition at line 132 of file TYRay.h.

◆ _source

TYSourcePonctuelle* TYRay::_source
protected

Pointeur vers la source du rayon

Definition at line 131 of file TYRay.h.


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