Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYEcran.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 <vector>
17 
18 #if TY_USE_IHM
21 #endif
22 
23 #include "Tympan/core/logging.h"
28 #include "TYEcran.h"
29 
30 #include <math.h>
31 
34 
36 {
38 
39  _bPourCalculTrajet = false;
40  float r = 206.0f, g = 206.0f, b = 206.0f;
41 
42  _hauteur = 5.0f;
43  _epaisseur = 0.3f;
44 
45 #if TY_USE_IHM
46  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "UseNewAlgoGeom"))
47  {
48  _bPourCalculTrajet = TYPreferenceManager::getBool(TYDIRPREFERENCEMANAGER, "UseNewAlgoGeom");
49  }
50  else
51  {
52  TYPreferenceManager::setBool(TYDIRPREFERENCEMANAGER, "UseNewAlgoGeom", _bPourCalculTrajet);
53  }
54 
55  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "TYEcranGraphicColorR"))
56  {
57  TYPreferenceManager::getColor(TYDIRPREFERENCEMANAGER, "TYEcranGraphicColor", r, g, b);
58  }
59  else
60  {
61  TYPreferenceManager::setColor(TYDIRPREFERENCEMANAGER, "TYEcranGraphicColor", r, g, b);
62  }
63 
64  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "DefaultHMur"))
65  {
66  _hauteur = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "DefaultHMur");
67  }
68  else
69  {
70  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "DefaultHMur", _hauteur);
71  }
72 
73  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "DefaultWidthEcran"))
74  {
75  _epaisseur = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "DefaultWidthEcran");
76  }
77  else
78  {
79  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "DefaultWidthEcran", _epaisseur);
80  }
81 #endif
82 
83  OColor color;
84  color.r = r / 255;
85  color.g = g / 255;
86  color.b = b / 255;
87  setColor(color);
88 
89  _bEpaisseurModified = false;
90  _bHauteurModified = false;
91 }
92 
94 
96 {
97  *this = other;
98 }
99 
101 {
104 
105  _hauteur = other._hauteur;
106  _epaisseur = other._epaisseur;
107  _squelette = other._squelette;
108 
109  updateGeometry();
110 
111  _volEnglob = volEnglob();
114 
115  return *this;
116 }
117 
118 bool TYEcran::operator==(const TYEcran& other) const
119 {
120  if (this != &other)
121  {
122  if (TYAcousticFaceSet::operator!=(other))
123  {
124  return false;
125  }
126  if (_bPourCalculTrajet != (other._bPourCalculTrajet))
127  {
128  return false;
129  }
130  if (_hauteur != other._hauteur)
131  {
132  return false;
133  }
134  if (_epaisseur != other._epaisseur)
135  {
136  return false;
137  }
138  if (_squelette != other._squelette)
139  {
140  return false;
141  }
142  }
143  return true;
144 }
145 
146 bool TYEcran::operator!=(const TYEcran& other) const
147 {
148  return !operator==(other);
149 }
150 
151 bool TYEcran::deepCopy(const TYElement* pOther, bool copyId /*=true*/, bool pUseCopyTag /*=false*/)
152 {
153  if (!TYAcousticFaceSet::deepCopy(pOther, copyId))
154  {
155  return false;
156  }
157 
158  TYEcran* pOtherEcran = (TYEcran*)pOther;
159 
160  _hauteur = pOtherEcran->_hauteur;
161  _epaisseur = pOtherEcran->_epaisseur;
162  _bPourCalculTrajet = pOtherEcran->_bPourCalculTrajet;
163  _squelette = pOtherEcran->_squelette;
164 
165  updateGeometry();
166 
167  _volEnglob = volEnglob();
170 
171  return true;
172 }
173 
174 std::string TYEcran::toString() const
175 {
176  return "TYEcran";
177 }
178 
180 {
181  DOM_Element domNewElem = TYAcousticFaceSet::toXML(domElement, false); // do not save faces
182 
183  TYXMLTools::addElementFloatValue(domNewElem, "hauteur", _hauteur);
184  TYXMLTools::addElementFloatValue(domNewElem, "epaisseur", _epaisseur);
185 
186  DOM_Document domDoc = domElement.ownerDocument();
187  DOM_Element domSquelElem = domDoc.createElement("squelette");
188 
189  size_t nbPts = _squelette.size();
190  TYPoint pt;
191  for (size_t i = 0; i < nbPts; i++)
192  {
193  pt = _squelette[i];
194  pt.toXML(domSquelElem);
195  }
196 
197  domNewElem.appendChild(domSquelElem);
198 
199  return domNewElem;
200 }
201 
203 {
204  TYAcousticFaceSet::fromXML(domElement, false); // do not load faces
205 
206  // Reset
207  _squelette.clear();
208 
209  float height = NAN, width = NAN;
210  bool hauteurOk = false;
211  bool epaisseurOk = false;
212 
213  DOM_Element elemCur;
214 
215  QDomNodeList childs = domElement.childNodes();
216  for (unsigned int i = 0; i < childs.length(); i++)
217  {
218  elemCur = childs.item(i).toElement();
219 
220  TYXMLTools::getElementFloatValue(elemCur, "hauteur", height, hauteurOk);
221  TYXMLTools::getElementFloatValue(elemCur, "epaisseur", width, epaisseurOk);
222 
223  if (elemCur.nodeName() == "squelette") // on charge le squelette...
224  {
225  TYPoint pt;
226  DOM_Element elemCur2;
227  QDomNodeList childs2 = elemCur.childNodes();
228  for (unsigned int j = 0; j < childs2.length(); j++)
229  {
230  elemCur2 = childs2.item(j).toElement();
231  if (pt.callFromXMLIfEqual(elemCur2))
232  {
233  _squelette.push_back(pt);
234  }
235  }
236  }
237  }
238 
239  if (hauteurOk)
240  {
241  _hauteur = height;
242  }
243 
244  if (epaisseurOk)
245  {
246  _epaisseur = width;
247  }
248 
249  // On reconstruit les faces a partir du squelette
251  _bEpaisseurModified = false;
252  _bHauteurModified = false;
253 
254  _volEnglob = volEnglob();
257 
258  return 1;
259 }
260 
261 void TYEcran::getChilds(LPTYElementArray& childs, bool recursif /*=true*/)
262 {
263  TYAcousticFaceSet::getChilds(childs, recursif);
264 }
265 
267 {
268  TYPoint centre = centreGravite();
269  TYTabPoint edges = sommets();
270  TYTabPoint res;
271 
272  size_t nbPts = edges.size();
273 
274  if (nbPts < 1)
275  {
276  return res;
277  } // return nothing, if no points
278 
279  TYPoint pt;
280 
281  for (size_t i = 0; i < nbPts; i++)
282  {
283  pt = edges[i];
284 
285  if (pt._z < centre._z) // on selectionne les sommets en dessous du centre de gravite
286  {
287  // Ajout du point
288  res.push_back(pt);
289  }
290  }
291 
292  return res;
293 }
294 
296 {
297  // On récupère la liste des faces
298  TYTabLPPolygon tabFaces = this->faces();
299 
300  // On recherche le plus bas
301  double minZ = 1.E12;
302  for (unsigned int i = 0; i < tabFaces.size(); i++)
303  {
304  TYTabPoint tabPts = tabFaces[i]->getContour();
305  for (unsigned j = 0; j < tabPts.size(); j++)
306  {
307  minZ = tabPts[j]._z < minZ ? tabPts[j]._z : minZ;
308  }
309  }
310 
311  // On recherche la face dont tous les points sont égals à minZ
312  std::vector<unsigned int> listIndices;
313  bool faceOk = false;
314  for (unsigned int i = 0; i < tabFaces.size(); i++)
315  {
316  TYTabPoint tabPts = tabFaces[i]->getContour();
317  faceOk = false;
318  for (unsigned j = 0; j < tabPts.size(); j++)
319  {
320  if (tabPts[j]._z != minZ)
321  {
322  faceOk = false;
323  break;
324  }
325  faceOk = true;
326  }
327 
328  if (faceOk)
329  {
330  listIndices.push_back(i);
331  }
332  }
333 
334  // Construction du tableau de faces retourné
335  TYTabLPPolygon ret;
336  for (unsigned int i = 0; i < listIndices.size(); i++)
337  {
338  ret.push_back(tabFaces[listIndices[i]]);
339  }
340 
341  return ret;
342 }
343 
344 void TYEcran::setHauteur(double hauteur)
345 {
346  if (hauteur > 0.0f)
347  {
348  _hauteur = hauteur;
349  _bHauteurModified = true;
350  }
351 }
352 
353 void TYEcran::setEpaisseur(double epaisseur)
354 {
355  if (epaisseur > 0.0f)
356  {
357  _epaisseur = epaisseur;
358  _bEpaisseurModified = true;
359  }
360 }
361 
362 double TYEcran::getHauteur() const
363 {
364  return _hauteur;
365 }
366 
367 double TYEcran::getEpaisseur() const
368 {
369  return _epaisseur;
370 }
371 
373 {
375  {
377  _bEpaisseurModified = false;
378  _bHauteurModified = false;
379  }
380 }
381 
383 {
384  TYPolygon* pFace = NULL;
385  TYTabPoint vertices;
386 
387  // create a new face
388  pFace = new TYPolygon();
389  if (pFace != NULL)
390  {
391  vertices.clear();
392  vertices.push_back(s0);
393  vertices.push_back(s1);
394  vertices.push_back(s2);
395  vertices.push_back(s3);
396  pFace->setPoints(vertices);
397  }
398 
399  return pFace;
400 }
401 
402 // XBH: 24/11/04, version finale
403 bool TYEcran::setElements(TYTabPoint tabPts, double hauteur, double epaisseur)
404 {
405  OVector3D pt0, pt1, pt2;
406  OVector3D s0, s1, s2, s3; // sommets pour les faces (current)
407  OVector3D ls0, ls1, ls2, ls3; // last computed values
408  size_t count = tabPts.size();
409  TYRepere repMur;
410 
411  if ((count < 2) || (hauteur <= 0.0) || (epaisseur <= 0.0))
412  {
413  return false;
414  }
415 
416  _squelette.clear();
417  _squelette = tabPts;
418  _hauteur = hauteur;
419  _epaisseur = epaisseur;
420 
421  TYTabLPPolygon faces; // l'ensembles des faces de l'ecran
422  TYPolygon* pFace = NULL;
423  OVector3D zvec(0, 0, 1);
424  OVector3D vecN; // vecteur normal au segment courant
425 
426  // Cree la premiere face de cote
427  pt0 = tabPts[0];
428  pt1 = tabPts[1];
429 
430  // Vecteur pour la "longueur" de la face
431  OVector3D vec01(pt0, pt1);
432  vec01.normalize();
433  // compute normal to the vector vec01
434  vecN = vec01.cross(zvec);
435  vecN.normalize();
436  s0 = pt0 + (epaisseur / 2.0f) * vecN;
437  s1 = pt0 - (epaisseur / 2.0f) * vecN;
438  s2 = s0 + hauteur * zvec;
439  s3 = s1 + hauteur * zvec;
440 
441  // Define 1st extremity
442  pFace = newFace(s0, s2, s3, s1); // order of point define normal of face
443  if (pFace != NULL)
444  {
445  faces.push_back(pFace);
446  }
447 
448  ls0 = s0;
449  ls1 = s1;
450  ls2 = s2;
451  ls3 = s3;
452 
453  // On construit les faces de la tubulure
454  OPoint3D a1, b1, c1, d1; // (a1,b1) et (c1,d1) segment // au 1er segment
455  OPoint3D a2, b2, c2, d2; // (a2,b2) et (c2,d2) segment // au segment suivant
456  OPoint3D ptI1, ptI2;
457 
458  // if number of segments > 1 loop on each segment from the 1st to the last
459  for (size_t i = 1; i < count - 1; i++)
460  {
461  pt0 = tabPts[i - 1];
462  pt1 = tabPts[i];
463  pt2 = tabPts[i + 1];
464 
465  // Vecteur pour la "longueur" de la face
466  OVector3D vec01(pt0, pt1); // 1er segment
467  vec01.normalize();
468  OVector3D vec02(pt1, pt2); // segment suivant
469  vec02.normalize();
470 
471  vecN = vec01.cross(zvec); // compute normal to the vector vec01
472  vecN.normalize();
473 
474  a1 = pt0 + (epaisseur / 2.0f) * vecN;
475  b1 = pt1 + (epaisseur / 2.0f) * vecN;
476  c1 = pt0 - (epaisseur / 2.0f) * vecN;
477  d1 = pt1 - (epaisseur / 2.0f) * vecN;
478 
479  vecN = vec02.cross(zvec); // compute normal to the vector vec01
480  vecN.normalize();
481 
482  a2 = pt1 + (epaisseur / 2.0f) * vecN;
483  b2 = pt2 + (epaisseur / 2.0f) * vecN;
484  c2 = pt1 - (epaisseur / 2.0f) * vecN;
485  d2 = pt2 - (epaisseur / 2.0f) * vecN;
486 
487  int retInterSeg1Seg2 = OGeometrie::intersDroitesPoints(a1, b1, a2, b2, ptI1);
488  if (retInterSeg1Seg2 == INTERS_NULLE)
489  {
490  ptI1 = a2;
491  }
492  retInterSeg1Seg2 = OGeometrie::intersDroitesPoints(c1, d1, c2, d2, ptI2);
493  if (retInterSeg1Seg2 == INTERS_NULLE)
494  {
495  ptI2 = c2;
496  }
497 
498  s0 = ptI1;
499  s1 = ptI2;
500  s2 = s0 + hauteur * zvec;
501  s3 = s1 + hauteur * zvec;
502 
503  // bottom
504  pFace = newFace(s0, ls0, ls1, s1);
505  if (pFace != NULL)
506  {
507  faces.push_back(pFace);
508  }
509 
510  // front
511  pFace = newFace(s1, ls1, ls3, s3);
512  if (pFace != NULL)
513  {
514  faces.push_back(pFace);
515  }
516 
517  // top
518  pFace = newFace(s3, ls3, ls2, s2);
519  if (pFace != NULL)
520  {
521  faces.push_back(pFace);
522  }
523 
524  // back
525  pFace = newFace(ls0, s0, s2, ls2);
526  if (pFace != NULL)
527  {
528  faces.push_back(pFace);
529  }
530 
531  // keep previous vertice
532  ls0 = s0;
533  ls1 = s1;
534  ls2 = s2;
535  ls3 = s3;
536  }
537 
538  // derniere portion de tubulure
539  pt0 = tabPts[count - 2];
540  pt1 = tabPts[count - 1];
541 
542  // Vecteur pour la "longueur" de la face
543  OVector3D vec02(pt0, pt1);
544  vec02.normalize();
545  // compute normal to the vector vec02
546  vecN = vec02.cross(zvec);
547  vecN.normalize();
548  s0 = pt1 + (epaisseur / 2.0f) * vecN;
549  s1 = pt1 - (epaisseur / 2.0f) * vecN;
550  s2 = s0 + hauteur * zvec;
551  s3 = s1 + hauteur * zvec;
552 
553  // bottom
554  pFace = newFace(s0, ls0, ls1, s1);
555  if (pFace != NULL)
556  {
557  faces.push_back(pFace);
558  }
559 
560  // front
561  pFace = newFace(s1, ls1, ls3, s3);
562  if (pFace != NULL)
563  {
564  faces.push_back(pFace);
565  }
566 
567  // top
568  pFace = newFace(s3, ls3, ls2, s2);
569  if (pFace != NULL)
570  {
571  faces.push_back(pFace);
572  }
573 
574  // back
575  pFace = newFace(ls0, s0, s2, ls2);
576  if (pFace != NULL)
577  {
578  faces.push_back(pFace);
579  }
580 
581  // on bouche le cote de fin
582  pFace = newFace(s0, s1, s3, s2);
583  if (pFace != NULL)
584  {
585  faces.push_back(pFace);
586  }
587 
588  // on sauve le tout
590 
591  _volEnglob = volEnglob();
594 
595  return true;
596 }
597 
598 int TYEcran::intersects(const OSegment3D& seg, TYTabPoint& ptList) const
599 {
600  return TYAcousticFaceSet::intersects(seg, ptList);
601 }
602 
603 void TYEcran::setacousticFacesPourCalcul(bool bPourCalculTrajet)
604 {
605  _bPourCalculTrajet = bPourCalculTrajet;
606 }
607 
609 {
611 
612  size_t nbFaces = _faces.getNbFaces();
614 
615  LPTYAcousticSurfaceGeoNode pAccSurfGeoNode;
616  TYAcousticPolygon* pAccPolygon = nullptr;
617 
618  for (size_t i = 0; i < nbFaces; i++)
619  {
620  pAccPolygon = new TYAcousticPolygon();
621  pAccPolygon->setParent(this); // XBH: pourquoi on prend ce parent la??...
622 
623  // Geomtrie
624  *pAccPolygon->getPolygon() = *faces.at(i);
625  tab.push_back(new TYAcousticSurfaceGeoNode(pAccPolygon));
626  }
627 
628  return tab;
629 }
630 
631 int TYEcran::isInside(const TYPoint& pt) const
632 {
633  int res = INTERS_NULLE;
634  OPoint3D ptCopy(pt);
635 
636  // Le test avec le volume englobant permet de tester si le pt
637  // se trouve entre les plans du sol et du plafond,
638  // et d'evite aussi des calculs inutiles...
639  if (_volEnglob.isInside(pt) == INTERS_NULLE)
640  {
641  return res;
642  }
643 
644  TYTabLPPolygon tabFaces = getContours();
645 
646  double minZ = 0.0, maxZ = 0.0;
647 
648  // Pour toutes les faces
649  for (unsigned int i = 0; i < tabFaces.size(); i++)
650  {
651  TYTabPoint tabPts = tabFaces[i]->getContour();
652  size_t nbPts = tabPts.size();
653  minZ = tabPts[0]._z;
654  maxZ = getHauteur() + minZ;
655 
656  // On s'assure enfin que le point est compris dans la hauteur de l'écran
657  if ((pt._z < minZ) || (pt._z > maxZ))
658  {
659  return INTERS_NULLE;
660  }
661 
662  if (nbPts >= 3)
663  {
664  // On pose tout au sol !
665  ptCopy._z = 0.0;
666 
667  // On se ramene a un plan (z=0), on teste si le pt est a l'interieur
668  // du polygone forme par le contour de l'etage
669  OPoint3D* pts = new OPoint3D[nbPts];
670 
671  for (size_t i = 0; i < nbPts; i++)
672  {
673  // Creation du polygone
674  pts[i] = tabPts[i];
675 
676  // ... tout au sol !
677  pts[i]._z = 0.0;
678  }
679 
680  LPTYPolygon pPoly = new TYPolygon(tabPts);
681 
682  OPoint3D ptMin, ptMax;
683 
684  OGeometrie::boundingBox(pts, static_cast<int>(nbPts), ptMin, ptMax);
685 
686  OBox box(ptMin, ptMax);
687 
688 #if TY_USE_IHM
689  res = OGeometrie::pointInPolygonRayCasting(ptCopy, pts, static_cast<int>(nbPts));
690 #else
691  res = OGeometrie::pointInPolygonAngleSum(ptCopy, pts, nbPts);
692 #endif
693 
694  delete[] pts;
695 
696  if (res)
697  {
698  break;
699  } // Si on a trouvé au moins une face qui "matche" on sort de la boucle
700  }
701  }
702 
703  return res;
704 }
All base classes related to 3D manipulation.
#define INTERS_NULLE
No intersection.
Definition: 3d.h:35
QDomDocument DOM_Document
Definition: QT2DOM.h:33
QDomElement DOM_Element
Definition: QT2DOM.h:30
TYGeometryNode TYAcousticSurfaceGeoNode
Noeud geometrique de type TYAcousticSurface.
std::vector< LPTYAcousticSurfaceGeoNode > TYTabAcousticSurfaceGeoNode
Collection de noeuds geometriques de type TYAcousticSurface.
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
std::vector< LPTYPolygon > TYTabLPPolygon
Collection de pointeurs de TYPolygon.
Definition: TYDefines.h:349
Representation graphique d'un ecran (fichier header)
Outil IHM pour un ecran (fichier header)
TY_EXT_GRAPHIC_INST(TYEcran)
TY_EXTENSION_INST(TYEcran)
std::vector< LPTYElement > LPTYElementArray
Definition: TYElement.h:345
#define TYDIRPREFERENCEMANAGER
Definition: TYElement.h:52
The box class.
Definition: 3d.h:1294
Definition: color.h:31
float b
Definition: color.h:33
float r
Definition: color.h:33
float g
Definition: color.h:33
double _z
z coordinate of OCoord3D
Definition: 3d.h:284
static void boundingBox(OPoint3D *pts, int nbPts, OPoint3D &ptMin, OPoint3D &ptMax)
Computes the simple bounding box for a volume using min-max method.
Definition: 3d.cpp:1109
static bool pointInPolygonAngleSum(const OPoint3D &ptP, const OPoint3D *pts, int nbPts)
Tests if a point is inside a polygon using angle sum algorithm.
Definition: 3d.cpp:1016
static bool pointInPolygonRayCasting(const OPoint3D &ptP, const OPoint3D *pts, int nbPts)
Tests if a point is inside a polygon using ray casting algorithm.
Definition: 3d.cpp:1046
static int intersDroitesPoints(const OPoint3D &ptA, const OPoint3D &ptB, const OPoint3D &ptC, const OPoint3D &ptD, OPoint3D &ptI)
Calculate the intersection between two lines each defined by two points.
Definition: 3d.cpp:938
The 3D point class.
Definition: 3d.h:487
virtual const char * getClassName() const
Definition: TYElement.h:249
Class to define a segment.
Definition: 3d.h:1089
The 3D vector class.
Definition: 3d.h:298
void normalize()
Normalizes this vector.
Definition: 3d.cpp:225
OVector3D cross(const OVector3D &vector) const
Cross product.
Definition: 3d.cpp:196
virtual int intersects(const OSegment3D &seg, TYTabPoint &ptList) const
virtual int fromXML(DOM_Element domElement)
virtual TYBox volEnglob() const
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual DOM_Element toXML(DOM_Element &domElement)
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
TYAcousticFaceSet & operator=(const TYAcousticFaceSet &other)
Operateur =.
virtual TYTabPoint sommets() const
virtual TYPoint centreGravite() const
virtual TYTabLPPolygon faces() const
TYFaceSet _faces
Ensemble des faces.
virtual LPTYPolygon getPolygon()
int isInside(const TYPoint &pt) const
Definition: TYBox.cpp:236
virtual void setColor(const OColor &color)
void setEpaisseur(double epaisseur)
Definition: TYEcran.cpp:353
void setacousticFacesPourCalcul(bool bPourCalculTrajet)
Definition: TYEcran.cpp:603
bool _bPourCalculTrajet
Definition: TYEcran.h:174
bool _bHauteurModified
la hauteur a ete modifiee
Definition: TYEcran.h:169
void updateGeometry()
Definition: TYEcran.cpp:372
TYTabPoint getContour() const
Definition: TYEcran.cpp:266
virtual ~TYEcran()
Definition: TYEcran.cpp:93
double getHauteur() const
Definition: TYEcran.cpp:362
TYPolygon * newFace(OVector3D s0, OVector3D s1, OVector3D s2, OVector3D s3)
Definition: TYEcran.cpp:382
virtual TYTabAcousticSurfaceGeoNode acousticFaces()
Definition: TYEcran.cpp:608
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYEcran.cpp:179
virtual std::string toString() const
Definition: TYEcran.cpp:174
TYTabPoint _squelette
Definition: TYEcran.h:166
bool operator==(const TYEcran &other) const
Definition: TYEcran.cpp:118
double _hauteur
hauteur de l'ecran
Definition: TYEcran.h:159
TYTabLPPolygon getContours() const
Definition: TYEcran.cpp:295
bool setElements(TYTabPoint tabPts, double hauteur=2.0, double epaisseur=0.5)
Definition: TYEcran.cpp:403
TYEcran()
Definition: TYEcran.cpp:35
TYEcran & operator=(const TYEcran &other)
Definition: TYEcran.cpp:100
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
Definition: TYEcran.cpp:261
bool operator!=(const TYEcran &other) const
Definition: TYEcran.cpp:146
double getEpaisseur() const
Definition: TYEcran.cpp:367
bool _bEpaisseurModified
l'epaisseur a ete modifiee
Definition: TYEcran.h:171
virtual int fromXML(DOM_Element domElement)
Definition: TYEcran.cpp:202
double _epaisseur
epaisseur de l'ecran
Definition: TYEcran.h:161
virtual int isInside(const TYPoint &pt) const
Definition: TYEcran.cpp:631
virtual int intersects(const OSegment3D &seg, TYTabPoint &ptList) const
Definition: TYEcran.cpp:598
void setHauteur(double hauteur)
Definition: TYEcran.cpp:344
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYEcran.cpp:151
QString _name
Nom courant de l'element.
Definition: TYElement.h:966
bool callFromXMLIfEqual(DOM_Element &domElement, int *pRetVal=NULL)
Definition: TYElement.cpp:544
void setParent(TYElement *pParent)
Definition: TYElement.h:692
void setFaces(const TYTabLPPolygon &faces)
Definition: TYFaceSet.h:127
size_t getNbFaces() const
Definition: TYFaceSet.h:119
virtual TYTabLPPolygon faces() const
Definition: TYFaceSet.cpp:216
QString generateName(const char *classname)
Retourne le nom de la classe associe a un nombre.
static TYNameManager * get()
Retourne l'instance singleton.
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYPoint.cpp:112
void setPoints(const TYTabPoint &pts)
Definition: TYPolygon.cpp:389
void calculRayonSphere(const TYBox &volEnglob)
virtual void calculCentreGravite()
static bool getElementFloatValue(DOM_Element parentElem, DOMString nodeName, float &nodeValue)
Definition: TYXMLTools.cpp:211
static void addElementFloatValue(DOM_Element &parentElem, DOMString nodeName, float nodeValue)
Definition: TYXMLTools.cpp:82