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

#include <TYMachine.h>

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

Public Member Functions

 TYMachine ()
 
 TYMachine (const TYMachine &other)
 
virtual ~TYMachine ()
 
TYMachineoperator= (const TYMachine &other)
 Operateur =. More...
 
bool operator== (const TYMachine &other) const
 Operateur ==. More...
 
bool operator!= (const TYMachine &other) const
 Operateur !=. More...
 
virtual bool deepCopy (const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
 
virtual std::string toString () const
 
virtual DOM_Element toXML (DOM_Element &domElement)
 
virtual int fromXML (DOM_Element domElement)
 
virtual TYTabSourcePonctuelleGeoNode getSrcs () const
 
virtual TYSourcePonctuelle srcPonctEquiv () const
 
virtual bool updateAcoustic (const bool &force=false)
 
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
 
int getCategorie () const
 
void setCategorie (int cate)
 
QString getConstructeur () const
 
void setConstructeur (QString name)
 
QString getModele () const
 
void setModele (QString name)
 
QString getCommentaire () const
 
void setCommentaire (QString name)
 
- 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 void getChilds (LPTYElementArray &childs, bool recursif=true)
 
virtual void setDensiteSrcsH (double densite, bool recursif=true)
 
virtual void setDensiteSrcsV (double densite, 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 LPTYSpectre getRealPowerSpectrum ()
 
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 ()
 

Protected Attributes

int _categorie
 Categorie. More...
 
QString _constructeur
 Nom du constructeur. More...
 
QString _modele
 Nom du modele. More...
 
QString _commentaire
 Commentaires. More...
 
- 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
 

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 ()
 

Detailed Description

Comprend les proprietes acoustiques et geometriques d'une machine.

Definition at line 33 of file TYMachine.h.

Constructor & Destructor Documentation

◆ TYMachine() [1/2]

TYMachine::TYMachine ( )

Constructeur.

Definition at line 32 of file TYMachine.cpp.

Here is the call graph for this function:

◆ TYMachine() [2/2]

TYMachine::TYMachine ( const TYMachine other)

Constructeur par copie.

Definition at line 42 of file TYMachine.cpp.

◆ ~TYMachine()

TYMachine::~TYMachine ( )
virtual

Destructeur.

Definition at line 47 of file TYMachine.cpp.

Member Function Documentation

◆ centreGravite()

TYPoint TYMachine::centreGravite ( ) const
virtual

Calcule le centre de gravite de ce volume.

Returns
Le centre de gravite.

Reimplemented from TYAcousticVolumeNode.

Definition at line 185 of file TYMachine.cpp.

Here is the call graph for this function:

◆ deepCopy()

bool TYMachine::deepCopy ( const TYElement pOther,
bool  copyId = true,
bool  pUseCopyTag = false 
)
virtual

Effectue une copie en allouant de la memoire (deep copy) et non pas en copiant seulement les pointeurs (shallow copy). Cette methode s'utilise comme l'operateur egal. L'ID peut ne pas etre copie, le parent n'est jamais copie.

Parameters
pOtherL'element a copier.
copyIdCopie l'identifiant unique ou pas.
Returns
true si la copie est possible; false sinon.

Reimplemented from TYAcousticVolumeNode.

Definition at line 82 of file TYMachine.cpp.

Here is the call graph for this function:

◆ distriSrcs()

void TYMachine::distriSrcs ( )
virtual

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

Reimplemented from TYAcousticVolumeNode.

Definition at line 140 of file TYMachine.cpp.

Here is the call graph for this function:

◆ faces()

TYTabLPPolygon TYMachine::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 175 of file TYMachine.cpp.

Here is the call graph for this function:

◆ fromXML()

int TYMachine::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 113 of file TYMachine.cpp.

Here is the call graph for this function:

◆ getCategorie()

int TYMachine::getCategorie ( ) const
inline

Set/Get de la categorie.

Definition at line 87 of file TYMachine.h.

Here is the caller graph for this function:

◆ getCommentaire()

QString TYMachine::getCommentaire ( ) const
inline

Set/Get des remarques.

Definition at line 114 of file TYMachine.h.

Here is the caller graph for this function:

◆ getConstructeur()

QString TYMachine::getConstructeur ( ) const
inline

Set/Get du nom du constructeur.

Definition at line 96 of file TYMachine.h.

Here is the caller graph for this function:

◆ getModele()

QString TYMachine::getModele ( ) const
inline

Set/Get du nom du modele.

Definition at line 105 of file TYMachine.h.

Here is the caller graph for this function:

◆ getSrcs()

TYTabSourcePonctuelleGeoNode TYMachine::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 130 of file TYMachine.cpp.

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

◆ intersects()

int TYMachine::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 190 of file TYMachine.cpp.

Here is the call graph for this function:

◆ isInside()

int TYMachine::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 195 of file TYMachine.cpp.

Here is the call graph for this function:

◆ normals()

TYTabVector TYMachine::normals ( ) const
virtual

Calcule les normales des surfaces composant ce volume.

Returns
Un tableau de vecteurs.

Reimplemented from TYAcousticVolumeNode.

Definition at line 165 of file TYMachine.cpp.

Here is the call graph for this function:

◆ operator!=()

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

Operateur !=.

Definition at line 77 of file TYMachine.cpp.

Here is the call graph for this function:

◆ operator=()

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

Operateur =.

Definition at line 51 of file TYMachine.cpp.

Here is the call graph for this function:

◆ operator==()

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

Operateur ==.

Definition at line 64 of file TYMachine.cpp.

Here is the caller graph for this function:

◆ setCategorie()

void TYMachine::setCategorie ( int  cate)
inline

Set/Get de la categorie.

Definition at line 91 of file TYMachine.h.

◆ setCommentaire()

void TYMachine::setCommentaire ( QString  name)
inline

Set/Get des remarques.

Definition at line 118 of file TYMachine.h.

◆ setConstructeur()

void TYMachine::setConstructeur ( QString  name)
inline

Set/Get du nom du constructeur.

Definition at line 100 of file TYMachine.h.

◆ setModele()

void TYMachine::setModele ( QString  name)
inline

Set/Get du nom du modele.

Definition at line 109 of file TYMachine.h.

◆ setSrcsLw()

bool TYMachine::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 145 of file TYMachine.cpp.

Here is the call graph for this function:

◆ sommets()

TYTabPoint TYMachine::sommets ( ) const
virtual

Retourne l'ensemble des sommets composant ce volume.

Returns
Un tableau de points.

Reimplemented from TYAcousticVolumeNode.

Definition at line 170 of file TYMachine.cpp.

Here is the call graph for this function:

◆ srcPonctEquiv()

TYSourcePonctuelle TYMachine::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 135 of file TYMachine.cpp.

Here is the call graph for this function:

◆ surface()

double TYMachine::surface ( ) const
virtual

Calcule la surface totale de ce volume.

Returns
La surface totale.

Reimplemented from TYAcousticVolumeNode.

Definition at line 160 of file TYMachine.cpp.

Here is the call graph for this function:

◆ toString()

std::string TYMachine::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 96 of file TYMachine.cpp.

◆ toXML()

DOM_Element TYMachine::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 101 of file TYMachine.cpp.

Here is the call graph for this function:

◆ updateAcoustic()

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

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

Reimplemented from TYAcousticVolumeNode.

Definition at line 150 of file TYMachine.cpp.

Here is the call graph for this function:

◆ volEnglob()

TYBox TYMachine::volEnglob ( ) const
virtual

Calcule la boite englobant ce volume.

Returns
La boite englobante.

Reimplemented from TYAcousticVolumeNode.

Definition at line 180 of file TYMachine.cpp.

Here is the call graph for this function:

◆ volume()

double TYMachine::volume ( ) const
virtual

Calcule le volume total de ce volume.

Returns
Le volume total.

Reimplemented from TYAcousticVolumeNode.

Definition at line 155 of file TYMachine.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _categorie

int TYMachine::_categorie
protected

Categorie.

Definition at line 124 of file TYMachine.h.

◆ _commentaire

QString TYMachine::_commentaire
protected

Commentaires.

Definition at line 130 of file TYMachine.h.

◆ _constructeur

QString TYMachine::_constructeur
protected

Nom du constructeur.

Definition at line 126 of file TYMachine.h.

◆ _modele

QString TYMachine::_modele
protected

Nom du modele.

Definition at line 128 of file TYMachine.h.


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