Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSiteModelerFrame.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 
21 #include <qmessagebox.h>
22 #include <qtooltip.h>
23 #include <qcombobox.h>
24 #include <qlayout.h>
25 #include <qcursor.h>
26 #include <qtoolbutton.h>
27 #include <qpixmap.h>
28 
45 #if WITH_NMPB
47 #endif
59 #include "TYSiteModelerFrame.h"
60 
61 #define TR(id) OLocalizator::getString("TYSiteModelerFrame", (id))
62 #define IMG(id) OLocalizator::getPicture("TYSiteModelerFrame", (id))
63 
65 
66 TYSiteModelerFrame::TYSiteModelerFrame(QWidget* parent, const char* name, Qt::WindowFlags f)
67  : TYModelerFrame(parent, name, f)
68 {
69  init();
70  setProjet(new TYProjet());
71  _pAltiBtn->setEnabled(true);
72  setSelectMaillageBox(TR("id_none_select_maillage"));
75 }
76 
77 TYSiteModelerFrame::TYSiteModelerFrame(LPTYProjet pProjet, QWidget* parent, const char* name,
78  Qt::WindowFlags f)
79  : TYModelerFrame(parent, name, f)
80 {
81  init();
82 
83  assert(pProjet);
84  setProjet(pProjet);
85  _pAltiBtn->setEnabled(true);
86  setSelectMaillageBox(TR("id_none_select_maillage"));
89 }
90 
91 TYSiteModelerFrame::TYSiteModelerFrame(LPTYSiteNode pSite, QWidget* parent, const char* name,
92  Qt::WindowFlags f)
93  : TYModelerFrame(parent, name, f)
94 {
95  init();
96 
97  assert(pSite);
98  setSite(pSite);
99  // Check if altimetry is up to date on the root site node.
100  // If it is, no need to enable the button triggering its computation
101  if (_pSite->getProjet() != nullptr)
102  {
103  _pAltiBtn->setEnabled(true);
104  }
105  setSelectMaillageBox(TR("id_none_select_maillage"));
108 }
109 
111 {
112  _nbInstance++;
113  setWindowTitle(TR("id_caption") + " " + QString("%1").arg(_nbInstance));
114 
115  // Btn Show CrbNiv
116  _showCrbNiv = true;
117  _pShowCrbNivBtn = new QToolButton(this);
118  _pShowCrbNivBtn->setIcon(QPixmap(IMG("id_icon_crbniv")));
119  _pShowCrbNivBtn->setText(TR("id_show_crbniv_btn"));
120  _pShowCrbNivBtn->setToolTip(TR("id_show_crbniv_btn"));
121  _pShowCrbNivBtn->setCheckable(true);
122  _pShowCrbNivBtn->setChecked(_showCrbNiv);
123  _pShowCrbNivBtn->setFixedSize(24, 24);
124  _pCtrlLayout->addWidget(_pShowCrbNivBtn, 0);
125  connect(_pShowCrbNivBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showCrbNiv);
126 
127  // Btn Show Altimetrie
128  _showAltimetrie = false;
129  _pShowAltimetrieBtn = new QToolButton(this);
130  _pShowAltimetrieBtn->setIcon(QPixmap(IMG("id_icon_altimetrie")));
131  _pShowAltimetrieBtn->setText(TR("id_show_altimetrie_btn"));
132  _pShowAltimetrieBtn->setToolTip(TR("id_show_altimetrie_btn"));
133  _pShowAltimetrieBtn->setCheckable(true);
135  _pShowAltimetrieBtn->setFixedSize(24, 24);
136  _pCtrlLayout->addWidget(_pShowAltimetrieBtn, 0);
137  connect(_pShowAltimetrieBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showAltimetrie);
138 
139  // Btn Show ImageSite
140  _showImageSite = true;
141  _pShowImageSiteBtn = new QToolButton(this);
142  _pShowImageSiteBtn->setIcon(QPixmap(IMG("id_icon_imagesite")));
143  _pShowImageSiteBtn->setText(TR("id_show_imagesite_btn"));
144  _pShowImageSiteBtn->setToolTip(TR("id_show_imagesite_btn"));
145  _pShowImageSiteBtn->setCheckable(true);
146  _pShowImageSiteBtn->setChecked(_showImageSite);
147  _pShowImageSiteBtn->setFixedSize(24, 24);
148  _pCtrlLayout->addWidget(_pShowImageSiteBtn, 0);
149  connect(_pShowImageSiteBtn, &QToolButton::toggled, this, &TYSiteModelerFrame::showImageSite);
150 
151  // Editors
152  _pEchelleEditor = new TYEchelleEditor(this);
155  _pEmpriseEditor = new TYEmpriseEditor(this);
157  _pPlanEauEditor = new TYPlanEauEditor(this);
158  _pTerrainEditor = new TYTerrainEditor(this);
159 #if WITH_NMPB
160  _pRouteEditor = new TYRouteEditor(this);
161 #endif
163  _pEtageEditor = new TYEtageEditor(this);
164  _pSilosEditor = new TYSilosEditor(this);
166  _pSourceEditor = new TYSourceEditor(this);
172 
173  _pCtrlLayout->addSpacing(10);
174 
175  // Disambiguate the overloaded signal QComboBox::activated
176  void (QComboBox::*_qComboBox_activated_int)(int) = &QComboBox::activated;
177  void (QComboBox::*_qComboBox_activated_str)(const QString&) = &QComboBox::textActivated;
178 
179  // Combo box mode de Rendu
180  _pRenderMaillageModeBox = new QComboBox(this);
181  _pCtrlLayout->addWidget(_pRenderMaillageModeBox, 0);
182  _pRenderMaillageModeBox->setToolTip(TR("id_render_maillage_mode"));
183  _pRenderMaillageModeBox->insertItem(Surface, TR("id_surface_maillage_mode"));
184  _pRenderMaillageModeBox->insertItem(Lines, TR("id_lines_maillage_mode"));
185  _pRenderMaillageModeBox->insertItem(Mixed, TR("id_mixed_maillage_mode"));
186  connect(_pRenderMaillageModeBox, &QComboBox::activated, this,
188 
189  _pCtrlLayout->addSpacing(10);
190 
191  _pSelectMaillageBox = new QComboBox(this);
192  _pCtrlLayout->addWidget(_pSelectMaillageBox, 0);
193  _pSelectMaillageBox->setToolTip(TR("id_select_maillage"));
194  connect(_pSelectMaillageBox, _qComboBox_activated_str, this, &TYSiteModelerFrame::setSelectMaillageBox);
195 
196  _pCtrlLayout->addSpacing(10);
197 
198  // Btn MaJ Altimetrie
199  _pAltiBtn = new QToolButton(this);
200  _pAltiBtn->setIcon(QPixmap(IMG("id_icon_calculalti_btn")));
201  _pAltiBtn->setText(TR("id_calculalti_btn"));
202  _pAltiBtn->setToolTip(TR("id_calculalti_btn"));
203  _pCtrlLayout->addWidget(_pAltiBtn, 0);
204  _pCtrlLayout->addStretch(1);
205  _pAltiBtn->setFixedSize(24, 24);
206  _pAltiBtn->setEnabled(false);
207  connect(_pAltiBtn, &QToolButton::clicked, this, &TYSiteModelerFrame::calculAltimetrie);
208 
209  // Vue de dessus
211 
213 }
214 
216 {
217  _nbInstance--;
218 
219  if (_pSite)
220  {
221  _pSite->drawGraphic(false);
222  }
223 
224  delete _pEchelleEditor;
225  delete _pPointRefEditor;
226  delete _pOrientationEditor;
227  delete _pEmpriseEditor;
228  delete _pCourbeNiveauEditor;
229  delete _pPlanEauEditor;
230  delete _pTerrainEditor;
231 #if WITH_NMPB
232  delete _pRouteEditor;
233 #endif
235  delete _pEtageEditor;
236  delete _pSilosEditor;
237  delete _pCoursEauEditor;
238  delete _pSourceEditor;
239  delete _pPointCalculEditor;
241  delete _pLinearMaillageEditor;
244 }
245 
247 {
248  return TYModelerFrame::close();
249 }
250 
252 {
253  // If window title is empty, then create it
254  QString windowTitle = this->windowTitle();
255  if (windowTitle.isEmpty())
256  {
257  QString caption(TR("id_caption") + " " + QString("%1").arg(_nbInstance));
258  setWindowTitle(caption);
259  }
260 
261  // Hide previous site, unless it's the same (fix issue #148)
262  if ((_pSite) && (_pSite != pSite))
263  {
264  _pSite->drawGraphic(false);
265  }
266 
267  if (pSite)
268  {
269  _pSite = pSite;
270  _pElement = pSite;
271 
273 
274  if (_pProjet)
275  {
277  }
278 
279  if (!_pElement->getName().isEmpty())
280  {
281  windowTitle += QString(" : %1").arg(_pElement->getName());
282  }
283 
284  // On affiche le site dans ce renderer
285  _pElement->drawGraphic();
286  }
287 
290 
291  updateView();
292 }
293 
295 {
296  if (_pProjet)
297  {
298  _pProjet->drawGraphic(false);
299  }
300 
301  if (pProjet)
302  {
303  _pProjet = pProjet;
304  }
305 
306  setSite(pProjet->getSite());
307 }
308 
310 {
312 }
313 
314 void TYSiteModelerFrame::setRenderMode(int mode, bool bUpdateGL)
315 {
316  TYModelerFrame::setRenderMode(mode, bUpdateGL);
317 }
318 
320 {
321  int mode = _pRenderMaillageModeBox->currentIndex();
322  if ((mode < 0) || (mode >= NbOfRenderMaillageMode))
323  {
324  return;
325  } // sanity check
326 
327  bool updateNeeded = false;
328 
329  // Les maillages ont leur propre type d'interpolation
330  if (getProjet() && getProjet()->getCurrentCalcul())
331  {
332  // Pour chaque maillage
333  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); i++)
334  {
335  // Recuperation de l'objet graphique du maillage
336  TYMaillage* pMaillage = getProjet()->getMaillage(i);
337  LPTYElementGraphic pMGraphic = pMaillage->getGraphicObject();
338 
339  if (TYRectangularMaillageGraphic* pRectGraphic =
340  dynamic_cast<TYRectangularMaillageGraphic*>(pMGraphic.getRealPointer()))
341  {
342  switch (mode)
343  {
344  case Surface:
345  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_SURF);
346  break;
347  case Lines:
348  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_LINES);
349  break;
350  case Mixed:
351  pRectGraphic->setRendering(TYRectangularMaillageGraphic::RENDER_MIXED);
352  break;
353  }
354 
355  pMaillage->updateGraphic();
356  updateNeeded = true;
357  }
358  else if (TYBoundaryNoiseMapGraphic* pBoundGraphic =
359  dynamic_cast<TYBoundaryNoiseMapGraphic*>(pMGraphic.getRealPointer()))
360  {
361  switch (mode)
362  {
363  case Surface:
364  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_SURF);
365  break;
366  case Lines:
367  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_LINES);
368  break;
369  case Mixed:
370  pBoundGraphic->setRendering(TYBoundaryNoiseMapGraphic::RENDER_MIXED);
371  break;
372  }
373 
374  pMaillage->updateGraphic();
375  updateNeeded = true;
376  }
377  }
378 
379  if (updateNeeded)
380  {
382  updateView();
383  }
384  }
385 }
386 
388 {
389  if (!_editorModeAccepted)
390  {
391  getPickEditor()->usePopup(true);
392  getPickEditor()->useHighlight(false);
393 
394  if (_pCurrentEditor)
395  {
398  }
399 
400  _editorModeAccepted = true;
401 
402  switch (mode)
403  {
404  case EchelleMode:
406  break;
407  case PointRefMode:
409  break;
410  case OrientationMode:
412  break;
413  case EmpriseMode:
415  break;
416  case CourbeNiveauMode:
418  break;
419  case TerrainMode:
421  break;
422  case PlanEauMode:
424  break;
425  case CoursEauMode:
427  break;
428  case SrcPonctMode:
430  break;
431  case RecepteurMode:
433  break;
434 #if WITH_NMPB
435  case RouteMode:
436  _pCurrentEditor = _pRouteEditor;
437  break;
438 #endif
439  case ReseauTransportMode:
441  break;
442  case EtageMode:
444  break;
445  case SilosMode:
447  break;
448  case MaillageRectMode:
450  break;
451  case MaillageLinearMode:
453  break;
456  break;
459  break;
460  case PointsCtrlMode:
462  break;
463  default:
464  _editorModeAccepted = false;
465  }
466  }
467 
469 }
470 
471 void TYSiteModelerFrame::updateView(bool clipping /*=true*/, bool axesAndGrid /*=true*/)
472 {
473  // Appel de la methode parent
475  TYModelerFrame::updateView(clipping, axesAndGrid);
476 }
477 
479 {
480  if (_showCrbNiv == show)
481  {
482  return;
483  }
484 
485  _showCrbNiv = show;
486 
489  updateView();
490 
491  _pShowCrbNivBtn->setChecked(_showCrbNiv);
492 }
493 
495 {
496  if (_showAltimetrie == show)
497  {
498  return;
499  }
500 
501  _showAltimetrie = show;
502 
505  updateView();
506 
508 }
509 
511 {
512  _showImageSite = show;
513 
516  updateView();
517 
518  _pShowImageSiteBtn->setChecked(_showImageSite);
519 }
520 
522 {
523  if (!_pSite)
524  {
525  return;
526  }
527 
528  TYTabCourbeNiveauGeoNode* pTabCrbNivGeoNode = NULL;
529  TYTabTerrainGeoNode* pTabTerrainGeoNode = NULL;
530  TYTabPlanEauGeoNode* pTabPlanEauGeoNode = NULL;
531 
532  // Collecte les site nodes de facon recursive
533  TYTabSiteNodeGeoNode sites;
534 
535  // On collecte l'ensemble des sites
536  sites = _pSite->collectSites();
537 
538  // Pour chaque site
539  for (unsigned int i = 0; i < sites.size(); i++)
540  {
541  // Collecte des courbes
542  pTabCrbNivGeoNode =
543  &(TYSiteNode::safeDownCast(sites[i]->getElement())->getTopographie()->getListCrbNiv());
544 
545  // On recupere tous les actors constituant les courbes de niveau
546  for (unsigned int j = 0; j < pTabCrbNivGeoNode->size(); j++)
547  {
548  pTabCrbNivGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(_showCrbNiv);
549  }
550 
551  // Collecte des terrains et des plans d'eau
552  pTabTerrainGeoNode =
553  &(TYSiteNode::safeDownCast(sites[i]->getElement())->getTopographie()->getListTerrain());
554  for (unsigned int j = 0; j < pTabTerrainGeoNode->size(); j++)
555  {
556  pTabTerrainGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(_showCrbNiv);
557  }
558 
559  pTabPlanEauGeoNode =
560  &(TYSiteNode::safeDownCast(sites[i]->getElement())->getTopographie()->getListPlanEau());
561  for (unsigned int j = 0; j < pTabPlanEauGeoNode->size(); j++)
562  {
563  pTabPlanEauGeoNode->at(j)->getElement()->getGraphicObject()->setVisible(_showCrbNiv);
564  }
565  sites[i]->getElement()->getGraphicObject()->setVisible(_showImageSite);
566  }
567 
568  // Pour l'altimetrie (seul le site root a une alti)
569  _pSite->getAltimetry()->getGraphicObject()->setVisible(_showAltimetrie);
570 
571  // Mise a jour de la transparence de l'altimetrie
573 }
574 
576 {
577  // Called when _pAltiBtn button is pressed
578  if (!_pSite)
579  {
580  return;
581  }
582 
583  TYApplication::setOverrideCursor(Qt::WaitCursor);
584 
585  writeOutputMsg(TR("id_msg_calculalti"));
586 
587  // Retrieve the root SiteNode to compute altimetry
588  LPTYSiteNode rootSite = _pSite->getProjet()->getSite();
589  // One global altimetry update for all the sites
590  rootSite->updateAltimetrie();
591  // Check altimetry update went well before using it
592  if (rootSite->getAltimetry()->containsData())
593  {
594  // This method uses the altimetry above-computed to update the infrastructure
595  // as well as the receptors and sources and recurses on the current site and
596  // all its subsites
597  rootSite->update();
598 
599  if (_pProjet)
600  {
601  writeOutputMsg(TR("id_msg_updatealtimaillages"));
603  }
604  }
605 
606  _pSite->updateGraphicTree();
608  updateView();
609 
610  TYApplication::restoreOverrideCursor();
611 }
612 
614 {
615  if (!_pSite)
616  {
617  return;
618  }
619 }
620 
621 bool TYSiteModelerFrame::computeCurPos(int x, int y, float* ret)
622 {
623  int view = getCurrentView();
624  if ((view != PerspView) && (view != FreeView))
625  {
626  NxVec3 pos = OGLCamera::displayToWorld(NxVec3(x, _pView->height() - y, 0));
627  ret[0] = pos.x;
628  ret[1] = pos.y;
629  ret[2] = pos.z;
630 
631  switch (getCurrentView())
632  {
633  case TopView:
634  ret[1] = 0.0;
635  break;
636  case LeftView:
637  ret[0] = 0.0;
638  break;
639  case FrontView:
640  ret[2] = 0.0;
641  break;
642  }
643 
644  return true;
645  }
646 
647  return false;
648 }
649 
651 {
652  // Grille
653  _gridDimX = 4000.0f;
654  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridDimXSite"))
655  {
656  _gridDimX = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridDimXSite");
657  }
658  else
659  {
660  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridDimXSite", _gridDimX);
661  }
662 
663  _gridDimY = 4000.0f;
664  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridDimYSite"))
665  {
666  _gridDimY = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridDimYSite");
667  }
668  else
669  {
670  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridDimYSite", _gridDimY);
671  }
672 
673  _gridStep = 500.0f;
674  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridStepSite"))
675  {
676  _gridStep = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridStepSite");
677  }
678  else
679  {
680  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridStepSite", _gridStep);
681  }
682 
683  _gridMagnStep = 5.0f;
684  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "GridMagnStepSite"))
685  {
686  _gridMagnStep = TYPreferenceManager::getFloat(TYDIRPREFERENCEMANAGER, "GridMagnStepSite");
687  }
688  else
689  {
690  TYPreferenceManager::setFloat(TYDIRPREFERENCEMANAGER, "GridMagnStepSite", _gridMagnStep);
691  }
692 
700 #if WITH_NMPB
701  _pRouteEditor->setGridMagnStep(_gridMagnStep);
702 #endif
713  resizeGrid();
716  (_curViewType == LeftView));
717 
719 }
720 
722 {
723  _pSelectMaillageBox->clear();
724 
725  // Compteur
726  unsigned int counter = 0;
727 
728  // Pas d'element clicke
729  bool isNull = true;
730 
731  // Premier element vide
732  _pSelectMaillageBox->insertItem(counter++, TR("id_none_select_maillage"));
733 
734  // Les maillages ont leur propre type d'interpolation
735  if (getProjet() && getProjet()->getCurrentCalcul())
736  {
737  // Pour chaque maillage
738  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); ++i)
739  {
740  // Recuperation du maillage
741  TYMaillage* pMaillage = getProjet()->getMaillage(i);
742 
743  // Si il est actif, on le fait apparaitre dans la liste
744  if (pMaillage->etat() == true)
745  {
746  _pSelectMaillageBox->insertItem(counter++, pMaillage->getName());
747  }
748 
749  // Si l'element est picke, on le selectionne dans la liste
750  if (pMaillage->getGraphicObject()->getHighlightState())
751  {
752  _pSelectMaillageBox->setCurrentIndex(counter - 1);
753  isNull = false;
754  }
755  }
756 
757  if (isNull)
758  {
759  setSelectMaillageBox(TR("id_none_select_maillage"));
760  }
761  }
762 }
763 
765 {
766  bool isNull = false;
767  if (name == TR("id_none_select_maillage"))
768  {
769  isNull = true;
770  }
771 
772  if (getProjet() && getProjet()->getCurrentCalcul())
773  {
774  // Pour chaque maillage
775  for (unsigned int i = 0; i < getProjet()->getMaillages().size(); i++)
776  {
777  // Recuperation de l'objet graphique du maillage
778  TYMaillage* pMaillage = getProjet()->getMaillage(i);
779 
780  if (isNull)
781  {
782  if (pMaillage->etat() == true)
783  {
784  pMaillage->getGraphicObject()->setVisible(true);
785  if (pMaillage->getGraphicObject()->getHighlightState())
786  {
787  getPickEditor()->getPicker()->reset();
788  pMaillage->getGraphicObject()->highlight(false);
790  }
791  }
792  }
793  else if (pMaillage->getName() == name)
794  {
795  pMaillage->getGraphicObject()->setVisible(true);
796  getPickEditor()->getPicker()->highlightElement(pMaillage);
798  }
799  else
800  {
801  if (pMaillage->etat() == true)
802  {
803  pMaillage->getGraphicObject()->setVisible(false);
805  }
806  }
807  }
808  }
809 }
810 
812 {
813  return _pRenderMaillageModeBox->currentIndex();
814 }
gestion de l'interaction entre la vue graphique (2D ou 3D) et le clavier et la souris (fichier header...
void writeOutputMsg(QString msg)
Affiche un message dans la fenetre de sortie.
pour l'application Tympan (fichier header)
Creation of a TYBoundaryNoiseMap (header file)
Graphical representation of the BoundaryNoiseMap entity (header file)
Construit une courbe de niveau a partir des points saisis (fichier header)
std::vector< LPTYCourbeNiveauGeoNode > TYTabCourbeNiveauGeoNode
Collection de noeuds geometriques de type TYCourbeNiveau.
Construit un CoursEau a partir des points saisis (fichier header)
gestion de l'edition de l'echelle (fichier header)
#define TYDIRPREFERENCEMANAGER
Definition: TYElement.h:52
Construit l'emprise a partir des points saisis (fichier header)
Construit un etage a partir des points saisis (fichier header)
Indique si cet editor est actif (fichier header)
edition de l'orientation (fichier header)
gestion de l'element actionne par picking (fichier header)
Construit un plan d'eau a partir des points saisis (fichier header)
std::vector< LPTYPlanEauGeoNode > TYTabPlanEauGeoNode
Collection de noeuds geometriques de type TYPlanEau.
Definition: TYPlanEau.h:202
gestion de l'edition d'un point de calcul (fichier header)
gestion de l'edition des points de reference pour le placement des images de fond (fichier header)
gestion de l'edition d'un maillage rectangulaire (fichier header)
Representation graphique d'un maillage rectangulaire (fichier header)
Construit un reseau de transport a partir des points saisis (fichier header)
Construit une route a partir des points saisis (fichier header)
const char * name
gestion de l'edition d'un silo (fichier header)
#define IMG(id)
#define TR(id)
Classe Modeler specialisee pour l'edition des sites (fichier header)
std::vector< LPTYSiteNodeGeoNode > TYTabSiteNodeGeoNode
Collection de noeuds geometriques de type TYSiteNode.
Definition: TYSiteNode.h:40
gestion de l'edition d'une source (fichier header)
Construit un sol a partir des points saisis (fichier header)
std::vector< LPTYTerrainGeoNode > TYTabTerrainGeoNode
Collection de noeuds geometriques de type TYTerrain.
Definition: TYTerrain.h:181
gestion de l'edition d'un maillage verticale (fichier header)
Definition: NxVec3.h:23
NxReal z
Definition: NxVec3.h:80
NxReal y
Definition: NxVec3.h:80
NxReal x
Definition: NxVec3.h:80
static NxVec3 displayToWorld(NxVec3 display)
Definition: OGLCamera.cpp:699
static OPrototype * safeDownCast(OPrototype *pObject)
Definition: TYElement.cpp:71
T * getRealPointer()
Definition: smartptr.h:291
virtual void close()
Appeler apres l'utilisation de l'editor.
virtual void disconnect()
Deconnecte cet editor a l'interactor associe.
void setGridMagnStep(float gridMagnStep=1.0)
Met Ã&#160; jour le pas de la grille magnétique.
bool containsData()
Definition: TYAltimetrie.h:237
Creation of a TYBoundaryNoiseMap.
Rendering class for the BoundaryNoiseMap entity.
Construit une courbe de niveau a partir des points saisis.
Construit un CoursEau a partir des points saisis.
gestion de l'edition de l'echelle
void reset()
Retourne dans son etat initial.
void highlightElement(TYElement *pElt)
Dessine la boite englobante de l'element passe.
TYElement * getParent() const
Definition: TYElement.h:699
virtual QString getName() const
Definition: TYElement.h:684
Construit l'emprise a partir des points saisis.
Construit un etage a partir des points saisis.
Definition: TYEtageEditor.h:51
Indique si cet editor est actif.
Classe de definition d'un maillage.
Definition: TYMaillage.h:51
virtual bool etat()
Definition: TYMaillage.cpp:647
Classe generique pour une fenetre de modeleur.
int _curViewType
Le type de la vue courante.
LPTYElement getElement()
bool _editorModeAccepted
Indique si le mode d'edition a ete traite.
LPTYElement _pElement
Un pointeur sur l'element a editer.
TYRenderWindowInteractor * getView()
TYAbstractSceneEditor * _pCurrentEditor
L'editor courant.
void setGridLinesActorsVisibility(bool showGridXY, bool showGridXZ, bool showGridZY)
virtual void setRenderMode(int mode, bool bUpdateGL)
QBoxLayout * _pCtrlLayout
Le layout ou se trouvent les boutons, etc.
virtual void setViewType(int view)
TYRenderWindowInteractor * _pView
La fenetre graphique.
virtual bool close()
float _gridDimX
Dimension de la grille en X.
float _gridDimY
Dimension de la grille en Y.
float _gridStep
Pas de la grille.
virtual void updatePreferences()
float _gridMagnStep
Pas de la grille magnetique.
TYPickEditor * getPickEditor()
virtual void setEditorMode(int mode)
virtual void updateView(bool clipping=true, bool axesAndGrid=true)
void updateDisplayList(void)
void setElement(LPTYElement pElt)
edition de l'orientation
void usePopup(bool state)
Definition: TYPickEditor.h:104
TYElementPicker * getPicker()
Methode qui retourne le picker.
Definition: TYPickEditor.h:51
void useHighlight(bool state)
Definition: TYPickEditor.h:97
Construit un plan d'eau a partir des points saisis.
gestion de l'edition d'un point de calcul
gestion de l'edition des points de reference pour le placement des images de fond
classe de definition d'un projet.
Definition: TYProjet.h:45
TYTabMaillageGeoNode & getMaillages()
Get de la collection de maillages.
Definition: TYProjet.h:261
bool updateAltiRecepteurs()
Definition: TYProjet.cpp:599
LPTYSiteNode getSite()
Get du site.
Definition: TYProjet.h:169
LPTYMaillage getMaillage(int index)
Retourne un maillage a partir de son index.
Definition: TYProjet.h:318
gestion de l'edition d'un maillage rectangulaire
classe graphique pour un maillage rectangulaire
TYOpenGLRenderer * getRenderer()
Construit un reseau de transport a partir des points saisis.
Construit une route a partir des points saisis.
Definition: TYRouteEditor.h:35
gestion de l'edition d'un silo
Definition: TYSilosEditor.h:36
TYPointRefEditor * _pPointRefEditor
static int _nbInstance
Nombre d'instance de type TYSiteModelerFrame.
TYPlanEauEditor * _pPlanEauEditor
virtual bool computeCurPos(int x, int y, float *pos)
TYBoundaryNoiseMapEditor * _pBoundaryNoiseMapEditor
TYVerticalMaillageEditor * _pVerticalMaillageEditor
TYCourbeNiveauEditor * _pCourbeNiveauEditor
QComboBox * _pRenderMaillageModeBox
Combo box pour le mode de rendu.
QToolButton * _pShowImageSiteBtn
Bouton pour l'affichage de l'image de site.
virtual void updatePreferences()
TYSilosEditor * _pSilosEditor
virtual void setEditorMode(int mode)
bool _showAltimetrie
Indique si on affiche ou masque l'altimetrie.
virtual void setSelectMaillageBox(const QString &name)
void setProjet(LPTYProjet pProjet)
LPTYProjet _pProjet
Un pointeur sur le projet a editer.
TYEchelleEditor * _pEchelleEditor
QToolButton * _pShowAltimetrieBtn
Bouton pour l'affichage de l'altimetrie.
TYPointCalculEditor * _pPointCalculEditor
virtual void setRenderMode(int mode, bool bUpdateGL)
TYEtageEditor * _pEtageEditor
TYOrientationEditor * _pOrientationEditor
TYEmpriseEditor * _pEmpriseEditor
virtual void setViewType(int view)
TYCoursEauEditor * _pCoursEauEditor
LPTYSiteNode _pSite
Un pointeur sur le site a editer.
bool _showImageSite
Indique si on affiche ou masque l'image de site.
bool _showCrbNiv
Indique si on affiche ou masque les courbes de niveau.
QToolButton * _pShowCrbNivBtn
Bouton pour l'affichage des courbes de niveau.
TYSiteModelerFrame(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=Qt::WindowFlags(0))
TYRectangularMaillageEditor * _pRectangularMaillageEditor
void updateAltiOpacity(int view=-1)
void showAltimetrie(bool show)
void showImageSite(bool show)
void setSite(LPTYSiteNode pSite)
TYReseauTransportEditor * _pReseauTransportEditor
QComboBox * _pSelectMaillageBox
Combo box pour le choix du maillage.
TYTerrainEditor * _pTerrainEditor
TYLinearMaillageEditor * _pLinearMaillageEditor
void showCrbNiv(bool show)
TYSourceEditor * _pSourceEditor
virtual void setRenderMaillageModeSlot()
virtual void updateView(bool clipping=true, bool axesAndGrid=true)
TYTabSiteNodeGeoNode collectSites(bool include=true) const
LPTYAltimetrie getAltimetry() const
TYProjet * getProjet()
Accesseurs.
Definition: TYSiteNode.h:106
void update(const bool &force=false)
virtual bool updateAltimetrie()
Definition: TYSiteNode.cpp:567
gestion de l'edition d'une source
Gestion de l'edition d'un maillage verticale.