Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticRectangleNode.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14  */
15 
16 #include "Tympan/core/logging.h"
17 #if TY_USE_IHM
20 #endif
22 
25 
27 {
29 
30  TYAcousticRectangle* pAccRect = new TYAcousticRectangle();
31  pAccRect->getBoundingRect()->setSize(getSizeX(), getSizeY());
32  addAcousticSurf(pAccRect);
33 }
34 
36 {
37  *this = other;
38 }
39 
41 
43 {
44  if (this != &other)
45  {
47  }
48  return *this;
49 }
50 
52 {
53  if (this != &other)
54  {
55  if (TYAcousticSurfaceNode::operator!=(other))
56  {
57  return false;
58  }
59  }
60  return true;
61 }
62 
64 {
65  return !operator==(other);
66 }
67 
69 {
70  return "TYAcousticRectangleNode";
71 }
72 
73 bool TYAcousticRectangleNode::deepCopy(const TYElement* pOther, bool copyId /*=true*/,
74  bool pUseCopyTag /*=false*/)
75 {
76  return TYAcousticSurfaceNode::deepCopy(pOther, copyId);
77 }
78 
80 {
81  DOM_Element domNewElem = TYAcousticSurfaceNode::toXML(domElement);
82  return domNewElem;
83 }
84 
86 {
88 
89  updateGrid();
90 
91  return 1;
92 }
93 
95 {
97 }
98 
100 {
101  return TYSourcePonctuelle();
102 }
103 
105 {
107 }
108 
110 {
111  return TYAcousticSurfaceNode::setSrcsLw(); // Appel de la methode generale
112 }
113 
115 {
116  float factorX = sizeX / getSizeX();
117 
118  if ((factorX == 0) || (factorX == 1))
119  {
120  // Inutile d'appliquer un scale = 0 ou = 1
121  return;
122  }
123 
124  scale(factorX, 1.0f);
125 }
126 
128 {
129  float factorY = sizeY / getSizeY();
130 
131  if ((factorY == 0) || (factorY == 1))
132  {
133  // Inutile d'appliquer un scale = 0 ou = 1
134  return;
135  }
136 
137  scale(1.0f, factorY);
138 }
139 
140 void TYAcousticRectangleNode::setSize(float sizeX, float sizeY)
141 {
142  setSizeX(sizeX);
143  setSizeY(sizeY);
144 }
145 
146 void TYAcousticRectangleNode::getSize(float& sizeX, float& sizeY)
147 {
148  sizeX = getSizeX();
149  sizeY = getSizeY();
150 }
151 
153 {
154  return _pBoundingRect->getSizeX();
155 }
156 
158 {
159  return _pBoundingRect->getSizeY();
160 }
161 
162 void TYAcousticRectangleNode::scale(float factorX, float factorY)
163 {
164  getBoundingRect()->scale(factorX, factorY);
165 
166  // On applique les memes facteurs aux sous-rect
167  for (unsigned int i = 0; i < _tabAcousticSurf.size(); i++)
168  {
170 
171  ORepere3D repere;
172 
173  pSurface->getBoundingRect()->scale(factorX, factorY);
174  repere = _tabAcousticSurf[i]->getORepere3D();
175  repere._origin._x *= factorX;
176  repere._origin._y *= factorY;
177  _tabAcousticSurf[i]->setRepere(repere);
178 
179  pSurface->setIsGeometryModified(true);
180  _tabAcousticSurf[i]->setIsGeometryModified(true);
181  }
182 
183  setIsGeometryModified(true);
184 }
185 
186 bool TYAcousticRectangleNode::makeGrid(int nbCol, int nbRow)
187 {
188  return makeGrid(nbCol, nbRow, "TYAcousticRectangle");
189 }
190 
191 bool TYAcousticRectangleNode::makeGrid(int nbCol, int nbRow, const char* childType)
192 {
193  assert(TYElement::findPrototype(childType) != -1);
194 
195  if ((nbCol <= 0) || (nbRow <= 0) || (childType == NULL))
196  {
197  return false;
198  }
199 
200  // Nombre de case pour la grille
201  int nbCase = nbCol * nbRow;
202 
203  // Reset tab
204  purge();
205 
206  // Calcul des dimensions de chaque rect
207  OVector3D vecBoundingRectPt0(_pBoundingRect->_pts[0]);
208  OVector3D vecCol, vecRow;
209  vecCol = OVector3D(_pBoundingRect->_pts[0], _pBoundingRect->_pts[1]) * (1 / (double)nbCol);
210  vecRow = OVector3D(_pBoundingRect->_pts[0], _pBoundingRect->_pts[3]) * (1 / (double)nbRow);
211 
212  TYAcousticRectangle* pAccRect = NULL;
213 
214  // Populate tab
215  for (int i = 0; i < nbCase; i++)
216  {
217  // Nouveau rectangle
218  pAccRect = (TYAcousticRectangle*)TYElement::findAndClone(childType);
219  pAccRect->setParent(this);
220 
221  double curRow = (int)(i / nbCol);
222  double curCol = (int)(i % nbCol);
223 
224  OVector3D vec0 = (vecCol * curCol) + (vecRow * curRow);
225  OVector3D vec1 = (vecCol * (curCol + 1)) + (vecRow * curRow);
226  OVector3D vec3 = (vecRow * (curRow + 1)) + (vecCol * curCol);
227  OVector3D vec2 = (vecRow * (curRow + 1)) + (vecCol * (curCol + 1));
228 
229  // Dimension & position
230  pAccRect->getShape()->_pts[0] = vecBoundingRectPt0 + vec0;
231  pAccRect->getShape()->_pts[1] = vecBoundingRectPt0 + vec1;
232  pAccRect->getShape()->_pts[2] = vecBoundingRectPt0 + vec2;
233  pAccRect->getShape()->_pts[3] = vecBoundingRectPt0 + vec3;
234 
235  // Ajout au tableau
236  _tabAcousticSurf.push_back(new TYAcousticSurfaceGeoNode(pAccRect));
237  }
238 
239  setIsGeometryModified(true);
240 
241  return true;
242 }
243 
245 {
246  assert(pAccRectGeoNode);
247  assert(pAccRectGeoNode->getElement());
248 
249  LPTYAcousticRectangle pRectangle = TYAcousticRectangle::safeDownCast(pAccRectGeoNode->getElement());
250 
251  pRectangle->setIsSub(true);
252 
253  TYRectangle* pRect = pRectangle->getBoundingRect();
254  ORepere3D repRect = pAccRectGeoNode->getORepere3D();
255 
256  // Test si le rect passe se trouve a l'interieur du bounding rect de cette face
257  if (((pRect->_pts[3]._x + repRect._origin._x) < _pBoundingRect->_pts[3]._x) ||
258  ((pRect->_pts[3]._y + repRect._origin._y) < _pBoundingRect->_pts[3]._y) ||
259  ((pRect->_pts[1]._x + repRect._origin._x) > _pBoundingRect->_pts[1]._x) ||
260  ((pRect->_pts[1]._y + repRect._origin._y) > _pBoundingRect->_pts[1]._y))
261  {
262  return false;
263  }
264 
265  // Test si le rect passe ne coupe pas un rect sub deja present
266  for (unsigned int i = 0; i < _tabAcousticSurf.size(); i++)
267  {
269 
270  if ((pSurface->getIsSub()) && (pRect->intersectRect(pSurface->getBoundingRect(), repRect._origin,
271  _tabAcousticSurf[i]->getORepere3D()._origin)))
272  {
273  return false;
274  }
275  }
276 
277  // On peut ajouter le rect
278  addAcousticSurf((LPTYAcousticSurfaceGeoNode&)pAccRectGeoNode);
279 
280  // Recalcul de la grille
281  updateGrid();
282 
283  return true;
284 }
285 
287 {
288  return addSubRect(new TYAcousticRectangleGeoNode(repRect, (LPTYElement)pAccRect));
289 }
290 
292 {
293  bool bVal = TYAcousticSurfaceNode::remAcousticSurf(pAccSurfGeoNode);
294  updateGrid();
295 
296  return bVal;
297 }
298 
300 {
301  bool bVal = TYAcousticSurfaceNode::remAcousticSurf(pAccSurf);
302  updateGrid();
303 
304  return bVal;
305 }
307 {
308  bool bVal = TYAcousticSurfaceNode::remAcousticSurf(idAccSurf);
309  updateGrid();
310 
311  return bVal;
312 }
313 
315 {
316  updateGrid("TYAcousticRectangle");
317 }
318 
319 void TYAcousticRectangleNode::updateGrid(const char* childType)
320 {
321  assert(TYElement::findPrototype(childType) != -1);
322 
323  unsigned int i = 0, j = 0;
324  TYTabLPRectangle tabGlobal, tabSub;
325 
326  LPTYElementArray childs;
327  getChilds(childs);
328 
329  for (i = 0; i < childs.size(); i++)
330  {
331  childs[i]->setInCurrentCalcul(isInCurrentCalcul());
332  }
333 
334  // On teste si la mise a jour est vraiment necessaire
335  TYTabAcousticSurfaceGeoNode::iterator iter;
336  iter = _tabAcousticSurf.begin();
337 
338  // On supprime les sous-faces de "construction"
339  while (iter != _tabAcousticSurf.end())
340  {
341  if (!TYAcousticSurface::safeDownCast((*iter)->getElement())->getIsSub())
342  {
343  iter = _tabAcousticSurf.erase(iter);
344  }
345  else
346  {
347  iter++;
348  }
349  }
350 
351  // S'il n'y a aucune face 'Sub', on cree une face de construction
352  // de la taille du rectangle englobant
353  if (!_tabAcousticSurf.size())
354  {
355  // Construction de la face
357 
358  // Taille max
359  pAccRect->getBoundingRect()->setSize(getSizeX(), getSizeY());
360 
361  // Ajout de la face
362  pAccRect->setColor(getColor());
363  addAcousticSurf(pAccRect);
364 
365  return;
366  }
367 
368  // Il ne reste plus dans le tableau de faces que les sous-face marques "isSub"
369  // On recupere la geometrie (rectangles) de ses sous-faces que l'on ramene dans le
370  // repere du rectangle node
371  for (i = 0; i < _tabAcousticSurf.size(); i++)
372  {
373  // Tableau des rectangles des sous-faces pour l'expansion dans le repere du rectangle node.
374  LPTYRectangle pRectGlobal = new TYRectangle();
375  // Tableau des rectangles des sous-faces dans le repere du rectangle node.
376  LPTYRectangle pRectSub = new TYRectangle();
377 
378  for (j = 0; j < 4; j++)
379  {
381 
382  pRectGlobal->_pts[j]._x =
383  pSurface->getBoundingRect()->_pts[j]._x + _tabAcousticSurf[i]->getORepere3D()._origin._x;
384  pRectGlobal->_pts[j]._y =
385  pSurface->getBoundingRect()->_pts[j]._y + _tabAcousticSurf[i]->getORepere3D()._origin._y;
386  pRectGlobal->_pts[j]._z = 0.0;
387 
388  pRectSub->_pts[j] = pRectGlobal->_pts[j];
389  }
390 
391  tabGlobal.push_back(pRectGlobal);
392  tabSub.push_back(pRectSub);
393  }
394 
395  TYRectangle rect; // Rectangle trouve
396 
397  // Construction pour chaque sous-face du rectangle englobant de taille max
398  for (i = 0; i < tabGlobal.size(); i++)
399  {
400  // Recherche en x-
401  if (findNearestRect(tabGlobal[i], tabGlobal, -1, 0,
402  rect)) // Un rectangle de construction a ete trouve
403  {
404  tabGlobal[i]->_pts[0]._x = rect._pts[1]._x;
405  tabGlobal[i]->_pts[3]._x = rect._pts[1]._x;
406  }
407  else // On prend le rectangle englobant
408  {
409  tabGlobal[i]->_pts[0]._x = _pBoundingRect->_pts[0]._x;
410  tabGlobal[i]->_pts[3]._x = _pBoundingRect->_pts[0]._x;
411  }
412 
413  // Recherche en x+
414  if (findNearestRect(tabGlobal[i], tabGlobal, 1, 0, rect)) // Un rectangle de construction a ete trouve
415  {
416  tabGlobal[i]->_pts[1]._x = rect._pts[0]._x;
417  tabGlobal[i]->_pts[2]._x = rect._pts[0]._x;
418  }
419  else // On prend le rectangle englobant
420  {
421  tabGlobal[i]->_pts[1]._x = _pBoundingRect->_pts[1]._x;
422  tabGlobal[i]->_pts[2]._x = _pBoundingRect->_pts[1]._x;
423  }
424 
425  // Recherche en y-
426  if (findNearestRect(tabGlobal[i], tabGlobal, -1, 1,
427  rect)) // Un rectangle de construction a ete trouve
428  {
429  tabGlobal[i]->_pts[3]._y = rect._pts[0]._y;
430  tabGlobal[i]->_pts[2]._y = rect._pts[0]._y;
431  }
432  else // On prend le rectangle englobant
433  {
434  tabGlobal[i]->_pts[3]._y = _pBoundingRect->_pts[2]._y;
435  tabGlobal[i]->_pts[2]._y = _pBoundingRect->_pts[2]._y;
436  }
437 
438  // Recherche en y+
439  if (findNearestRect(tabGlobal[i], tabGlobal, 1, 1, rect)) // Un rectangle de construction a ete trouve
440  {
441  tabGlobal[i]->_pts[0]._y = rect._pts[2]._y;
442  tabGlobal[i]->_pts[1]._y = rect._pts[2]._y;
443  }
444  else // On prend le rectangle englobant
445  {
446  tabGlobal[i]->_pts[0]._y = _pBoundingRect->_pts[0]._y;
447  tabGlobal[i]->_pts[1]._y = _pBoundingRect->_pts[0]._y;
448  }
449  }
450 
451  // Decoupage de chaque rectangle max en grille de 5 cases ou moins
452  // a partir du sous-rectangle correspondant
453  for (i = 0; i < tabGlobal.size(); i++)
454  {
455  LPTYRectangle pGlobalRect = tabGlobal[i];
456  LPTYRectangle pSubRect = tabSub[i];
457  TYRepere rep;
458 
459  double lMax = pGlobalRect->getSizeX();
460  double hRect = pSubRect->getSizeY();
461 
462  // Sous-rectangle de dessus
464  double longueur = lMax;
465  double hauteur = ABS(pGlobalRect->_pts[0]._y - pSubRect->_pts[0]._y);
466 
467  if (hauteur != 0)
468  {
469  pAccRect_1->getBoundingRect()->setDimension(longueur, hauteur);
470  rep._origin._x = pGlobalRect->_pts[0]._x + longueur / 2.0;
471  rep._origin._y = pGlobalRect->_pts[0]._y - hauteur / 2.0;
472  addAcousticSurf(pAccRect_1, rep);
473  }
474 
475  // Sous-rectangle droit
477  longueur = ABS(pGlobalRect->_pts[3]._x - pSubRect->_pts[3]._x);
478  hauteur = hRect;
479 
480  if (longueur != 0)
481  {
482  pAccRect_2->getBoundingRect()->setDimension(longueur, hauteur);
483  rep._origin._x = pSubRect->_pts[3]._x - longueur / 2.0;
484  rep._origin._y = pSubRect->_pts[3]._y + hauteur / 2.0;
485  addAcousticSurf(pAccRect_2, rep);
486  }
487 
488  // Sous-rectangle de dessous
490  longueur = lMax;
491  hauteur = ABS(pGlobalRect->_pts[3]._y - pSubRect->_pts[3]._y);
492 
493  if (hauteur != 0)
494  {
495  pAccRect_3->getBoundingRect()->setDimension(longueur, hauteur);
496  rep._origin._x = pGlobalRect->_pts[3]._x + longueur / 2.0;
497  rep._origin._y = pGlobalRect->_pts[3]._y + hauteur / 2.0;
498  addAcousticSurf(pAccRect_3, rep);
499  }
500 
501  // Sous-rectangle gauche
503  longueur = ABS(pGlobalRect->_pts[2]._x - pSubRect->_pts[2]._x);
504  hauteur = hRect;
505 
506  if (longueur != 0)
507  {
508  pAccRect_4->getBoundingRect()->setDimension(longueur, hauteur);
509  rep._origin._x = pSubRect->_pts[2]._x + longueur / 2.0;
510  rep._origin._y = pSubRect->_pts[2]._y + hauteur / 2.0;
511  addAcousticSurf(pAccRect_4, rep);
512  }
513  }
514 
515  // Concerve la couleur du mur
516  for (iter = _tabAcousticSurf.begin(); iter != _tabAcousticSurf.end(); ++iter)
517  if (!TYAcousticSurface::safeDownCast((*iter)->getElement())->getIsSub())
518  {
519  TYAcousticRectangle::safeDownCast((*iter)->getElement())->setColor(getColor());
520  }
521 
522  setIsGeometryModified(true);
523 }
524 
526  const TYTabLPRectangle tabGlobal, const short signe,
527  const short dir, TYRectangle& rect)
528 {
529  bool ret = false;
530  unsigned int i = 0;
531  const double epsilon = 1E-3;
532  double longueur = 0.0;
533  double shortest = 1E6; // point le plus proche a 1000 km au depart (je pense que ca devrait aller ...)
534  TYRectangle test;
535 
536  if (dir == 0) // Direction horizontale
537  {
538  if (signe == -1) // A gauche
539  {
540  for (i = 0; i < tabGlobal.size(); i++)
541  {
542  if (tabGlobal[i] != currentRect) // Eviter de comparer le rectangle a lui meme
543  {
544  longueur = currentRect->_pts[0]._x - tabGlobal[i]->_pts[1]._x;
545 
546  if ((longueur >= 0.0) &&
547  (ABS(longueur) < shortest)) // Recherche du plus proche dans cette direction
548  {
549  // Construction d'un rectangle un peu plus grand pour tester l'intersection
550  test = *currentRect; // Pour gagner du temps
551  test._pts[0]._x = tabGlobal[i]->_pts[1]._x - epsilon;
552  test._pts[3]._x = tabGlobal[i]->_pts[2]._x - epsilon;
553 
554  if (test.intersectRect(tabGlobal[i])) // rectangle valable si intersection
555  {
556  shortest = ABS(longueur);
557  rect = *tabGlobal[i];
558  ret = true;
559  }
560  }
561  }
562  }
563  }
564  else // A droite
565  {
566  for (i = 0; i < tabGlobal.size(); i++)
567  {
568  if (tabGlobal[i] != currentRect)
569  {
570  longueur = currentRect->_pts[1]._x - tabGlobal[i]->_pts[0]._x;
571 
572  if ((longueur <= 0.0) && (ABS(longueur) < shortest))
573  {
574  // Construction d'un rectangle un peu plus grand pour tester l'intersection
575  test = *currentRect; // Pour gagner du temps
576  test._pts[1]._x = tabGlobal[i]->_pts[0]._x + epsilon;
577  test._pts[2]._x = tabGlobal[i]->_pts[3]._x + epsilon;
578 
579  if (test.intersectRect(tabGlobal[i])) // rectangle valable si intersection
580  {
581  shortest = ABS(longueur);
582  rect = *tabGlobal[i];
583  ret = true;
584  }
585  }
586  }
587  }
588  }
589  }
590  else // Direction verticale
591  {
592  if (signe == -1) // Au dessous
593  {
594  for (i = 0; i < tabGlobal.size(); i++)
595  {
596  if (tabGlobal[i] != currentRect)
597  {
598  longueur = currentRect->_pts[2]._y - tabGlobal[i]->_pts[1]._y;
599 
600  if ((longueur >= 0.0) && (ABS(longueur) < shortest))
601  {
602  // Construction d'un rectangle un peu plus grand pour tester l'intersection
603  test = *currentRect; // Pour gagner du temps
604  test._pts[3]._y = tabGlobal[i]->_pts[0]._y - epsilon;
605  test._pts[2]._y = tabGlobal[i]->_pts[1]._y - epsilon;
606 
607  if (test.intersectRect(tabGlobal[i])) // rectangle valable si intersection
608  {
609  shortest = ABS(longueur);
610  rect = *tabGlobal[i];
611  ret = true;
612  }
613  }
614  }
615  }
616  }
617  else // Au dessus
618  {
619  for (i = 0; i < tabGlobal.size(); i++)
620  {
621  if (tabGlobal[i] != currentRect)
622  {
623  longueur = currentRect->_pts[1]._y - tabGlobal[i]->_pts[2]._y;
624 
625  if ((longueur <= 0.0) && (ABS(longueur) < shortest))
626  {
627  // Construction d'un rectangle un peu plus grand pour tester l'intersection
628  test = *currentRect; // Pour gagner du temps
629  test._pts[0]._y = tabGlobal[i]->_pts[3]._y + epsilon;
630  test._pts[1]._y = tabGlobal[i]->_pts[2]._y + epsilon;
631 
632  if (test.intersectRect(tabGlobal[i])) // rectangle valable si intersection
633  {
634  shortest = ABS(longueur);
635  rect = *tabGlobal[i];
636  ret = true;
637  }
638  }
639  }
640  }
641  }
642  }
643 
644  return ret;
645 }
646 
648 {
650 }
651 
653 {
655 }
double ABS(double a)
Return the absolute value.
Definition: 3d.h:67
QDomElement DOM_Element
Definition: QT2DOM.h:30
Representation graphique d'un ensemble de rectangles acoustiques (fichier header)
outil IHM pour un ensemble de rectangles acoustiques (fichier header)
TY_EXT_GRAPHIC_INST(TYAcousticRectangleNode)
TY_EXTENSION_INST(TYAcousticRectangleNode)
std::vector< LPTYRectangle > TYTabLPRectangle
TYGeometryNode TYAcousticRectangleGeoNode
Noeud geometrique de type TYAcousticRectangle.
TYGeometryNode TYAcousticSurfaceGeoNode
Noeud geometrique de type TYAcousticSurface.
std::vector< LPTYElement > LPTYElementArray
Definition: TYElement.h:345
std::vector< LPTYSourcePonctuelleGeoNode > TYTabSourcePonctuelleGeoNode
Collection de noeuds geometriques de type TYSourcePonctuelle.
double _y
y coordinate of OCoord3D
Definition: 3d.h:283
double _z
z coordinate of OCoord3D
Definition: 3d.h:284
double _x
x coordinate of OCoord3D
Definition: 3d.h:282
static int findPrototype(const char *className)
Definition: TYElement.cpp:55
virtual const char * getClassName() const
Definition: TYElement.h:249
static OPrototype * safeDownCast(OPrototype *pObject)
Definition: TYElement.cpp:71
static OPrototype * findAndClone(const char *className)
Definition: TYElement.cpp:37
3D frame with a point and 3 vectors.
Definition: 3d.h:1211
OPoint3D _origin
The origin point.
Definition: 3d.h:1279
The 3D vector class.
Definition: 3d.h:298
virtual std::string toString() const
virtual DOM_Element toXML(DOM_Element &domElement)
bool findNearestRect(const LPTYRectangle currentRect, const TYTabLPRectangle tabGlobal, const short signe, const short dir, TYRectangle &rect)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
bool addSubRect(LPTYAcousticRectangleGeoNode pAccRectGeoNode)
void getSize(float &sizeX, float &sizeY)
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
bool operator==(const TYAcousticRectangleNode &other) const
Operateur ==.
void scale(float factorX, float factorY)
virtual void setSize(float sizeX, float sizeY)
virtual TYSourcePonctuelle srcPonctEquiv() const
bool operator!=(const TYAcousticRectangleNode &other) const
Operateur !=.
virtual bool remAcousticSurf(const LPTYAcousticSurfaceGeoNode pAccSurfGeoNode)
TYAcousticRectangleNode & operator=(const TYAcousticRectangleNode &other)
Operateur =.
virtual void setSizeX(float sizeX)
virtual bool makeGrid(int nbCol, int nbRow)
virtual void setSizeY(float sizeY)
virtual int fromXML(DOM_Element domElement)
TYRectangle * getShape()
virtual double activeSurface() const
virtual int fromXML(DOM_Element domElement)
virtual bool remAcousticSurf(const LPTYAcousticSurfaceGeoNode pAccSurfGeoNode)
LPTYRectangle _pBoundingRect
Rectangle englobant.
TYAcousticSurfaceNode & operator=(const TYAcousticSurfaceNode &other)
Operateur =.
TYTabAcousticSurfaceGeoNode _tabAcousticSurf
Tableau des AcousticSurfaces.
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual DOM_Element toXML(DOM_Element &domElement)
bool addAcousticSurf(LPTYAcousticSurfaceGeoNode pAccSurfGeoNode)
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
TYRectangle * getBoundingRect()
void setIsSub(bool isSub)
OColor getColor() const
virtual void setColor(const OColor &color)
virtual bool isInCurrentCalcul()
Definition: TYElement.h:541
QString _name
Nom courant de l'element.
Definition: TYElement.h:966
void setParent(TYElement *pParent)
Definition: TYElement.h:692
virtual void setIsGeometryModified(bool isModified)
Definition: TYElement.cpp:253
QString generateName(const char *classname)
Retourne le nom de la classe associe a un nombre.
static TYNameManager * get()
Retourne l'instance singleton.
void setSize(float sizeX, float sizeY)
float getSizeX()
void scale(float factorX, float factorY)
void setDimension(float lon, float haut)
bool intersectRect(LPTYRectangle pRect, TYPoint originRect=TYPoint(0, 0, 0), TYPoint origin=TYPoint(0, 0, 0))
TYPoint _pts[4]
Sommets.
Definition: TYRectangle.h:274
float getSizeY()
base_vec3< decimal > vec3
Definition: mathlib.h:381