00001 /* 00002 * Moka : Un modeleur de 3-G-cartes. 00003 * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC 00004 * http://www.sic.sp2mi.univ-poitiers.fr/ 00005 * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS, 00006 * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/ 00007 * 00008 * This file is part of Moka 00009 * 00010 * This program is free software: you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation, either version 3 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 00024 #ifndef WINDOW_QT_HH 00025 #define WINDOW_QT_HH 00026 00027 //------------- Include controler ---------------- 00028 #include "controler-gmap.hh" 00029 #include "controler.hh" 00030 using namespace GMap3d ; 00031 00032 // Bidouille car ce salete de moc de Qt ne prend pas en compte 00033 // les directives de precompilations 00034 #ifndef MODULE_SPAMOD 00035 namespace GMap3d 00036 { 00037 typedef int TSpamodViewMode; 00038 } 00039 #endif 00040 //------ Include autres classes developees ------- 00041 00042 #include "creation-brin.qt.hh" 00043 #include "creation-polygone.qt.hh" 00044 #include "creation-maillage.qt.hh" 00045 #include "creation-sphere.qt.hh" 00046 #include "creation-cylindre.qt.hh" 00047 #include "creation-pyramide.qt.hh" 00048 #include "creation-tore.qt.hh" 00049 00050 #include "operation-chanfreinage.qt.hh" 00051 00052 #include "dialog-do.qt.hh" 00053 #include "dialog-homothetie.qt.hh" 00054 #include "dialog-translation.qt.hh" 00055 #include "dialog-rotation.qt.hh" 00056 00057 #include "gl-window.qt.hh" 00058 #include "select-bar.qt.hh" 00059 #include "options-frame.qt.hh" 00060 #include "menu-bar.qt.hh" 00061 #include "options-carac.qt.hh" 00062 #include "options-couleurs.qt.hh" 00063 00064 #ifdef MODULE_ARCHITECTURE 00065 #include "toolbar-archi.qt.hh" 00066 #include "window-raytracing.qt.hh" 00067 #include "flap-ameublement.qt.hh" 00068 class DialogAmeublement; 00069 class ToolbarArchi; 00070 class WindowRayTracing; 00071 class FlapSelection; 00072 #endif 00073 00074 //----------------- Include std ------------------ 00075 using namespace std ; 00076 #include <iostream> 00077 #include <cstdlib> 00078 00079 //------------------ Include QT ------------------- 00080 #include <QtCore/QDir> 00081 #include <QtGui/QKeyEvent> 00082 class QFileDialog; 00083 00084 #define SPACE_PIX_SIZE 15 00085 00086 class Window : public QMainWindow 00087 { 00088 Q_OBJECT 00089 00090 public: 00091 00095 Window ( ) ; 00096 00100 virtual ~Window ( ) ; 00101 00106 virtual GMap3d :: CControlerGMap * getControler ( ) const ; 00107 00111 virtual void repaint ( ) ; 00112 00116 virtual void closeEvent ( QCloseEvent * event ); 00117 00122 virtual CreationObjet * getCreationActive ( ) const ; 00123 00128 virtual dialogOperations * getOperationActive ( ) const ; 00129 00134 virtual OptionCouleurs * getCouleurActive ( ) const; 00135 00140 virtual OptionsCarac * getOptionsCaracActive ( ) const ; 00141 00146 virtual TViewId getCurrentViewId ( ) const ; 00147 00152 virtual void setDoubleCliquee ( GLWindow * vue ) ; 00153 00157 virtual void updateStatusBar ( ) ; 00158 00165 std::string getOpenFileName ( const QString & caption = QString(), 00166 const QStringList & filters = 00167 QStringList("Tous les fichiers (*)"), 00168 int * ind_filter = NULL ); 00169 00176 std::string getSaveFileName ( const QString & caption = QString(), 00177 const QStringList & filters = 00178 QStringList("Tous les fichiers (*)"), 00179 int * ind_filter = NULL); 00180 00181 const QColor LINK_COLOR; 00182 00183 private : 00184 00185 void resetActiveOperations(); 00186 00187 public slots: 00188 00192 void windowActivated( QWidget * w ); 00193 00194 void callbackKeyUp(); 00195 void callbackKeyDown(); 00196 void callbackKeyLeft(); 00197 void callbackKeyRight(); 00198 00199 void callbackKeyCtrlUp(); 00200 void callbackKeyCtrlDown(); 00201 void callbackKeyCtrlLeft(); 00202 void callbackKeyCtrlRight(); 00203 00204 void callbackKeyShiftUp(); 00205 void callbackKeyShiftDown(); 00206 void callbackKeyShiftLeft(); 00207 void callbackKeyShiftRight(); 00208 00209 void callbackVueCompacte(); 00210 void callbackVueSemiEclatee(); 00211 void callbackVueMoka(); 00212 void callbackVueTopoFil(); 00213 00214 // Slots Menu Fichier 00215 //******************* 00216 void callbackLoad ( ) ; 00217 void callbackAdd ( ) ; 00218 void callbackSave ( ) ; 00219 void callbackImport ( ) ; 00220 void callbackExport ( ) ; 00221 void callbackQuit ( ) ; 00222 00223 void callbackFindMotif(); 00224 void callbackCountMotifs(); 00225 00226 void callbackNettoyage (); 00227 00228 void filterSelected ( const QString & selected ); 00229 00230 // Slots Menu Edition 00231 //******************* 00232 void callbackUndo ( ) ; 00233 void callbackRedo ( ) ; 00234 void callbackEmptyUndoRedo ( ) ; 00235 void callbackConfigUndoRedo ( ) ; 00236 00237 // Slots Menu Options 00238 //******************* 00239 00240 void help ( ) ; 00241 // void grid ( ) ; 00242 void view ( ) ; 00243 void plating ( ) ; 00244 void pondDef ( ) ; 00245 void extrusion ( ) ; 00246 void interpol ( ) ; 00247 void affich ( ) ; 00248 00249 void caracTopo ( ) ; 00250 void couleurs ( ) ; 00251 void affichDivers ( ); 00252 00253 void callbackToggleSews(); 00254 void callbackToggleNormal(); 00255 void callbackToggleVertices(); 00256 void callbackToggleFaces(); 00257 void callbackTournerButton(); 00258 void callbackToggleGrille(); 00259 00260 // A deplacer dans Operation 00261 void chanf ( ) ; 00262 00263 // Slots Menu Creer 00264 //***************** 00265 void callbackPolyline ( ) ; 00266 void callbackPolygon ( ) ; 00267 void callbackMeshCreation ( ) ; 00268 void callbackSphere ( ) ; 00269 void callbackCylinder ( ) ; 00270 void callbackPyramide ( ) ; 00271 void callbackTorus ( ) ; 00272 void callbackRandomizeDarts(); 00273 00274 // Slots Menu Operations 00275 //********************** 00276 // -- translation/rotation/homothetie 00277 void callbackTranslateWindow ( ) ; 00278 void callbackRotateWindow ( ) ; 00279 void callbackScaleWindow ( ) ; 00280 00281 // -- coudre 00282 void callbackIntuitiveTopoSew ( ) ; 00283 void callbackIntuitiveGeoSew ( ) ; 00284 00285 void callbackTopoSew0 ( ) ; 00286 00287 void callbackTopoSew1 ( ) ; 00288 void callbackGeoSew1 ( ) ; 00289 00290 void callbackTopoSew2 ( ) ; 00291 void callbackGeoSew2 ( ) ; 00292 00293 void callbackTopoSew3 ( ) ; 00294 void callbackGeoSew3 ( ) ; 00295 00296 void callbackTopoSew1borders ( ) ; 00297 void callbackGeoSew1borders ( ) ; 00298 00299 void callbackTopoSew2borders ( ) ; 00300 void callbackGeoSew2borders ( ) ; 00301 00302 void callbackInvertLastOperation ( ) ; 00303 void callbackInvertLastOperationGeometry ( ) ; 00304 00305 // -- decoudre 00306 void callbackIntuitiveUnsew ( ) ; 00307 void callbackUnsew0 ( ) ; 00308 void callbackUnsew1 ( ) ; 00309 void callbackUnsew2 ( ) ; 00310 void callbackUnsew3 ( ) ; 00311 00312 // -- placage 00313 void callbackIntuitivePlate ( ) ; 00314 void callbackPlate0 ( ) ; 00315 void callbackPlate1 ( ) ; 00316 void callbackPlate2 ( ) ; 00317 00318 void callbackPlate1borders ( ) ; 00319 void callbackPlate2borders ( ) ; 00320 00321 // -- Fusionner 00322 void callbackIntuitiveMerge ( ) ; 00323 void callbackMergeEdges ( ) ; 00324 void callbackMergeFaces ( ) ; 00325 void callbackMergeVolumes ( ) ; 00326 00327 void callbackMergeColinearEdges ( ) ; 00328 void callbackMergeCoplanarFaces ( ) ; 00329 00330 void callbackMergeFacesWithoutDisconnection ( ) ; 00331 void callbackRemoveMarkedFacesButKeepBalls ( ) ; 00332 void callbackShiftAllEdgesIncidentToVertex ( ) ; 00333 void callbackRemoveDanglingEdges(); 00334 00335 // -- Contracter 00336 void callbackIntuitiveContract ( ) ; 00337 00338 void callbackContractEdges ( ) ; 00339 void callbackContractFaces ( ) ; 00340 void callbackContractVolumes ( ) ; 00341 00342 void callbackDelNullEdges ( ) ; 00343 void callbackDelFlatFaces ( ) ; 00344 void callbackDelFlatVolumes ( ) ; 00345 00346 // -- Inserer 00347 void callbackInsertVertex ( ) ; 00348 void callbackInsertEdge ( ) ; 00349 void callbackInsertFace ( ) ; 00350 00351 // -- Fermer 00352 void callbackIntuitiveStopUp ( ) ; 00353 void callbackStopUp0 ( ) ; 00354 void callbackStopUp1 ( ) ; 00355 void callbackStopUp2 ( ) ; 00356 void callbackStopUp3 ( ) ; 00357 00358 // -- Trianguler 00359 void callbackContextTriangulate ( ) ; 00360 void callbackTriangulateEdges ( ) ; 00361 void callbackTriangulateFaces ( ) ; 00362 void callbackTriangulateVolumes ( ); 00363 void callbackSwapEdge ( ); 00364 void callbackTriangulateGeoFaces( ); 00365 00366 // -- Quadranguler 00367 void callbackQuadrangulateFaces ( ) ; 00368 void callbackBasicQuadrangulateFaces ( ) ; 00369 00370 // -- Calculer Dual 00371 void callbackDual2d ( ) ; 00372 void callbackDual3d ( ) ; 00373 00374 // -- Extruder 00375 // Selon normale 00376 void callbackIntuitiveExtrudeByNormal ( ) ; 00377 void callbackExtrude0ByNormal ( ) ; 00378 void callbackExtrude1ByNormal ( ) ; 00379 void callbackExtrude2ByNormal ( ) ; 00380 00381 // Selon chemin 00382 void callbackExtrude1ByPath ( ) ; 00383 void callbackExtrude2ByPath ( ) ; 00384 00385 // Selon axe 00386 void callbackExtrude1ByRevolution ( ) ; 00387 void callbackExtrude2ByRevolution ( ) ; 00388 00390 void callbackThicken ( ) ; 00391 00392 // -- Interpoler 00393 void callbackMeshEdge ( ) ; 00394 void callbackMeshSquare01 ( ) ; 00395 void callbackMeshSquare02 ( ) ; 00396 void callbackMeshSquare12 ( ) ; 00397 00398 void callbackMeshCube01 ( ) ; 00399 void callbackMeshCube02 ( ) ; 00400 void callbackMeshCube03 ( ) ; 00401 void callbackMeshCube12 ( ) ; 00402 void callbackMeshCube13 ( ) ; 00403 void callbackMeshCube23 ( ) ; 00404 00405 // -- Lisser 00406 void callbackSmooth1 ( ) ; 00407 void callbackSmooth2 ( ) ; 00408 void callbackSmooth3 ( ) ; 00409 00410 // -- Arrondir 00411 void callbackRoundVertices ( ) ; 00412 void callbackRoundVerticesDig ( ) ; 00413 void callbackRoundEdges2d ( ) ; 00414 void callbackRoundEdges2dDig (); 00415 void callbackRoundEdges3d ( ) ; 00416 void callbackRoundEdges3dDig ( ) ; 00417 void callbackRoundEdges2dWithSetback (); 00418 void callbackRoundEdges2dDigWithSetback (); 00419 void callbackRoundEdges3dWithSetback ( ) ; 00420 void callbackRoundEdges3dDigWithSetback ( ) ; 00421 00422 // -- Triangulation 00423 void callbackTriangulateTopoFaces (); 00424 void callbackMarkNonUniformFaces (); 00425 void callbackOptimizeSelectedEdges (); 00426 void callbackDelaunayTriangulation (); 00427 void callbackOptimizedDelaunayTriangulation (); 00428 //void callbackCreateBSplineSurface (); 00429 //void callbackgetSurfaceIntersection (); 00430 00431 // -- Co-raffiner 00432 void callbackCorefine2dSegmentsSweeping ( ) ; 00433 void callbackCorefine2dSegmentsPropagation ( ) ; 00434 void callbackBooleanOperations2d ( ) ; 00435 void callbackCorefine3dMeshes ( ) ; 00436 void callbackCorefine3dFaces ( ) ; 00437 void callbackCorefineMarked3dFaces ( ) ; 00438 void callbackCorefineMarked3dMeshesWith ( ) ; 00439 void callbackBooleanOperations3d ( ) ; 00440 //void callbackCorefineTest ( ) ; 00441 00442 // Slots Menu Geologie 00443 //******************** 00444 void callbackUncertainZone (); 00445 void callbackCreateNearestIntersections (); 00446 void callbackExtendSelectedBorders (); 00447 void callbackExtendSelectedBordersToSurface (); 00448 void callbackSmoothSelection (); 00449 void callbackRelaxSelection (); 00450 void callbackSimplifyMesh (); 00451 void callbackCenterSelection (); 00452 void callbackPlateVerticesOnFaces (); 00453 void callbackPlateVerticesOnEdges (); 00454 void callbackPlateVerticesOnVertices (); 00455 void callbackSelectMacroVertices (); 00456 void callbackSelectAllMacroEdges (); 00457 void callbackSelectMacroEdges (); 00458 void callbackSelectMacroFaces (); 00459 void callbackSelectBordersBetweenSelectedDarts (); 00460 void callbackImportGr2d (); 00461 void callbackImportGr2dOk (); //- 00462 void callbackImportXyz (); 00463 void callbackImportXyzOk (); //- 00464 void callbackImportTs (); 00465 void callbackImportTsOk (); //- 00466 void callbackImportCloud (); 00467 void callbackImportCloudOk (); //- 00468 00469 void callbackHolesRefinement (); 00470 void callbackTriangulateHoles (); 00471 void callbackFillHolesOnMeshes (); 00472 void callbackFailleDetection (); 00473 void callbackExtractDetectedFailles (); 00474 void callbackExtensionFailleSurface (); 00475 //void callbackGetIntersectionSurface (); 00476 //void callbackCollapseEdge (); 00477 //void callbackRemoveVertex (); 00478 void callbackMeshSimplification (); 00479 void callbackImportVrml (); 00480 void callbackExportTs (); 00481 00482 // Slots Menu Materialiser 00483 //************************ 00484 void callbackMaterializeBarycenter (); 00485 void callbackMaterializeAxe (); 00486 void callbackMaterializePlane (); 00487 void callbackMaterializeNormalVector (); 00488 void callbackMaterializeOrthoPlane (); 00489 void callbackMaterializeReferential (); 00490 00491 // Slots Menu Selection 00492 //********************* 00493 void callbackReinitSelection ( ) ; 00494 void callbackNegateSelection ( ) ; 00495 void callbackSwapSelections ( ) ; 00496 00497 // Copie / Destruction 00498 void callbackDuplicateSelection ( ) ; 00499 void callbackDeleteSelection ( ) ; 00500 00501 // Etendre d'1 pas 00502 void callbackGoForward1 ( ) ; 00503 void callbackGoBackward1 ( ) ; 00504 void callbackGoLeft1 ( ) ; 00505 void callbackGoRight1 ( ) ; 00506 00507 // Etendre Repetitivement 00508 void callbackGoForward1Rep ( ) ; 00509 void callbackGoBackward1Rep ( ) ; 00510 void callbackGoLeft1Rep ( ) ; 00511 void callbackGoRight1Rep ( ) ; 00512 00513 // Reduire d'1 pas 00514 void callbackGoForward0 ( ) ; 00515 void callbackGoBackward0 ( ) ; 00516 void callbackGoLeft0 ( ) ; 00517 void callbackGoRight0 ( ) ; 00518 00519 // Reduire repetitivement 00520 void callbackGoForward0Rep ( ) ; 00521 void callbackGoBackward0Rep ( ) ; 00522 void callbackGoLeft0Rep ( ) ; 00523 void callbackGoRight0Rep ( ) ; 00524 00525 // Marquages divers 00526 void callbackMarkInterior2 ( ) ; 00527 void callbackMarkInterior3 ( ) ; 00528 00529 void callbackIntuitiveSelectBorders ( ) ; 00530 void callbackSelect0borders ( ) ; 00531 void callbackSelect1borders ( ) ; 00532 void callbackSelect2borders ( ) ; 00533 void callbackSelect3borders ( ) ; 00534 void callbackSelectNonPlanarFaces ( ) ; 00535 void callbackSelectIncidents ( ) ; 00536 00537 // Avancer 00538 void callbackGoAlpha0 ( ) ; //Par Alpha0 00539 void callbackGoAlpha1 ( ) ; 00540 void callbackGoAlpha2 ( ) ; 00541 void callbackGoAlpha3 ( ) ; 00542 00543 /*************************************************************************/ 00544 #ifdef MODULE_ARCHITECTURE 00545 /* Slots menu Archi */ 00546 /********************/ 00547 //sauvegarde et chargement 00548 void callbackLoadArchi () ; 00549 void callbackSaveArchi () ; 00550 00551 void callbackAddNff (); 00552 void callbackImportNff3D (); 00553 00554 void callbackExportRenduSortie (); 00555 void callbackBuildStructADI (); 00556 void callbackSaveAmeublementRendu (); 00557 00558 void callbackEtage3D (); 00559 00560 //void callbackNettoyageOk (); 00561 00562 void callbackArchiTopo (); 00563 void callbackArchiTopoOk (); 00564 void callbackAreteFictive (); 00565 00566 //void callbackSelectionBrin (); 00567 void callbackSelectionPendante (); 00568 void callbackSelectionOrientation (); 00569 //void callbackSelectionBrinOk (); 00570 void callbackSelectionTest (); 00571 void callbackDeSelectionBrin (); 00572 void callbackDetecteFictive (); 00573 void callbackAffectFictive (); 00574 00575 // heuristique 00576 void callbackCalculPerimetre (); 00577 void callbackCalculSurface (); 00578 void callbackCalculPerimetreMur (); 00579 void callbackCalculSurfaceMur (); 00580 void callbackCalculPerimetrePiece (); 00581 void callbackCalculSurfacePiece (); 00582 void callbackCalculRapportPiece (); 00583 void callbackCalculRapportMur (); 00584 00585 // Gestion de l'ameublement auto 00586 void callbackSaveAmeublement (); 00587 void callbackLoadAmeublement (); 00588 void callbackAmeublement2D (); 00589 void callbackAmeublement3D (); 00590 void callbackAmeublementSel2D (); 00591 void callbackAmeublementSel3D (); 00592 void callbackAmeublementConvexe2D (); 00593 void callbackAmeublementConvexe3D (); 00594 void callbackAmeublementSemiAutomatiqueSel3D (); 00595 void callbackAmeublementAddMeuble (std::string meuble); 00596 void callbackAmeublementRemoveMeuble (std::string meuble); 00597 void callbackinitListMeubles (); 00598 00599 // heuristique 00600 void callbackConvexificationE1 (); 00601 void callbackConvexificationE2 (); 00602 void callbackConvexificationE3 (); 00603 void callbackConvexificationMur (); 00604 void callbackConvexificationPiece (); 00605 00606 void callbackTriangulation (); 00607 void callbackTriangulationRapide (); 00608 void callbackTriangulationMur (); 00609 void callbackTriangulationPiece (); 00610 00611 void callbackSelectionNonConvexe (); 00612 void callbackSelectionFaceSemFaux (); 00613 void callbackSelectionVolumeSemFaux (); 00614 void callbackIsConvexe (); 00615 void callbackSelectionIncoherenceVoisinage (); 00616 00617 void callbackIsTransparent (); 00618 void callbackSelectionTransparent (); 00619 void callbackAffectTranspSel (); 00620 void callbackAffectTransp2D (); 00621 void callbackAffectTransp3D (); 00622 00623 // semantique 3D VOLUME 00624 void callbackSelectionPorte (); 00625 void callbackSelectionMur (); 00626 void callbackSelectionCut (); 00627 void callbackSelectionPiece (); 00628 void callbackSelectionFenetre (); 00629 void callbackSelectionEscalier (); 00630 void callbackSelectionConfondu (); 00631 void callbackSelectionIntersection (); 00632 void callbackSelectionContour (); 00633 void callbackSelectionContourEscalier (); 00634 void callbackSelectionFictive (); 00635 void callbackSelectionSol (); 00636 void callbackSelectionPlafond (); 00637 void callbackSelectionAutre (); 00638 00639 // semantique 3D FACE 00640 void callbackSelectionBrique (); 00641 void callbackSelectionOuverture (); 00642 void callbackSelectionMoquette (); 00643 void callbackSelectionPlaque (); 00644 void callbackSelectionFacade (); 00645 void callbackSelectionTapisserie (); 00646 void callbackSelectionMarche (); 00647 void callbackSelectionIntMarche (); 00648 void callbackSelectionDoublons3D (); 00649 00650 // semantique 2D ARETE 00651 void callbackSelectionBrique2D (); 00652 void callbackSelectionOuverture2D (); 00653 //void callbackSelectionCrepi2D (); 00654 void callbackSelectionTapisserie2D (); 00655 void callbackSelectionFacade2D (); 00656 void callbackSelectionMarche2D (); 00657 void callbackSelectionIntMarche2D (); 00658 void callbackSelectionDoublons2D (); 00659 00660 // recherche automatique de semantique 2D 00661 // recherche 1 semantique 00662 void callbackFindFacade (); 00663 void callbackFindMur (); 00664 void callbackFindPiece (); 00665 void callbackFindPorte (); 00666 void callbackFindFenetre (); 00667 void callbackFindEscalier (); 00668 00669 // Deduction a partir des donnees connues 00670 void callbackFindSemPorteFenetre (); 00671 00672 void callbackEraseSem (); 00673 void callbackEraseSemSel (); 00674 00675 // gestion d'orientation 2D 00676 void callbackAfficheOrientation (); 00677 void callbackDefineOrientation (); 00678 void callbackReverseOrientation (); 00679 void callbackReverseOrientationCC (); 00680 void callbackTestOrientation (); 00681 00682 // semantique 2D ARETE 00683 void callbackDetectErrorSem2D (); 00684 void callbackDetectErrorSem3D (); 00685 void callbackSelectionAlpha1 (); 00686 void callbackSelectionAlpha2 (); 00687 void callbackSelectionAlpha3 (); 00688 00689 // gestion de la semantique 00690 void callbackAfficheSemantique (); 00691 void callbackAfficheSansSem (); 00692 void callbackAffectMur (); 00693 void callbackAffectPorte (); 00694 void callbackAffectFenetre (); 00695 void callbackAffectPiece (); 00696 void callbackAffectEscalier (); 00697 void callbackAffectContourEscalier (); 00698 void callbackAffectContour (); 00699 //void callbackAffectSol (); 00700 //void callbackAffectPlafond (); 00701 00702 void callbackExtrudeAll (); 00703 void callbackExtrudeSelect (); 00704 void callbackExtrudeMur (); 00705 void callbackExtrudePorte (); 00706 void callbackExtrudeFenetre (); 00707 void callbackExtrudeEscalierDroit (); 00708 void callbackExtrudeEscalierCollimacon (); 00709 void callbackExtrudeSol (); 00710 void callbackExtrudePlafond (); 00711 00712 void callbackFonctionTest (); 00713 00714 //operation 00715 void callbackOperationAffichage (); 00716 void callbackOperationCouture (); 00717 00718 void callbackOperationPorte (); 00719 void callbackOperationFenetre (); 00720 void callbackOperationMur (); 00721 void callbackEpaissirMur (); 00722 void callbackCreateMurEpais2D (); 00723 void callbackCreateMurEpais3D (); 00724 void callbackEpaissirPorte (); 00725 void callbackInsertPorte2D (); 00726 void callbackInsertPorte3D (); 00727 void callbackEpaissirFenetre (); 00728 void callbackInsertFenetre2D (); 00729 void callbackInsertFenetre3D (); 00730 00731 void callbackOperationSuppression (); 00732 void callbackOperationSuppressionSel2D (); 00733 void callbackOperationSuppressionSel3D (); 00734 void callbackOperationSuppressionCut2D (); 00735 void callbackOperationSuppressionCut3D (); 00736 void callbackOperationSuppressionDoublons2D (); 00737 void callbackOperationSuppressionDoublons3D (); 00738 void callbackOperationSuppressionTransp2D (); 00739 void callbackOperationSuppressionTransp3D (); 00740 00741 //operations d'edition 00742 void callbackSuppressionFaceMur2D (); 00743 void callbackSuppressionFaceOuvertureMur2D (); 00744 void callbackSuppressionFaceOuverturePiece2D (); 00745 void callbackSuppressionVolumeMur3D (); 00746 void callbackDialogTranslationMur (); 00747 void callbackTranslation2D (float percent); 00748 void callbackTranslation3D (float percent); 00749 void callbackTranslation2D_1 (); 00750 void callbackTranslation2D_2 (); 00751 void callbackTranslation3D_1 (); 00752 void callbackTranslation3D_2 (); 00753 void callbackConstructionToit (); 00754 void callbackConstructionToitBiso (); 00755 void callbackConstructionToitArrondi (); 00756 void callbackBisoToit (); 00757 void callbackArrondirToit (); 00758 void callbackArrondi3D (); 00759 00760 //operations de simplification 00761 void callbackSuppressionDoublons(); 00762 void callbackSuppressionSommetDeg2(); 00763 void callbackSuppressionAreteDeg2(); 00764 void callbackSuppressionFaceDeg2(); 00765 void callbackSimplification(); 00766 00767 // RENDU ARCHI 00768 void callbackPositionCamera (); 00769 void callbackCheminOrigine (); 00770 void callbackRayTracingDI (); 00771 void calculPosCamera(CVertex *&V_mire, CVertex *&V_camera); 00772 #endif //MODULE_ARCHITECTURE 00773 00774 // Slots Menu Vues 00775 //**************** 00776 void tile ( ) ; 00777 void cascade ( ) ; 00778 00779 void addView3D ( ) ; 00780 void addViewXY ( ) ; 00781 void addViewYZ ( ) ; 00782 void addViewZX ( ) ; 00783 void addViewMulti ( ) ; 00784 00785 void basculeView3D ( ) ; 00786 void basculeViewXY ( ) ; 00787 void basculeViewYZ ( ) ; 00788 void basculeViewZX ( ) ; 00789 void basculeViewMulti ( ) ; 00790 00791 void deleteView ( ) ; 00792 00793 void mireOrigine ( ) ; 00794 void mireFace ( ) ; 00795 void mireSommet ( ) ; 00796 void mireVolume ( ) ; 00797 void mireCompConnexe ( ) ; 00798 void mireBrinsMarques ( ) ; 00799 void mireBrins ( ) ; 00800 00801 void callbackBackToBurstView (); 00802 void callbackTopologicalView (); 00803 void callbackEuclidianView (); 00804 void callbackAnalyticView (); 00805 void callbackVoxelView (); 00806 void callbackK2View (); 00807 00808 bool callbackSpamodViews(GMap3d::TSpamodViewMode); 00809 00810 void callbackSpamodSwitchToNextView (); 00811 00812 void OperationUngroupAllGeneral ( ) ; 00813 void OperationUngroupAllPrecompiles ( ) ; 00814 void OperationUngroupAllEyePos ( ) ; 00815 void OperationUngroupAllAimedPos ( ) ; 00816 void OperationUngroupAllDrawing ( ) ; 00817 void OperationUngroupGeneral ( ) ; 00818 void OperationUngroupPrecompiles ( ) ; 00819 void OperationUngroupEyePos ( ) ; 00820 void OperationUngroupAimedPos ( ) ; 00821 void OperationUngroupDrawing ( ) ; 00822 00823 void OperationGroupAllGeneral ( ) ; 00824 void OperationGroupAllPrecomp ( ) ; 00825 void OperationGroupAllEyePos ( ) ; 00826 void OperationGroupAllAimedPos ( ) ; 00827 void OperationGroupAllDrawing ( ) ; 00828 void OperationGroupGeneral ( ) ; 00829 void OperationGroupPrecomp ( ) ; 00830 void OperationGroupEyePos ( ) ; 00831 void OperationGroupAimedPos ( ) ; 00832 void OperationGroupDrawing ( ) ; 00833 00834 // Cache toutes les fenetres ouvertes 00835 void callbackHideAllWindow ( ) ; 00836 00837 // Methode qui bascule l'affichage vers une vue de typa souhaite 00838 void bascule ( TView type ) ; 00839 00840 // Methode qui construit les boites a outils 00841 void creationBoitesOutils ( ) ; 00842 00843 // Methodes utilises pour interpoler 00844 void callbackMeshSquare (int i , int j) ; 00845 void callbackMeshCube (int i , int j) ; 00846 00847 // Methodes utilisees pour Arrondir 00848 void roundVertices(bool ADig); 00849 void roundEdges ( bool A3D, bool ADig, bool ASetback); 00850 00851 #ifdef MODULE_ARCHITECTURE 00852 // Center le point de mire sur des brins selectionnes. 00853 void callbackFocusNextSelection(); 00854 void callbackFocusPreviousSelection(); 00855 00856 void callbackSetMode3D(bool enable); 00857 void callbackSetModeToolbar(int mode); 00858 00859 //Affichage etages 00860 void callbackAffichageEtage(); 00861 void callbackAffichageTousEtage(); 00862 void callbackSwitchAffichageFacade(); 00863 void callbackAffichageDernierEtage(); 00864 00865 void callbackExtrudeandMerge2DPlan(); 00866 void callbackAjoutPlan2D(); 00867 00868 void callbackSwitchModeArchi(); 00869 void callbackSwitchModeToolbarArchi(); 00870 void callbackOperationSuppressionArchiIHM(); 00871 void callbackOperationSuppressionArchiForcee(); 00872 00873 void callbackAfficherDialogAmeublement(); 00874 #endif 00875 00876 /***************************************************************************/ 00877 public: 00878 // Parametres d'affichage 00879 bool getVerticesDisplay() const; 00880 void setVerticesDisplay(bool b); 00881 00882 bool getNormalDisplay() const; 00883 void setNormalDisplay(bool b); 00884 00885 bool getFacesDisplay() const; 00886 void setFacesDisplay(bool b); 00887 00888 bool getFacesCoulAlea () const; 00889 void setFacesCoulAlea (); 00890 00891 bool getVolumesCoulAlea () const; 00892 void setVolumesCoulAlea (); 00893 00894 bool getCoulFacesGlobale () const; 00895 void setCoulFacesGlobale (); 00896 00897 bool getCoulTopologie () const; 00898 void setCoulTopologie (); 00899 00900 #ifdef MODULE_ARCHITECTURE 00901 bool getCoulSemantique () const; 00902 void setCoulSemantique (); 00903 #endif 00904 00905 bool getCoulGeometry () const; 00906 void setCoulGeometry (); 00907 00908 bool getSewsDisplay() const; 00909 void setSewsDisplay(bool b); 00910 00911 bool getGridDisplay() const; 00912 void setGridDisplay(bool b); 00913 00914 bool getAxisDisplay() const; 00915 void setAxisDisplay(bool b); 00916 00917 // Pour spamod, affichage ou non des brins 00918 void toggleDarts(bool b); 00919 00920 // Methodes pour recuperer les parametres associes a la vue courante 00921 CParameterAimedPosition* getParameterAimedPosition() const; 00922 CParameterDrawing* getParameterDrawing() const; 00923 CParameterEyePosition* getParameterEyePosition() const; 00924 CParameterAimedPoint* getParameterAimedPoint() const; 00925 CParameterAxis* getParameterAxis() const; 00926 CParameterGrid* getParameterGrid() const; 00927 00928 GMap3d::CParameterDart* getParameterDart() const; 00929 GMap3d::CParameterFace* getParameterFace() const; 00930 GMap3d::CParameterPreview* getParameterPreview() const; 00931 GMap3d::CParameterNormalVector* getParameterNormalVector() const; 00932 GMap3d::CParameterObjectTransformation* getParameterObjectTransformation() 00933 const; 00934 GMap3d::CParameterSew* getParameterSew() const; 00935 00936 GMap3d::CParameterVertex* getParameterVertex() const; 00937 00938 #ifdef MODULE_ARCHITECTURE 00939 CParameterArchi * getParameterArchi() const; 00940 #endif 00941 00942 #ifdef MODULE_SPAMOD 00943 GMap3d::CParameterSpamod* getParameterSpamod () const; 00944 #endif // MODULE_SPAMOD 00945 00946 //************************************************************************/ 00947 private: 00948 // Pointeur sur le controleur 00949 GMap3d :: CControlerGMap * FControler ; 00950 00951 // Pointeur sur un workspace 00952 QWorkspace * FWorkspace ; 00953 00954 // Pointeur sur la fenetre de construction active 00955 CreationObjet * FCreationActive ; 00956 00957 // Pointeurs sur chacunes des toolbars de construction. 00958 CreationObjet * FCreationBrin ; 00959 CreationObjet * FCreationCylindre ; 00960 CreationObjet * FCreationMaillage ; 00961 CreationObjet * FCreationPolygone ; 00962 CreationObjet * FCreationPyramide ; 00963 CreationObjet * FCreationSphere ; 00964 CreationObjet * FCreationTore ; 00965 00966 // Pointeurs sur chacunes des toolbars d'operation. 00967 dialogOperations * FDialogRotation ; 00968 dialogOperations * FDialogHomothetie ; 00969 dialogOperations * FDialogTranslation ; 00970 00971 #ifdef MODULE_GEOLOGY 00972 // Pointeur sur la fenetre de construction active 00973 DialogMesh * FMeshActive ; 00974 #endif // MODULE_GEOLOGY 00975 00976 // Pointeur sur l'operation active 00977 // Operations : Rotation, translation, homothetie 00978 dialogOperations * FOperationActive ; 00979 00980 // Pointeur sur l'ensemble des actions 00981 OptionsFrame * FOptionsFrame ; 00982 00983 // Pointeur sur la boite de dialogue chanfreinage 00984 OperationChanfreinage * FOperationChanfreinage ; 00985 00986 // Pointeur sur la boite de dialogue des caracteristiques topologiques 00987 OptionsCarac * FOptionsCarac ; 00988 00989 // Pointeur sur la boite de dialogue de configuration des Undo/Redo 00990 DialogDo * FDialogDo ; 00991 00992 // Vue mere 00993 GLWindow * FVueMere ; 00994 00995 // Derniere vue double cliquee 00996 GLWindow * FDoubleCliquee ; 00997 00998 // Barre de selection 00999 SelectBar * FSelection ; 01000 01001 // Boite des couleurs 01002 OptionCouleurs * FCouleurs ; 01003 bool color_active; 01004 01005 Window * FParent; 01006 01007 MenuBar * main_menu; 01008 01009 // Les Toolbars. 01010 QToolBar * fichier; 01011 QToolBar * edition; 01012 QToolBar * creation; 01013 QToolBar * operations; 01014 QToolBar * vues; 01015 QToolBar * selection; 01016 01017 // Les actions dynamiques. 01018 QAction * charger_act; 01019 QAction * sauver_act; 01020 QAction * importer_act; 01021 QAction * exporter_act; 01022 01023 // Le repertoire courant. 01024 QDir current_dir; 01025 01026 // LA boite de dialogue de sélection de fichier en cours. 01027 QFileDialog* FileDialog; 01028 01029 #ifdef MODULE_ARCHITECTURE 01030 ToolbarArchi* toolbar_archi; 01031 WindowRayTracing * win_ray_tracing; 01032 QToolBar * architecture; 01033 QAction * suppression_act; 01034 QAction * active_archi_act; 01035 QAction * add_etage_archi; 01036 QAction * add_plan2D; 01037 QAction * extrude_plan2D; 01038 QAction * add_sep1; 01039 01040 DialogAmeublement * FDialogAmeublement; 01041 dialogOperations * FDialogTranslationMur; 01042 01043 void initialisationModeArchi(); 01044 void createTopToolBarArchi(); 01045 01046 public: 01047 01048 FlapSelection * getFlapSelection() const; 01049 #endif 01050 } ; 01051 01052 #endif 01053