Code_TYMPAN  4.2.0
Industrial site acoustic simulation
Public Member Functions | List of all members
TYBatiment Class Reference

#include <TYBatiment.h>

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

Public Member Functions

 TYBatiment ()
 
 TYBatiment (const TYBatiment &other)
 
virtual ~TYBatiment ()
 
TYBatimentoperator= (const TYBatiment &other)
 Operateur =. More...
 
bool operator== (const TYBatiment &other) const
 Operateur ==. More...
 
bool operator!= (const TYBatiment &other) const
 Operateur !=. More...
 
virtual std::string toString () const
 
virtual DOM_Element toXML (DOM_Element &domElement)
 
virtual int fromXML (DOM_Element domElement)
 
virtual void setDensiteSrcsH (double densite, bool recursif=true)
 
virtual void setDensiteSrcsV (double densite, bool recursif=true)
 
virtual TYTabSourcePonctuelleGeoNode getSrcs () const
 
virtual TYSourcePonctuelle srcPonctEquiv () const
 
virtual void distriSrcs ()
 
virtual bool setSrcsLw ()
 
virtual double volume () const
 
virtual double surface () const
 
virtual TYTabVector normals () const
 
virtual TYTabPoint sommets () const
 
virtual TYTabLPPolygon faces () const
 
virtual TYBox volEnglob () const
 
virtual TYPoint centreGravite () const
 
virtual int intersects (const OSegment3D &seg, TYTabPoint &ptList) const
 
virtual int isInside (const TYPoint &pt) const
 
virtual bool updateAcoustic (const bool &force=false)
 
virtual LPTYSpectre getRealPowerSpectrum ()
 
- Public Member Functions inherited from TYAcousticVolumeNode
 TYAcousticVolumeNode ()
 
 TYAcousticVolumeNode (const TYAcousticVolumeNode &other)
 
virtual ~TYAcousticVolumeNode ()
 
TYAcousticVolumeNodeoperator= (const TYAcousticVolumeNode &other)
 Operateur =. More...
 
bool operator== (const TYAcousticVolumeNode &other) const
 Operateur ==. More...
 
bool operator!= (const TYAcousticVolumeNode &other) const
 Operateur !=. More...
 
virtual bool deepCopy (const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
 
virtual void getChilds (LPTYElementArray &childs, bool recursif=true)
 
virtual void propagateAtt (LPTYAttenuateur pAtt)
 
virtual int addRegime ()
 
virtual void setRegime (TYSpectre &Spectre, int regime=-1, bool recursif=false)
 
virtual bool remRegime (int regime)
 
virtual void loadRegime (int regimeNb=-1)
 
virtual void setCurRegime (int regime)
 
virtual void setRegimeName (const QString &name)
 
virtual void correctNbRegimes ()
 
virtual void remAllSrcs ()
 
virtual void setIsRayonnant (bool rayonnant=true, bool recursif=true)
 
virtual double activeSurface () const
 
virtual double activeSurface ()
 
virtual TYTabAcousticSurfaceGeoNode acousticFaces ()
 
void purge ()
 
size_t getNbChild () const
 
TYTabAcousticVolumeGeoNodegetTabAcousticVol ()
 
const TYTabAcousticVolumeGeoNodegetTabAcousticVol () const
 
void setTabAcousticVol (const TYTabAcousticVolumeGeoNode &tab)
 
bool addAcousticVol (LPTYAcousticVolumeGeoNode pAccVolGeoNode, bool recursif=true)
 
bool addAcousticVol (LPTYAcousticVolume pAccVol, const TYRepere &repere, bool recursif=true)
 
bool addAcousticVol (LPTYAcousticVolume pAccVol, bool recursif=true)
 
bool remAcousticVol (const LPTYAcousticVolumeGeoNode pAccVolGeoNode)
 
bool remAcousticVol (const LPTYAcousticVolume pAccVol)
 
bool remAcousticVol (QString idAccVol)
 
LPTYAcousticVolume getAcousticVol (int index)
 
LPTYAcousticVolumeGeoNode findAcousticVol (const LPTYAcousticVolume pAccVol)
 
virtual void exportCSV (std::ofstream &ofs)
 Export au format csv sur un flux transmis. More...
 
- Public Member Functions inherited from TYElement
void * getAllUses ()
 
void setAllUses (void *allUses)
 
void cleanAllUses ()
 
 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
 
bool callFromXMLIfEqual (DOM_Element &domElement, int *pRetVal=NULL)
 
std::string getMetierName ()
 
virtual void updateCurrentCalcul (TYListID &listID, 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 TYColorInterface
virtual void updateColor ()
 
 TYColorInterface ()
 
 TYColorInterface (const TYColorInterface &other)
 
virtual ~TYColorInterface ()
 
TYColorInterfaceoperator= (const TYColorInterface &other)
 
bool operator== (const TYColorInterface &other) const
 
bool operator!= (const TYColorInterface &other) const
 
void deepCopy (const TYColorInterface *pOther, bool copyId=true, bool pUseCopyTag=false)
 
DOM_Element toXML (DOM_Element &domElement)
 
int fromXML (DOM_Element domElement)
 
virtual void setColor (const OColor &color)
 
OColor getColor () const
 
- Public Member Functions inherited from TYAcousticInterface
virtual int getNextRegimeNb ()
 
virtual const int getNextRegimeNb () const
 
virtual void setNextRegimeNb (const int &next)
 
virtual QString getRegimeName ()
 
virtual const QString getRegimeName () const
 
 TYAcousticInterface ()
 
 TYAcousticInterface (const TYAcousticInterface &other)
 
virtual ~TYAcousticInterface ()
 
TYAcousticInterfaceoperator= (const TYAcousticInterface &other)
 
bool operator== (const TYAcousticInterface &other) const
 
bool operator!= (const TYAcousticInterface &other) const
 
void deepCopy (const TYAcousticInterface *pOther, bool copyId=true, bool pUseCopyTag=false)
 
DOM_Element toXML (DOM_Element &domElement)
 
int fromXML (DOM_Element domElement)
 
double getDensiteSrcsH () const
 
double getDensiteSrcsV () const
 
double getDensiteSrcs () const
 
virtual void setDensiteSrcs (double densite, bool recursif=true)
 
bool getIsRayonnant ()
 
int getTypeDistribution () const
 
void setTypeDistribution (int typeDistri)
 
bool getUseAtt () const
 
virtual void setUseAtt (bool state)
 
LPTYAttenuateur getAtt ()
 
const LPTYAttenuateur getAtt () const
 
void setAtt (LPTYAttenuateur pAtt)
 
TYSpectregetCurrentSpectre ()
 
virtual int addRegime (const TYRegime &regime)
 
size_t getNbRegimes () const
 
void setNbRegimes (unsigned int nb)
 
TYRegimegetRegimeNb (const int &nb, bool &status)
 
const TYRegimegetRegimeNb (const int &nb, bool &status) const
 
int getCurRegime () const
 
virtual void propagateRegime ()
 
virtual TYSpectre setGlobalLW (const TYSpectre &spectre, const double &surfGlobale, const int &regime=-1)
 
virtual TYRegime buildRegime ()
 
virtual void updateCurrentRegime ()
 
bool getIsRegimeChangeAble ()
 
- Public Member Functions inherited from TYVolumeInterface
 TYVolumeInterface ()
 
virtual ~TYVolumeInterface ()
 
virtual void updateVolEnglob ()
 
const TYBoxgetVolEnglob () const
 
const double & getRayonSphere () const
 
void calculRayonSphere (const TYBox &volEnglob)
 
virtual void calculCentreGravite ()
 
const TYPointgetCentreGravite () const
 
virtual void inverseNormales ()
 

Additional Inherited Members

- Public Types inherited from TYAcousticInterface
enum  TypeDistribution { TY_PUISSANCE_CALCULEE, TY_PUISSANCE_IMPOSEE }
 
- 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)
 
- Protected Member Functions inherited from OPrototype
 OPrototype ()
 
- Protected Attributes inherited from TYAcousticVolumeNode
TYTabAcousticVolumeGeoNode _tabAcousticVol
 Tableau des AcousticVolumes. More...
 
- 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 TYColorInterface
OColor _color
 
- Protected Attributes inherited from TYAcousticInterface
double _densiteSrcsH
 Densite horizontale de sources. More...
 
double _densiteSrcsV
 Densite verticale de sources. More...
 
double _offsetSources
 Offset de decalage des sources ponctuelles sur les surfaces. More...
 
bool _isRayonnant
 Etat courant de l'element (rayonnant ou non rayonnant) More...
 
bool _regimeChangeAble
 Indique si un element peux changer de regime de lui meme. More...
 
int _typeDistribution
 Indique le type de distribution a utiliser. pour l'etat courant. More...
 
int _curRegime
 Numero du regime de fonctionnement courant. More...
 
int _nextRegime
 Numero d'ordre du regime suivant. More...
 
TYSpectre _pCurrentSpectre
 
bool _useAtt
 Indique l'utilisation d'un attenuateur pour l'etat courant. More...
 
LPTYAttenuateur _pAtt
 Attenuateur de l'etat courant. More...
 
TYTabRegimes _tabRegimes
 Tableau des regimes de fonctionnement. More...
 
- Protected Attributes inherited from TYVolumeInterface
TYBox _volEnglob
 
double _rayonSphere
 
TYPoint _centreGravite
 

Detailed Description

Classe batiment.

Definition at line 33 of file TYBatiment.h.

Constructor & Destructor Documentation

◆ TYBatiment() [1/2]

TYBatiment::TYBatiment ( )

Constructeur.

Definition at line 33 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ TYBatiment() [2/2]

TYBatiment::TYBatiment ( const TYBatiment other)

Constructeur par copie.

Definition at line 39 of file TYBatiment.cpp.

◆ ~TYBatiment()

TYBatiment::~TYBatiment ( )
virtual

Destructeur.

Definition at line 44 of file TYBatiment.cpp.

Member Function Documentation

◆ centreGravite()

TYPoint TYBatiment::centreGravite ( ) const
virtual

Calcule le centre de gravite de ce volume.

Returns
Le centre de gravite.

Reimplemented from TYAcousticVolumeNode.

Definition at line 175 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ distriSrcs()

void TYBatiment::distriSrcs ( )
virtual

Calcul la repartition des sources ponctuelles pour cet element en fonction des densites etablies.

Reimplemented from TYAcousticVolumeNode.

Definition at line 135 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ faces()

TYTabLPPolygon TYBatiment::faces ( ) const
virtual

Retourne l'ensemble des faces (polygones) composant ce volume.

Returns
Un tableau de pointeurs de surfaces.

Reimplemented from TYAcousticVolumeNode.

Definition at line 165 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ fromXML()

int TYBatiment::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 TYAcousticVolumeNode.

Definition at line 82 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ getRealPowerSpectrum()

LPTYSpectre TYBatiment::getRealPowerSpectrum ( )
virtual

Get du spectre de puissance avec son attenuateur eventuel

Reimplemented from TYAcousticVolumeNode.

Definition at line 226 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ getSrcs()

TYTabSourcePonctuelleGeoNode TYBatiment::getSrcs ( ) const
virtual

Retourne l'ensemble des sources ponctuelles dont est compose cet objet. Chaque source se trouve dans un GeoNode, ainsi la matrice de celui-ci permet d'effectuer le changement de repere de la position de la source dans le repere local a cet objet.

Returns
Une collection de pointeurs sur des GeoNodes de sources ponctuelles.

Reimplemented from TYAcousticVolumeNode.

Definition at line 125 of file TYBatiment.cpp.

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

◆ intersects()

int TYBatiment::intersects ( const OSegment3D seg,
TYTabPoint ptList 
) const
virtual

Calcule la liste des points d'intersection de ce volume avec le segment passe.

Parameters
segSegment dont on veut l'intersection.
ptListLes point resultant de l'intersection.
Returns
INTERS_OUI (1) si l'intersection existe, INTERS_CONFONDU (2) si les elements sont confondus, INTERS_NULLE (0) s'il n'y a pas d'intersection.

Reimplemented from TYAcousticVolumeNode.

Definition at line 180 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ isInside()

int TYBatiment::isInside ( const TYPoint pt) const
virtual

Test si le point passe se trouve a l'interieur de ce volume.

Parameters
ptPoint dont on teste l'appartenance au volume.
Returns
INTERS_OUI (1) si le point est a l'interieur de ce volume, INTERS_CONFONDU (2) si les elements sont confondus, INTERS_NULLE (0) si le point est a l'exterieur de ce volume.

Reimplemented from TYAcousticVolumeNode.

Definition at line 185 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ normals()

TYTabVector TYBatiment::normals ( ) const
virtual

Calcule les normales des surfaces composant ce volume.

Returns
Un tableau de vecteurs.

Reimplemented from TYAcousticVolumeNode.

Definition at line 155 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ operator!=()

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

Operateur !=.

Definition at line 66 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ operator=()

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

Operateur =.

Definition at line 48 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ operator==()

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

Operateur ==.

Definition at line 57 of file TYBatiment.cpp.

Here is the caller graph for this function:

◆ setDensiteSrcsH()

void TYBatiment::setDensiteSrcsH ( double  densite,
bool  recursif = true 
)
virtual

Set/Get de la densite horizontale de sources.

Reimplemented from TYAcousticVolumeNode.

Definition at line 89 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ setDensiteSrcsV()

void TYBatiment::setDensiteSrcsV ( double  densite,
bool  recursif = true 
)
virtual

Set/Get de la densite verticale de sources.

Reimplemented from TYAcousticVolumeNode.

Definition at line 107 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ setSrcsLw()

bool TYBatiment::setSrcsLw ( )
virtual

Assigne une puissance a chaque source ponctuelle en fonction de la puissance acoutique globale de cet objet.

Returns
true si le calcul a ete possible; false sinon.

Reimplemented from TYAcousticVolumeNode.

Definition at line 140 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ sommets()

TYTabPoint TYBatiment::sommets ( ) const
virtual

Retourne l'ensemble des sommets composant ce volume.

Returns
Un tableau de points.

Reimplemented from TYAcousticVolumeNode.

Definition at line 160 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ srcPonctEquiv()

TYSourcePonctuelle TYBatiment::srcPonctEquiv ( ) const
virtual

Retourne une source ponctuelle equivalente a l'ensemble des sources. Cette methode est experimentale.

Returns
La source ponctuelle equivalente.

Reimplemented from TYAcousticVolumeNode.

Definition at line 130 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ surface()

double TYBatiment::surface ( ) const
virtual

Calcule la surface totale de ce volume.

Returns
La surface totale.

Reimplemented from TYAcousticVolumeNode.

Definition at line 150 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ toString()

std::string TYBatiment::toString ( ) const
virtual

Retourne une chaine de caractere donnant des informations sur cet objet (utile pour le debugage).

Returns
Une chaine de caractere informative sur cet objet.

Reimplemented from TYAcousticVolumeNode.

Definition at line 71 of file TYBatiment.cpp.

◆ toXML()

DOM_Element TYBatiment::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 TYAcousticVolumeNode.

Definition at line 76 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ updateAcoustic()

bool TYBatiment::updateAcoustic ( const bool &  force = false)
virtual

Execute les calculs acoustiques afin que l'element metier soit a jour.

Reimplemented from TYAcousticVolumeNode.

Definition at line 190 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ volEnglob()

TYBox TYBatiment::volEnglob ( ) const
virtual

Calcule la boite englobant ce volume.

Returns
La boite englobante.

Reimplemented from TYAcousticVolumeNode.

Definition at line 170 of file TYBatiment.cpp.

Here is the call graph for this function:

◆ volume()

double TYBatiment::volume ( ) const
virtual

Calcule le volume total de ce volume.

Returns
Le volume total.

Reimplemented from TYAcousticVolumeNode.

Definition at line 145 of file TYBatiment.cpp.

Here is the call graph for this function:

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