]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Remove dependency from KERNEL
authornds <nds@opencascade.com>
Thu, 3 Nov 2005 08:19:27 +0000 (08:19 +0000)
committernds <nds@opencascade.com>
Thu, 3 Nov 2005 08:19:27 +0000 (08:19 +0000)
src/SVTK/Makefile.in
src/SVTK/SVTK.h
src/SVTK/SVTK_Actor.cxx
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_RenderWindowInteractor.cxx
src/SVTK/SVTK_Selector.cxx
src/SVTK/SVTK_ViewModel.cxx
src/VTKViewer/VTKViewer_InteractorStyle.cxx
src/VTKViewer/VTKViewer_ShrinkFilter.cxx

index a39b7cb8db6db22918e93e63b9145f9057768dc3..c395159b71b38bee515a8aaa3b77cc0361da5e0d 100755 (executable)
@@ -50,14 +50,9 @@ LIB_MOC =    SVTK_RenderWindowInteractor.h \
                SVTK_ViewModel.h \
                SVTK_ViewManager.h
 
-LIB_CLIENT_IDL = SALOMEDS.idl \
-                SALOME_Exception.idl \
-                SALOME_ModuleCatalog.idl \
-                SALOME_GenericObj.idl
+CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(BOOST_CPPFLAGS)
 
-CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(BOOST_CPPFLAGS) -I$(KERNEL_ROOT_DIR)/include/salome
-
-LDFLAGS+=$(QT_MT_LIBS) $(OCC_LIBS) $(VTK_LIBS) -L$(KERNEL_ROOT_DIR)/lib/salome
-LIBS+= -lsuit -lCAM -lSalomeObject -lSalomePrs -lVTKViewer -lOpUtil
+LDFLAGS+=$(QT_MT_LIBS) $(OCC_LIBS) $(VTK_LIBS)
+LIBS+= -lsuit -lCAM -lSalomeObject -lSalomePrs -lVTKViewer
 
 @CONCLUDE@
index d650c084cb4a1e7dc2febc170a189164624d7ac9..d6c7c52c1a466981ea46596b37ffb221aad34053 100755 (executable)
@@ -1,13 +1,14 @@
-#ifdef WNT
-#ifdef SVTK_EXPORTS
-#define SVTK_EXPORT __declspec(dllexport)
-#else
-#define SVTK_EXPORT __declspec(dllimport)
-#endif
-#else
-#define SVTK_EXPORT
-#endif
-
-#if defined WNT
-#pragma warning ( disable: 4251 )
-#endif
+#ifdef WNT\r
+#ifdef SVTK_EXPORTS\r
+#define SVTK_EXPORT __declspec(dllexport)\r
+#else\r
+#define SVTK_EXPORT __declspec(dllimport)\r
+#endif\r
+#else\r
+#define SVTK_EXPORT\r
+#endif\r
+\r
+#if defined WNT\r
+#pragma warning ( disable: 4251 )\r
+#pragma warning ( disable: 4786 )\r
+#endif\r
index 1ec5fa4b11d9e97e2e9819df5e0e293e35a61985..c958f2852bb760a1448229a2493ec67d333d5b5f 100644 (file)
@@ -31,8 +31,6 @@
 #include <vtkPolyData.h>
 #include <vtkShrinkFilter.h>
 
-//#include "utilities.h"
-
 using namespace std;
 
 #ifdef _DEBUG_
index 0a5e19f496456ea91de7bc4f0f43a4daef7da3f4..6564c0007d5200ebc078dff7062671ccae9f6991 100644 (file)
@@ -29,8 +29,6 @@
 
 #include "SVTK_InteractorStyle.h"
 
-#include "utilities.h"
-
 #include "VTKViewer_CellRectPicker.h"
 #include "VTKViewer_Utilities.h"
 #include "VTKViewer_RectPicker.h"
 using namespace std;
 
 
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
 namespace
 {
   int
@@ -147,7 +139,6 @@ SVTK_InteractorStyle
 SVTK_InteractorStyle
 ::~SVTK_InteractorStyle() 
 {
-  if(MYDEBUG) INFOS("SVTK_InteractorStyle::~SVTK_InteractorStyle()");
   myViewWindow->RemoveActor(myPreSelectionActor);
 }
 
@@ -911,7 +902,6 @@ SVTK_InteractorStyle
                Handle(SALOME_InteractiveObject) anIO = aSActor->getIO();
                if(aSelectionMode != EdgeOfCellSelection) {
                  if(CheckDimensionId(aSelectionMode,aSActor,anObjId)){
-                   if(MYDEBUG) INFOS(" CellId : "<<anObjId);
                    if (GetSelector()->IsSelected(anIO)) {
                      // This IO is already in the selection
                      GetSelector()->AddOrRemoveIndex(anIO,anObjId,myShiftState);
@@ -931,7 +921,6 @@ SVTK_InteractorStyle
                  }
                  int anEdgeId = GetEdgeId(picker,aSActor,anObjId);
                  if (anEdgeId >= 0) {
-                   if(MYDEBUG) INFOS(" CellId : "<<anObjId<<"; EdgeId : "<<anEdgeId);
                    GetSelector()->AddOrRemoveIndex(anIO,anObjId,false);
                    GetSelector()->AddOrRemoveIndex(anIO,-anEdgeId-1,true);
                    GetSelector()->AddIObject(aSActor);
@@ -957,7 +946,6 @@ SVTK_InteractorStyle
                      this->HighlightProp( NULL );
                      GetSelector()->ClearIObjects();
                    }
-                   if(MYDEBUG) INFOS(" PointId : "<<anObjId);
                    GetSelector()->AddOrRemoveIndex(anIO,anObjId,myShiftState);
                    GetSelector()->AddIObject(aSActor);
                  }
@@ -1087,7 +1075,6 @@ SVTK_InteractorStyle
                      continue;
                    VTKViewer_CellDataSet cellList = picker->GetCellData(aActor);
                    if ( !cellList.empty() ) {
-                     if(MYDEBUG) INFOS ( " NAME Actor : " << aSActor->getName() );
                      TColStd_MapOfInteger anIndexes;
                      VTKViewer_CellDataSet::iterator it;
                      for ( it = cellList.begin(); it != cellList.end(); ++it ) {
@@ -1273,7 +1260,6 @@ SVTK_InteractorStyle
            if(aResult){
              mySelectedActor = aSActor;
              myElemId = anObjId;
-             if(MYDEBUG) INFOS(" CellId : "<<anObjId);
              myInteractor->setCellData(anObjId,aSActor,myPreSelectionActor);
            }
          }
@@ -1288,7 +1274,6 @@ SVTK_InteractorStyle
              mySelectedActor = aSActor;
              myEdgeId = anEdgeId;
              myElemId = anObjId;
-             if(MYDEBUG) INFOS(" CellId : "<<anObjId<<"; EdgeId : "<<anEdgeId);
              myInteractor->setEdgeData(anObjId,aSActor,-anEdgeId-1,myPreSelectionActor);
            } 
          }
@@ -1309,7 +1294,6 @@ SVTK_InteractorStyle
        if(!anIsSameObjId) {
          mySelectedActor = aSActor;
          myNodeId = anObjId;
-         if(MYDEBUG) INFOS(" PointId : "<<anObjId);
          myInteractor->setPointData(anObjId,aSActor,myPreSelectionActor);
        }
        myPreSelectionActor->GetProperty()->SetRepresentationToSurface();
index a80733492639df46b8de5244c69ff91eb1a4bfe7..55dd794e7f4c20a6a7fa06daf95f9df5cf4af139 100644 (file)
 
 #include <TColStd_IndexedMapOfInteger.hxx>
 
-#include "utilities.h"
-
 using namespace std;
 
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-
 SVTK_RenderWindowInteractor* 
 SVTK_RenderWindowInteractor
 ::New() 
@@ -113,8 +104,6 @@ SVTK_RenderWindowInteractor
 SVTK_RenderWindowInteractor
 ::~SVTK_RenderWindowInteractor() 
 {
-  if(MYDEBUG) INFOS("SVTK_RenderWindowInteractor::~SVTK_RenderWindowInteractor()");
-
   delete mTimer ;
 
   myViewWindow->RemoveActor(myCellActor);
index f330cfed4baf371873a0b4a708a84171dfba85b9..625593eca556c2f8d4d0ab0fb55ec86c98feffe1 100644 (file)
@@ -36,7 +36,6 @@
 #include "SVTK_ViewWindow.h"
 
 #include "SVTK_SelectorDef.h"
-#include "utilities.h"
 
 SVTK_SelectorDef
 ::SVTK_SelectorDef()
index 624db780d8060bad597a9edfdc603364c9f98dca..52afb907f64a7d680c09d676dc8a8a485922581f 100644 (file)
-#include <qpopupmenu.h>
-#include <qcolordialog.h>
-
-#include <vtkCamera.h>
-#include <vtkRenderer.h>
-#include <vtkActorCollection.h>
-
-#include "SUIT_Session.h"
-
-#include "SVTK_Selection.h"
-#include "SVTK_ViewModel.h"
-#include "SVTK_ViewWindow.h"
-#include "SVTK_Prs.h"
-
-#include "SVTK_RenderWindowInteractor.h"
-#include "SVTK_RenderWindow.h"
-
-#include "ToolsGUI.h"
-
-#include "SALOME_Actor.h"
-#include "SALOME_InteractiveObject.hxx"
-
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
-#include "SALOME_ModuleCatalog_impl.hxx"
-#include "SALOME_NamingService.hxx"
-
-#include "SALOMEDSClient.hxx"
-#include "SALOMEDS_StudyManager.hxx"
-
-// in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study.
-// SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from 
-// SALOMEDS::StudyManager - no linkage with SalomeApp. 
-
-static _PTR(Study) getStudyDS() 
-{
-  SALOMEDSClient_Study* aStudy = NULL;
-  _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() );
-
-  // get id of SUIT_Study, if it's a SalomeApp_Study, it will return
-  //    id of its underlying SALOMEDS::Study
-  SUIT_Application* app = SUIT_Session::session()->activeApplication();
-  if ( !app )  return _PTR(Study)(aStudy); 
-  SUIT_Study* stud = app->activeStudy();
-  if ( !stud ) return _PTR(Study)(aStudy);  
-  const int id = stud->id(); // virtual method, must return SALOMEDS_Study id
-  // get SALOMEDS_Study with this id from StudyMgr
-  return aMgr->GetStudyByID( id );
-}
-
-//==========================================================
-SVTK_Viewer::SVTK_Viewer()
-{
-  myTrihedronSize = 100;
-}
-
-//==========================================================
-SVTK_Viewer::~SVTK_Viewer() 
-{
-}
-
-QColor SVTK_Viewer::backgroundColor() const
-{
-  return myBgColor;
-}
-
-void SVTK_Viewer::setBackgroundColor( const QColor& c )
-{
-  if ( c.isValid() )
-    myBgColor = c;
-}
-
-//==========================================================
-SUIT_ViewWindow* SVTK_Viewer::createView( SUIT_Desktop* theDesktop )
-{
-  SVTK_ViewWindow* vw = new SVTK_ViewWindow( theDesktop, this );
-  vw->setBackgroundColor( backgroundColor() );
-  vw->SetTrihedronSize( trihedronSize() );
-  return vw;
-}
-
-int SVTK_Viewer::trihedronSize() const
-{
-  return myTrihedronSize;
-}
-
-void SVTK_Viewer::setTrihedronSize( const int sz )
-{
-  myTrihedronSize = sz;
-
-  SUIT_ViewManager* vm = getViewManager();
-  if ( !vm )
-    return;
-
-  QPtrVector<SUIT_ViewWindow> vec = vm->getViews();
-  for ( int i = 0; i < vec.count(); i++ )
-  {
-    SUIT_ViewWindow* win = vec.at( i );
-    if ( !win || !win->inherits( "SVTK_ViewWindow" ) )
-      continue;
-
-    SVTK_ViewWindow* vw = (SVTK_ViewWindow*)win;
-    vw->SetTrihedronSize( sz );
-  }
-}
-
-//==========================================================
-void SVTK_Viewer::setViewManager(SUIT_ViewManager* theViewManager)
-{
-  SUIT_ViewModel::setViewManager(theViewManager);
-
-  if ( !theViewManager )
-    return;
-
-  connect(theViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
-          this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
-  
-  connect(theViewManager, SIGNAL(mouseMove(SUIT_ViewWindow*, QMouseEvent*)), 
-          this, SLOT(onMouseMove(SUIT_ViewWindow*, QMouseEvent*)));
-  
-  connect(theViewManager, SIGNAL(mouseRelease(SUIT_ViewWindow*, QMouseEvent*)), 
-          this, SLOT(onMouseRelease(SUIT_ViewWindow*, QMouseEvent*)));
-}
-
-//==========================================================
-void SVTK_Viewer::contextMenuPopup( QPopupMenu* thePopup )
-{
-  thePopup->insertItem( tr( "MEN_DUMP_VIEW" ), this, SLOT( onDumpView() ) );
-  thePopup->insertItem( tr( "MEN_CHANGE_BACKGROUD" ), this, SLOT( onChangeBgColor() ) );
-
-  thePopup->insertSeparator();
-
-  SVTK_ViewWindow* aView = (SVTK_ViewWindow*)(myViewManager->getActiveView());
-  if ( aView && !aView->getToolBar()->isVisible() )
-    thePopup->insertItem( tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) );
-}
-
-//==========================================================
-void SVTK_Viewer::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event)
-{
-  if(SVTK_ViewWindow* aVW = dynamic_cast<SVTK_ViewWindow*>(vw)){
-    if(SVTK_RenderWindowInteractor* aRWI = aVW->getRWInteractor()){
-      switch(event->button()) {
-      case LeftButton:
-       aRWI->LeftButtonPressed(event) ;
-       break ;
-      case MidButton:
-       aRWI->MiddleButtonPressed(event) ;
-       break ;
-      case RightButton:
-       aRWI->RightButtonPressed(event) ;
-       break;
-      default:
-       break ;
-      }
-    }
-  }
-}
-
-//==========================================================
-void 
-SVTK_Viewer
-::onMouseMove(SUIT_ViewWindow* vw, QMouseEvent* event)
-{
-  if(SVTK_ViewWindow* aVW = dynamic_cast<SVTK_ViewWindow*>(vw)){
-    if(SVTK_RenderWindowInteractor* aRWI = aVW->getRWInteractor()){
-      aRWI->MouseMove( event );
-    }
-  }
-}
-
-//==========================================================
-void 
-SVTK_Viewer
-::onMouseRelease(SUIT_ViewWindow* vw, QMouseEvent* event)
-{
-  if(SVTK_ViewWindow* aVW = dynamic_cast<SVTK_ViewWindow*>(vw)){
-    if(SVTK_RenderWindowInteractor* aRWI = aVW->getRWInteractor()){
-      switch(event->button()) {
-      case LeftButton:
-       aRWI->LeftButtonReleased(event) ;
-       break ;
-      case MidButton:
-       aRWI->MiddleButtonReleased(event) ;
-       break ;
-      case RightButton:
-       aRWI->RightButtonReleased(event) ;
-       break;
-      default:
-       break ;
-      }
-    }
-  }
-}
-
-//==========================================================
-void 
-SVTK_Viewer
-::enableSelection(bool isEnabled)
-{
-  mySelectionEnabled = isEnabled;
-  //!! To be done for view windows
-}
-
-//==========================================================
-void
-SVTK_Viewer
-::enableMultiselection(bool isEnable)
-{
-  myMultiSelectionEnabled = isEnable;
-  //!! To be done for view windows
-}
-
-void SVTK_Viewer::onDumpView()
-{
-  SVTK_ViewWindow* aView = (SVTK_ViewWindow*)(myViewManager->getActiveView());
-  if ( aView )
-    aView->onDumpView();
-}
-
-//==========================================================
-void SVTK_Viewer::onChangeBgColor()
-{
-  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
-  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
-    if(SUIT_ViewWindow* aViewWindow = aViews.at(i))
-      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)){
-       QColor aColor = QColorDialog::getColor( aView->backgroundColor(), aView);
-       if ( aColor.isValid() )
-         aView->setBackgroundColor(aColor);
-      }
-}
-
-//==========================================================
-void
-SVTK_Viewer
-::onShowToolbar() 
-{
-  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
-  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
-    if(SUIT_ViewWindow* aViewWindow = aViews.at(i))
-      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow))
-       aView->getToolBar()->show();    
-}
-
-//==========================================================
-void
-SVTK_Viewer
-::Display( const SALOME_VTKPrs* prs )
-{
-  // try do downcast object
-  if(const SVTK_Prs* aPrs = dynamic_cast<const SVTK_Prs*>( prs )){
-    if(aPrs->IsNull())
-      return;
-    if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){
-      // get SALOMEDS Study
-      _PTR(Study) aStudy(getStudyDS());
-      anActorCollection->InitTraversal();
-      while(vtkActor* anActor = anActorCollection->GetNextActor()){
-       if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
-         // Set visibility flag
-         Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
-         if(!anObj.IsNull() && anObj->hasEntry() && aStudy){
-           ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),true,this);
-         }
-         // just display the object
-         QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
-         for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
-           if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){
-             if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)){
-               if(SVTK_RenderWindowInteractor* aRWI = aView->getRWInteractor()){
-                 aRWI->Display(anAct,false);
-                 if(anAct->IsSetCamera()){
-                   vtkRenderer* aRenderer =  aView->getRenderer();
-                   anAct->SetCamera( aRenderer->GetActiveCamera() );
-                 }
-               }
-             }
-           }
-         }
-       }
-      }
-    }
-  }
-}
-
-//==========================================================
-void
-SVTK_Viewer
-::Erase( const SALOME_VTKPrs* prs, const bool forced )
-{
-  // try do downcast object
-  if(const SVTK_Prs* aPrs = dynamic_cast<const SVTK_Prs*>( prs )){
-    if(aPrs->IsNull())
-      return;
-    if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){
-      // get SALOMEDS Study
-      _PTR(Study) aStudy(getStudyDS());
-      anActorCollection->InitTraversal();
-      while(vtkActor* anActor = anActorCollection->GetNextActor())
-       if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
-         // Set visibility flag
-         Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
-         if(!anObj.IsNull() && anObj->hasEntry() && aStudy){
-           ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);
-         }
-         // just display the object
-         QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
-         for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
-           if(SUIT_ViewWindow* aViewWindow = aViews.at(i))
-             if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow))
-               if(SVTK_RenderWindowInteractor* aRWI = aView->getRWInteractor())
-                 if ( forced )
-                   aRWI->Remove(anAct,false);
-                 else
-                   aRWI->Erase(anAct,forced);
-         }
-       }
-    }
-  }
-}
-  
-//==========================================================
-void
-SVTK_Viewer
-::EraseAll( const bool forced )
-{
-  _PTR(Study) aStudy(getStudyDS());
-  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
-  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
-    if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){
-      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)){
-       vtkRenderer* aRenderer =  aView->getRenderer();
-       vtkActorCollection* anActorCollection = aRenderer->GetActors();
-       anActorCollection->InitTraversal();
-       while(vtkActor* anActor = anActorCollection->GetNextActor()){
-         if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
-           // Set visibility flag
-           Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
-           if(!anObj.IsNull() && anObj->hasEntry() && aStudy)
-             ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);
-           if(forced)
-             aRenderer->RemoveActor(anAct);
-           else{
-             // just erase actor
-             anAct->SetVisibility( false );
-             // erase dependent actors
-             vtkActorCollection* aCollection = vtkActorCollection::New();
-             anAct->GetChildActors( aCollection );
-             aCollection->InitTraversal();
-             while(vtkActor* aSubAct = aCollection->GetNextActor())
-               aSubAct->SetVisibility( false );
-             aCollection->Delete();
-           }
-         }
-       }
-      }
-    }
-  }
-  Repaint();
-}
-
-//==========================================================
-SALOME_Prs* 
-SVTK_Viewer
-::CreatePrs( const char* entry )
-{
-  SVTK_Prs* prs = new SVTK_Prs();
-  if ( entry ) {
-    vtkRenderer* rnr =  ( (SVTK_ViewWindow*) getViewManager()->getActiveView() )->getRenderer();
-    vtkActorCollection* theActors = rnr->GetActors();
-    theActors->InitTraversal();
-    vtkActor* ac;
-    while( ( ac = theActors->GetNextActor() ) ) {
-      SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac );
-      if ( anActor && anActor->hasIO() && !strcmp( anActor->getIO()->getEntry(), entry ) ) {
-       prs->AddObject( ac );
-      }
-    }
-  }
-  return prs;
-}
-
-//==========================================================
-void
-SVTK_Viewer
-::BeforeDisplay( SALOME_Displayer* d )
-{
-  d->BeforeDisplay( this, SALOME_VTKViewType() );
-}
-
-//==========================================================
-void
-SVTK_Viewer::AfterDisplay( SALOME_Displayer* d )
-{
-  d->AfterDisplay( this, SALOME_VTKViewType() );
-}
-
-//==========================================================
-bool
-SVTK_Viewer
-::isVisible( const Handle(SALOME_InteractiveObject)& io )
-{
-  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
-  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
-    if(SUIT_ViewWindow* aViewWindow = aViews.at(i))
-      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow))
-       if(SVTK_RenderWindowInteractor* aRWI = aView->getRWInteractor())
-         if(!aRWI->isVisible( io ))
-           return false;
-  return true;
-}
-
-//==========================================================
-void 
-SVTK_Viewer
-::Repaint()
-{
-//  if (theUpdateTrihedron) onAdjustTrihedron();
-  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
-  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
-    if(SUIT_ViewWindow* aViewWindow = aViews.at(i))
-      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow))
-       if(SVTK_RenderWindow* aRW = aView->getRenderWindow())
-       {
-         aView->getRenderer()->Render();
-         aView->getRWInteractor()->unHighlightAll();
-         aRW->update();
-       }
-}
-
-void 
-SVTK_Viewer
-::onSelectionChanged()
-{
-  emit selectionChanged();
-}
-
+#include <qpopupmenu.h>\r
+#include <qcolordialog.h>\r
+\r
+#include <vtkCamera.h>\r
+#include <vtkRenderer.h>\r
+#include <vtkActorCollection.h>\r
+\r
+#include "SUIT_Session.h"\r
+\r
+#include "SVTK_Selection.h"\r
+#include "SVTK_ViewModel.h"\r
+#include "SVTK_ViewWindow.h"\r
+#include "SVTK_Prs.h"\r
+\r
+#include "VTKViewer_ViewModel.h"\r
+\r
+#include "SVTK_RenderWindowInteractor.h"\r
+#include "SVTK_RenderWindow.h"\r
+\r
+//#include <ToolsGUI.h>\r
+\r
+#include <SALOME_Actor.h>\r
+#include <SALOME_InteractiveObject.hxx>\r
+\r
+// Temporarily commented to avoid awful dependecy on SALOMEDS\r
+// TODO: better mechanism of storing display/erse status in a study\r
+// should be provided...\r
+//#include "Utils_ORB_INIT.hxx"\r
+//#include "Utils_SINGLETON.hxx"\r
+//#include "SALOME_ModuleCatalog_impl.hxx"\r
+//#include "SALOME_NamingService.hxx"\r
+\r
+//#include "SALOMEDSClient.hxx"\r
+//#include "SALOMEDS_StudyManager.hxx"\r
+\r
+// in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study.\r
+// SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from \r
+// SALOMEDS::StudyManager - no linkage with SalomeApp. \r
+\r
+// Temporarily commented to avoid awful dependecy on SALOMEDS\r
+// TODO: better mechanism of storing display/erse status in a study\r
+// should be provided...\r
+//static _PTR(Study) getStudyDS() \r
+//{\r
+//  SALOMEDSClient_Study* aStudy = NULL;\r
+//  _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() );\r
+  // get id of SUIT_Study, if it's a SalomeApp_Study, it will return\r
+  //    id of its underlying SALOMEDS::Study\r
+//  SUIT_Application* app = SUIT_Session::session()->activeApplication();\r
+//  if ( !app )  return _PTR(Study)(aStudy); \r
+//  SUIT_Study* stud = app->activeStudy();\r
+//  if ( !stud ) return _PTR(Study)(aStudy);  \r
+//  const int id = stud->id(); // virtual method, must return SALOMEDS_Study id\r
+  // get SALOMEDS_Study with this id from StudyMgr\r
+//  return aMgr->GetStudyByID( id );\r
+//}\r
+\r
+//==========================================================\r
+SVTK_Viewer::SVTK_Viewer()\r
+{\r
+  myTrihedronSize = 100;\r
+}\r
+\r
+//==========================================================\r
+SVTK_Viewer::~SVTK_Viewer() \r
+{\r
+}\r
+\r
+QColor SVTK_Viewer::backgroundColor() const\r
+{\r
+  return myBgColor;\r
+}\r
+\r
+void SVTK_Viewer::setBackgroundColor( const QColor& c )\r
+{\r
+  if ( c.isValid() )\r
+    myBgColor = c;\r
+}\r
+\r
+//==========================================================\r
+SUIT_ViewWindow* SVTK_Viewer::createView( SUIT_Desktop* theDesktop )\r
+{\r
+  SVTK_ViewWindow* vw = new SVTK_ViewWindow( theDesktop, this );\r
+  vw->setBackgroundColor( backgroundColor() );\r
+  vw->SetTrihedronSize( trihedronSize() );\r
+  return vw;\r
+}\r
+\r
+int SVTK_Viewer::trihedronSize() const\r
+{\r
+  return myTrihedronSize;\r
+}\r
+\r
+void SVTK_Viewer::setTrihedronSize( const int sz )\r
+{\r
+  myTrihedronSize = sz;\r
+\r
+  SUIT_ViewManager* vm = getViewManager();\r
+  if ( !vm )\r
+    return;\r
+\r
+  QPtrVector<SUIT_ViewWindow> vec = vm->getViews();\r
+  for ( int i = 0; i < vec.count(); i++ )\r
+  {\r
+    SUIT_ViewWindow* win = vec.at( i );\r
+    if ( !win || !win->inherits( "SVTK_ViewWindow" ) )\r
+      continue;\r
+\r
+    SVTK_ViewWindow* vw = (SVTK_ViewWindow*)win;\r
+    vw->SetTrihedronSize( sz );\r
+  }\r
+}\r
+\r
+//==========================================================\r
+void SVTK_Viewer::setViewManager(SUIT_ViewManager* theViewManager)\r
+{\r
+  SUIT_ViewModel::setViewManager(theViewManager);\r
+\r
+  if ( !theViewManager )\r
+    return;\r
+\r
+  connect(theViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), \r
+          this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));\r
+  \r
+  connect(theViewManager, SIGNAL(mouseMove(SUIT_ViewWindow*, QMouseEvent*)), \r
+          this, SLOT(onMouseMove(SUIT_ViewWindow*, QMouseEvent*)));\r
+  \r
+  connect(theViewManager, SIGNAL(mouseRelease(SUIT_ViewWindow*, QMouseEvent*)), \r
+          this, SLOT(onMouseRelease(SUIT_ViewWindow*, QMouseEvent*)));\r
+}\r
+\r
+//==========================================================\r
+void SVTK_Viewer::contextMenuPopup( QPopupMenu* thePopup )\r
+{\r
+  thePopup->insertItem( VTKViewer_Viewer::tr( "MEN_DUMP_VIEW" ), this, SLOT( onDumpView() ) );\r
+  thePopup->insertItem( VTKViewer_Viewer::tr( "MEN_CHANGE_BACKGROUD" ), this, SLOT( onChangeBgColor() ) );\r
+\r
+  thePopup->insertSeparator();\r
+\r
+  SVTK_ViewWindow* aView = (SVTK_ViewWindow*)(myViewManager->getActiveView());\r
+  if ( aView && !aView->getToolBar()->isVisible() )\r
+    thePopup->insertItem( VTKViewer_Viewer::tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) );\r
+}\r
+\r
+//==========================================================\r
+void SVTK_Viewer::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event)\r
+{\r
+  if(SVTK_ViewWindow* aVW = dynamic_cast<SVTK_ViewWindow*>(vw)){\r
+    if(SVTK_RenderWindowInteractor* aRWI = aVW->getRWInteractor()){\r
+      switch(event->button()) {\r
+      case LeftButton:\r
+       aRWI->LeftButtonPressed(event) ;\r
+       break ;\r
+      case MidButton:\r
+       aRWI->MiddleButtonPressed(event) ;\r
+       break ;\r
+      case RightButton:\r
+       aRWI->RightButtonPressed(event) ;\r
+       break;\r
+      default:\r
+       break ;\r
+      }\r
+    }\r
+  }\r
+}\r
+\r
+//==========================================================\r
+void \r
+SVTK_Viewer\r
+::onMouseMove(SUIT_ViewWindow* vw, QMouseEvent* event)\r
+{\r
+  if(SVTK_ViewWindow* aVW = dynamic_cast<SVTK_ViewWindow*>(vw)){\r
+    if(SVTK_RenderWindowInteractor* aRWI = aVW->getRWInteractor()){\r
+      aRWI->MouseMove( event );\r
+    }\r
+  }\r
+}\r
+\r
+//==========================================================\r
+void \r
+SVTK_Viewer\r
+::onMouseRelease(SUIT_ViewWindow* vw, QMouseEvent* event)\r
+{\r
+  if(SVTK_ViewWindow* aVW = dynamic_cast<SVTK_ViewWindow*>(vw)){\r
+    if(SVTK_RenderWindowInteractor* aRWI = aVW->getRWInteractor()){\r
+      switch(event->button()) {\r
+      case LeftButton:\r
+       aRWI->LeftButtonReleased(event) ;\r
+       break ;\r
+      case MidButton:\r
+       aRWI->MiddleButtonReleased(event) ;\r
+       break ;\r
+      case RightButton:\r
+       aRWI->RightButtonReleased(event) ;\r
+       break;\r
+      default:\r
+       break ;\r
+      }\r
+    }\r
+  }\r
+}\r
+\r
+//==========================================================\r
+void \r
+SVTK_Viewer\r
+::enableSelection(bool isEnabled)\r
+{\r
+  mySelectionEnabled = isEnabled;\r
+  //!! To be done for view windows\r
+}\r
+\r
+//==========================================================\r
+void\r
+SVTK_Viewer\r
+::enableMultiselection(bool isEnable)\r
+{\r
+  myMultiSelectionEnabled = isEnable;\r
+  //!! To be done for view windows\r
+}\r
+\r
+void SVTK_Viewer::onDumpView()\r
+{\r
+  SVTK_ViewWindow* aView = (SVTK_ViewWindow*)(myViewManager->getActiveView());\r
+  if ( aView )\r
+    aView->onDumpView();\r
+}\r
+\r
+//==========================================================\r
+void SVTK_Viewer::onChangeBgColor()\r
+{\r
+  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();\r
+  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)\r
+    if(SUIT_ViewWindow* aViewWindow = aViews.at(i))\r
+      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)){\r
+       QColor aColor = QColorDialog::getColor( aView->backgroundColor(), aView);\r
+       if ( aColor.isValid() )\r
+         aView->setBackgroundColor(aColor);\r
+      }\r
+}\r
+\r
+//==========================================================\r
+void\r
+SVTK_Viewer\r
+::onShowToolbar() \r
+{\r
+  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();\r
+  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)\r
+    if(SUIT_ViewWindow* aViewWindow = aViews.at(i))\r
+      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow))\r
+       aView->getToolBar()->show();    \r
+}\r
+\r
+//==========================================================\r
+void\r
+SVTK_Viewer\r
+::Display( const SALOME_VTKPrs* prs )\r
+{\r
+  // try do downcast object\r
+  if(const SVTK_Prs* aPrs = dynamic_cast<const SVTK_Prs*>( prs )){\r
+    if(aPrs->IsNull())\r
+      return;\r
+    if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){\r
+      // get SALOMEDS Study\r
+      // Temporarily commented to avoid awful dependecy on SALOMEDS\r
+      // TODO: better mechanism of storing display/erse status in a study\r
+      // should be provided...\r
+      // _PTR(Study) aStudy(getStudyDS());\r
+      anActorCollection->InitTraversal();\r
+      while(vtkActor* anActor = anActorCollection->GetNextActor()){\r
+       if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){\r
+         // Set visibility flag\r
+          // Temporarily commented to avoid awful dependecy on SALOMEDS\r
+          // TODO: better mechanism of storing display/erse status in a study\r
+          // should be provided...\r
+         //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();\r
+         //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){\r
+         //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),true,this);\r
+         //}\r
+         // just display the object\r
+         QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();\r
+         for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){\r
+           if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){\r
+             if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)){\r
+               if(SVTK_RenderWindowInteractor* aRWI = aView->getRWInteractor()){\r
+                 aRWI->Display(anAct,false);\r
+                 if(anAct->IsSetCamera()){\r
+                   vtkRenderer* aRenderer =  aView->getRenderer();\r
+                   anAct->SetCamera( aRenderer->GetActiveCamera() );\r
+                 }\r
+               }\r
+             }\r
+           }\r
+         }\r
+       }\r
+      }\r
+    }\r
+  }\r
+}\r
+\r
+//==========================================================\r
+void\r
+SVTK_Viewer\r
+::Erase( const SALOME_VTKPrs* prs, const bool forced )\r
+{\r
+  // try do downcast object\r
+  if(const SVTK_Prs* aPrs = dynamic_cast<const SVTK_Prs*>( prs )){\r
+    if(aPrs->IsNull())\r
+      return;\r
+    if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){\r
+      // get SALOMEDS Study\r
+      // Temporarily commented to avoid awful dependecy on SALOMEDS\r
+      // TODO: better mechanism of storing display/erse status in a study\r
+      // should be provided...\r
+      //_PTR(Study) aStudy(getStudyDS());\r
+      anActorCollection->InitTraversal();\r
+      while(vtkActor* anActor = anActorCollection->GetNextActor())\r
+       if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){\r
+         // Set visibility flag\r
+          // Temporarily commented to avoid awful dependecy on SALOMEDS\r
+          // TODO: better mechanism of storing display/erse status in a study\r
+          // should be provided...\r
+         //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();\r
+         //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){\r
+         //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);\r
+         //}\r
+         // just display the object\r
+         QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();\r
+         for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){\r
+           if(SUIT_ViewWindow* aViewWindow = aViews.at(i))\r
+             if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow))\r
+               if(SVTK_RenderWindowInteractor* aRWI = aView->getRWInteractor())\r
+                 if ( forced )\r
+                   aRWI->Remove(anAct,false);\r
+                 else\r
+                   aRWI->Erase(anAct,forced);\r
+         }\r
+       }\r
+    }\r
+  }\r
+}\r
+  \r
+//==========================================================\r
+void\r
+SVTK_Viewer\r
+::EraseAll( const bool forced )\r
+{\r
+  // Temporarily commented to avoid awful dependecy on SALOMEDS\r
+  // TODO: better mechanism of storing display/erse status in a study\r
+  // should be provided...\r
+  //_PTR(Study) aStudy(getStudyDS());\r
+  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();\r
+  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){\r
+    if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){\r
+      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)){\r
+       vtkRenderer* aRenderer =  aView->getRenderer();\r
+       vtkActorCollection* anActorCollection = aRenderer->GetActors();\r
+       anActorCollection->InitTraversal();\r
+       while(vtkActor* anActor = anActorCollection->GetNextActor()){\r
+         if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){\r
+           // Set visibility flag\r
+            // Temporarily commented to avoid awful dependecy on SALOMEDS\r
+            // TODO: better mechanism of storing display/erse status in a study\r
+            // should be provided...\r
+           //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();\r
+           //if(!anObj.IsNull() && anObj->hasEntry() && aStudy)\r
+           //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);\r
+           if(forced)\r
+             aRenderer->RemoveActor(anAct);\r
+           else{\r
+             // just erase actor\r
+             anAct->SetVisibility( false );\r
+             // erase dependent actors\r
+             vtkActorCollection* aCollection = vtkActorCollection::New();\r
+             anAct->GetChildActors( aCollection );\r
+             aCollection->InitTraversal();\r
+             while(vtkActor* aSubAct = aCollection->GetNextActor())\r
+               aSubAct->SetVisibility( false );\r
+             aCollection->Delete();\r
+           }\r
+         }\r
+       }\r
+      }\r
+    }\r
+  }\r
+  Repaint();\r
+}\r
+\r
+//==========================================================\r
+SALOME_Prs* \r
+SVTK_Viewer\r
+::CreatePrs( const char* entry )\r
+{\r
+  SVTK_Prs* prs = new SVTK_Prs();\r
+  if ( entry ) {\r
+    vtkRenderer* rnr =  ( (SVTK_ViewWindow*) getViewManager()->getActiveView() )->getRenderer();\r
+    vtkActorCollection* theActors = rnr->GetActors();\r
+    theActors->InitTraversal();\r
+    vtkActor* ac;\r
+    while( ( ac = theActors->GetNextActor() ) ) {\r
+      SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac );\r
+      if ( anActor && anActor->hasIO() && !strcmp( anActor->getIO()->getEntry(), entry ) ) {\r
+       prs->AddObject( ac );\r
+      }\r
+    }\r
+  }\r
+  return prs;\r
+}\r
+\r
+//==========================================================\r
+void\r
+SVTK_Viewer\r
+::BeforeDisplay( SALOME_Displayer* d )\r
+{\r
+  d->BeforeDisplay( this, SALOME_VTKViewType() );\r
+}\r
+\r
+//==========================================================\r
+void\r
+SVTK_Viewer::AfterDisplay( SALOME_Displayer* d )\r
+{\r
+  d->AfterDisplay( this, SALOME_VTKViewType() );\r
+}\r
+\r
+//==========================================================\r
+bool\r
+SVTK_Viewer\r
+::isVisible( const Handle(SALOME_InteractiveObject)& io )\r
+{\r
+  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();\r
+  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)\r
+    if(SUIT_ViewWindow* aViewWindow = aViews.at(i))\r
+      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow))\r
+       if(SVTK_RenderWindowInteractor* aRWI = aView->getRWInteractor())\r
+         if(!aRWI->isVisible( io ))\r
+           return false;\r
+  return true;\r
+}\r
+\r
+//==========================================================\r
+void \r
+SVTK_Viewer\r
+::Repaint()\r
+{\r
+//  if (theUpdateTrihedron) onAdjustTrihedron();\r
+  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();\r
+  for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)\r
+    if(SUIT_ViewWindow* aViewWindow = aViews.at(i))\r
+      if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow))\r
+       if(SVTK_RenderWindow* aRW = aView->getRenderWindow())\r
+         aRW->update();\r
+}\r
+\r
+void \r
+SVTK_Viewer\r
+::onSelectionChanged()\r
+{\r
+  emit selectionChanged();\r
+}\r
+\r
index 18a4960897251efb21e19ebd8c0206a37b9eec74..fa407641d1726076d12a6e96ad61b0b5f8ad7b97 100644 (file)
 using namespace std;
 
 
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
 /*
 static int GetEdgeId(vtkPicker *thePicker, SALOME_Actor *theActor, int theObjId){
   int anEdgeId = -1;
@@ -117,7 +111,6 @@ VTKViewer_InteractorStyle::VTKViewer_InteractorStyle()
 /*!Destructor.*/
 VTKViewer_InteractorStyle::~VTKViewer_InteractorStyle() 
 {
-//  if(MYDEBUG) INFOS("VTKViewer_InteractorStyle::~VTKViewer_InteractorStyle()");
   m_ViewWnd->RemoveActor(myPreSelectionActor);
 }
 
@@ -899,7 +892,6 @@ void VTKViewer_InteractorStyle::onFinishOperation()
                Handle(SALOME_InteractiveObject) IO = SActor->getIO();
                if(aSelectionMode != EdgeOfCellSelection) {
                  if(CheckDimensionId(aSelectionMode,SActor,anObjId)){
-                   if(MYDEBUG) INFOS(" CellId : "<<anObjId);
                    if (IsSelected(IO,aSel)) {
                      // This IO is already in the selection
                      aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
@@ -919,7 +911,6 @@ void VTKViewer_InteractorStyle::onFinishOperation()
                  }
                  int anEdgeId = GetEdgeId(picker,SActor,anObjId);
                  if (anEdgeId >= 0) {
-                   if(MYDEBUG) INFOS(" CellId : "<<anObjId<<"; EdgeId : "<<anEdgeId);
                    aSel->AddOrRemoveIndex( IO, anObjId, true, false);
                    aSel->AddOrRemoveIndex( IO, -anEdgeId-1, true, true );
                    aSel->AddIObject( IO, false );
@@ -945,7 +936,6 @@ void VTKViewer_InteractorStyle::onFinishOperation()
                      this->HighlightProp( NULL );
                      aSel->ClearIObjects();
                    }
-                   if(MYDEBUG) INFOS(" PointId : "<<anObjId);
                    aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
                    aSel->AddIObject( IO, false );
                  }
@@ -1076,7 +1066,6 @@ void VTKViewer_InteractorStyle::onFinishOperation()
                      continue;
                    VTKViewer_CellDataSet cellList = picker->GetCellData(aActor);
                    if ( !cellList.empty() ) {
-                     if(MYDEBUG) INFOS ( " NAME Actor : " << aSActor->getName() );
                      SALOME_Selection::TContainerOfId anIndexes;
                      VTKViewer_CellDataSet::iterator it;
                      for ( it = cellList.begin(); it != cellList.end(); ++it ) {
@@ -1260,7 +1249,6 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) {
            if(aResult){
              mySelectedActor = SActor;
              myElemId = anObjId;
-             if(MYDEBUG) INFOS(" CellId : "<<anObjId);
              m_Interactor->setCellData(anObjId,SActor,myPreSelectionActor);
            }
          }
@@ -1275,7 +1263,6 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) {
              mySelectedActor = SActor;
              myEdgeId = anEdgeId;
              myElemId = anObjId;
-             if(MYDEBUG) INFOS(" CellId : "<<anObjId<<"; EdgeId : "<<anEdgeId);
              m_Interactor->setEdgeData(anObjId,SActor,-anEdgeId-1,myPreSelectionActor);
            } 
          }
@@ -1296,7 +1283,6 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) {
        if(!anIsSameObjId) {
          mySelectedActor = SActor;
          myNodeId = anObjId;
-         if(MYDEBUG) INFOS(" PointId : "<<anObjId);
          m_Interactor->setPointData(anObjId,SActor,myPreSelectionActor);
        }
        myPreSelectionActor->GetProperty()->SetRepresentationToSurface();
@@ -1328,7 +1314,6 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) {
                }
              }
            }
-           //if(MYDEBUG) INFOS ( " NAME PREVIEW " << SActor->getName() );
          }
        }
       }
index f980b5c0ded779aff247cb081e525628135acb74..c65699a9a790d6a2d1bcd925c57cb97f19aeff2a 100755 (executable)
 #include <vtkPointData.h>
 #include <vtkUnstructuredGrid.h>
 
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
-#else
-static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
-#endif
-
 vtkCxxRevisionMacro(VTKViewer_ShrinkFilter, "$Revision$");
 vtkStandardNewMacro(VTKViewer_ShrinkFilter);