58 if (TYElement::operator!=(other))
62 if (TYColorInterface::operator!=(other))
66 if (TYAcousticInterface::operator!=(other))
99 for (
int i = 0; i < pOtherAccVolNode->
getNbChild(); i++)
112 return "TYAcousticVolumeNode";
149 QDomNodeList childs = domElement.childNodes();
150 for (
unsigned int i = 0; i < childs.length(); i++)
152 elemCur = childs.item(i).toElement();
204 pVolume->setRegime(
Spectre, regime, recursif);
219 pVolume->setRegimeName(
name);
233 pVolume->remRegime(regime);
250 pVolume->loadRegime(regimeNb);
262 pVolume->setCurRegime(regime);
287 for (
size_t i = 0; i < childs.size(); i++)
297 if (pVolume->getNbRegimes() > nbRegimes)
299 pVolume->setNbRegimes(
static_cast<int>(nbRegimes));
302 pVolume->correctNbRegimes();
315 pVol->propagateAtt(pAtt);
331 if (pVolume->getIsRayonnant())
338 for (
unsigned int j = 0; j < tabChild.size(); j++)
340 tabChild[j]->setMatrix(matrix * tabChild[j]->getMatrix());
344 tab.insert(tab.end(), tabChild.begin(), tabChild.end());
401 if (pVolume->getIsRayonnant())
403 pVolume->distriSrcs();
417 if (pVolume->getIsRayonnant())
419 pVolume->setSrcsLw();
434 pVolume->remAllSrcs();
486 if (volCourant->getIsRayonnant())
488 LWv = volCourant->setGlobalLW(LWg, surfTotale);
490 ret &= volCourant->updateAcoustic();
495 volCourant->setRegime(aTYSpectre);
508 if (volCourant->getIsRayonnant())
510 LWc = LWc.
sum(volCourant->getCurrentSpectre().toGPhy());
519 double residu =
ABS(10 * log10(LWg.
sigma()) - 10 * log10(LWc.
sigma()));
522 ret = residu < 1 ? true :
false;
547 res += pVolume->volume();
561 res += pVolume->surface();
575 if (pVolume->getIsRayonnant())
577 res += pVolume->activeSurface();
592 if (pVolume->getIsRayonnant())
594 res += pVolume->activeSurface();
613 for (
unsigned int j = 0; j < tabTmp.size(); j++)
616 tabTmp[j] = matrix * tabTmp[j];
620 tab.insert(tab.end(), tabTmp.begin(), tabTmp.end());
638 for (
unsigned int j = 0; j < tabTmp.size(); j++)
641 tabTmp[j] = matrix * tabTmp[j];
645 tab.insert(tab.end(), tabTmp.begin(), tabTmp.end());
663 for (
unsigned int j = 0; j < tabTmp.size(); j++)
673 tab.insert(tab.end(), tabTmp.begin(), tabTmp.end());
686 printf(
"TYAcousticVolumeNode::centreGravite non implemente.\n");
713 ptTest = matrix * pt;
718 res = pVolume->isInside(ptTest);
734 for (
unsigned int j = 0; j < tabTmp.size(); j++)
736 tabTmp[j]->setMatrix(matrixVol * tabTmp[j]->getMatrix());
737 tab.push_back(tabTmp[j]);
752 assert(pAccVolGeoNode);
759 pVolume->setParent(
this);
773 pVolume->addRegime();
781 pVolume->setCurRegime(i);
782 pVolume->setRegimeName(nomReg);
802 pVolGeoNode->
setParent(pAccVol->getParent());
815 TYTabAcousticVolumeGeoNode::iterator ite;
835 assert(pAccVolGeoNode);
837 TYTabAcousticVolumeGeoNode::iterator ite;
841 if ((*ite) == pAccVolGeoNode)
858 TYTabAcousticVolumeGeoNode::iterator ite;
891 TYTabAcousticVolumeGeoNode::iterator ite;
916 for (
unsigned int i = 0; i < srcs.size(); i++)
919 if (pSource.
_pObj !=
nullptr)
934 ofs <<
getName().toLatin1().data() <<
'\n';
941 TYTabAcousticVolumeGeoNode::iterator ite;
950 pVol->exportCSV(ofs);
double ABS(double a)
Return the absolute value.
#define INTERS_NULLE
No intersection.
std::vector< LPTYAcousticSurfaceGeoNode > TYTabAcousticSurfaceGeoNode
Collection de noeuds geometriques de type TYAcousticSurface.
TY_EXTENSION_INST(TYAcousticVolumeNode)
TYGeometryNode TYAcousticVolumeGeoNode
Noeud geometrique de type TYAcousticVolume.
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
std::vector< OVector3D > TYTabVector
Collection de OVector3D.
std::vector< LPTYPolygon > TYTabLPPolygon
Collection de pointeurs de TYPolygon.
std::vector< LPTYElement > LPTYElementArray
std::vector< LPTYSourcePonctuelleGeoNode > TYTabSourcePonctuelleGeoNode
Collection de noeuds geometriques de type TYSourcePonctuelle.
int invert()
Matrix inversion.
virtual const char * getClassName() const
static OPrototype * safeDownCast(OPrototype *pObject)
Class to define a segment.
OSpectreAbstract & sum(const OSpectreAbstract &spectre) const
Arithmetic sum of two spectrums in one-third Octave.
OSpectreAbstract & toGPhy() const
Converts to physical quantity.
void setType(TYSpectreType type)
Set the spectrum type.
double sigma()
Sum the values of the spectrum.
OSpectreAbstract & toDB() const
Converts to dB.
OSpectreAbstract & sumdB(const OSpectreAbstract &spectre) const
Energetic sum of two spectrums.
static OSpectre getEmptyLinSpectre(const double &valInit=1.0E-20)
Create a physical quantity spectrum.
T * _pObj
The real pointer, must derived IRefCount.
double _densiteSrcsV
Densite verticale de sources.
double getDensiteSrcsH() const
virtual void setDensiteSrcsH(double densite, bool recursif=true)
TYRegime & getRegimeNb(const int &nb, bool &status)
size_t getNbRegimes() const
double getDensiteSrcsV() const
int _curRegime
Numero du regime de fonctionnement courant.
int _typeDistribution
Indique le type de distribution a utiliser. pour l'etat courant.
virtual void loadRegime(int regimeNb=-1)
TYSpectre & getCurrentSpectre()
TYTabRegimes _tabRegimes
Tableau des regimes de fonctionnement.
virtual void setDensiteSrcsV(double densite, bool recursif=true)
DOM_Element toXML(DOM_Element &domElement)
virtual void exportCSV(std::ofstream &ofs)
Export au format csv sur un flux transmis.
TYAcousticInterface & operator=(const TYAcousticInterface &other)
virtual void setRegime(TYSpectre &Spectre, int regime=-1, bool recursif=false)
virtual void setIsRayonnant(bool rayonnant=true, bool recursif=true)
virtual void setCurRegime(int regimeNumber)
int fromXML(DOM_Element domElement)
bool _regimeChangeAble
Indique si un element peux changer de regime de lui meme.
virtual int getNextRegimeNb()
void deepCopy(const TYAcousticInterface *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual void propagateAtt(LPTYAttenuateur pAtt)
double _densiteSrcsH
Densite horizontale de sources.
virtual bool remRegime(int regime)
virtual void setRegimeName(const QString &name)
virtual TYTabAcousticSurfaceGeoNode acousticFaces()
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual void exportCSV(std::ofstream &ofs)
Export au format csv sur un flux transmis.
virtual ~TYAcousticVolumeNode()
virtual void setDensiteSrcsV(double densite, bool recursif=true)
virtual TYTabVector normals() const
virtual int fromXML(DOM_Element domElement)
virtual TYPoint centreGravite() const
bool addAcousticVol(LPTYAcousticVolumeGeoNode pAccVolGeoNode, bool recursif=true)
virtual void setRegime(TYSpectre &Spectre, int regime=-1, bool recursif=false)
size_t getNbChild() const
virtual bool updateAcoustic(const bool &force=false)
virtual void distriSrcs()
virtual void setIsRayonnant(bool rayonnant=true, bool recursif=true)
virtual double activeSurface() const
TYTabAcousticVolumeGeoNode _tabAcousticVol
Tableau des AcousticVolumes.
virtual int isInside(const TYPoint &pt) const
virtual TYBox volEnglob() const
virtual void propagateAtt(LPTYAttenuateur pAtt)
virtual TYTabPoint sommets() const
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
virtual DOM_Element toXML(DOM_Element &domElement)
virtual LPTYSpectre getRealPowerSpectrum()
virtual void correctNbRegimes()
virtual std::string toString() const
LPTYAcousticVolume getAcousticVol(int index)
LPTYAcousticVolumeGeoNode findAcousticVol(const LPTYAcousticVolume pAccVol)
TYAcousticVolumeNode & operator=(const TYAcousticVolumeNode &other)
Operateur =.
virtual double surface() const
virtual void loadRegime(int regimeNb=-1)
virtual TYTabLPPolygon faces() const
bool remAcousticVol(const LPTYAcousticVolumeGeoNode pAccVolGeoNode)
virtual bool remRegime(int regime)
bool operator==(const TYAcousticVolumeNode &other) const
Operateur ==.
virtual double volume() const
virtual int intersects(const OSegment3D &seg, TYTabPoint &ptList) const
virtual void remAllSrcs()
virtual void setDensiteSrcsH(double densite, bool recursif=true)
bool operator!=(const TYAcousticVolumeNode &other) const
Operateur !=.
virtual void setCurRegime(int regime)
virtual void setRegimeName(const QString &name)
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
virtual TYSourcePonctuelle srcPonctEquiv() const
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
int fromXML(DOM_Element domElement)
TYColorInterface & operator=(const TYColorInterface &other)
void deepCopy(const TYColorInterface *pOther, bool copyId=true, bool pUseCopyTag=false)
DOM_Element toXML(DOM_Element &domElement)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual DOM_Element toXML(DOM_Element &domElement)
QString _name
Nom courant de l'element.
TYElement & operator=(const TYElement &other)
bool callFromXMLIfEqual(DOM_Element &domElement, int *pRetVal=NULL)
virtual QString getName() const
bool getIsAcousticModified()
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
void setParent(TYElement *pParent)
virtual int fromXML(DOM_Element domElement)
virtual void setIsAcousticModified(bool isModified)
virtual void setIsGeometryModified(bool isModified)
TYElement * getElement() const
QString generateName(const char *classname)
Retourne le nom de la classe associe a un nombre.
static TYNameManager * get()
Retourne l'instance singleton.
void transform(const OMatrix &matrix)
virtual TYSpectre * getSpectre(int regime=-1) const
static TYSpectre getEmptyLinSpectre(const double &valInit=1.0E-20)
Cree un spectre en lin.
virtual int intersects(const OSegment3D &seg, TYTabPoint &ptList) const
virtual TYBox volEnglob() const