]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
removed unneeded methods and replaced it functionality to VTKViewer_ViewFrame class
authorenk <enk@opencascade.com>
Thu, 19 May 2005 12:25:47 +0000 (12:25 +0000)
committerenk <enk@opencascade.com>
Thu, 19 May 2005 12:25:47 +0000 (12:25 +0000)
src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx
src/VTKViewer/VTKViewer_InteractorStyleSALOME.h

index 6258e573f788e8d347c1b54755a0926315510224..dc9fca1e592659064dfebcab97539134d533a8fd 100644 (file)
@@ -33,7 +33,6 @@
 #include "VTKViewer_ViewFrame.h"
 
 #include "VTKViewer_Utilities.h"
-#include "VTKViewer_Trihedron.h"
 #include "VTKViewer_RectPicker.h"
 #include "VTKViewer_CellRectPicker.h"
 
@@ -45,7 +44,6 @@
 #include "VTKViewer_Actor.h"
 #include "SALOME_Selection.h"
 #include "SALOME_ListIteratorOfListIO.hxx"
-#include "SALOME_CubeAxesActor2D.h"
 
 #include <vtkObjectFactory.h>
 #include <vtkMath.h>
@@ -146,8 +144,6 @@ vtkStandardNewMacro(VTKViewer_InteractorStyleSALOME);
 
 VTKViewer_InteractorStyleSALOME::VTKViewer_InteractorStyleSALOME() 
 {
-  m_Trihedron = 0;
-  m_CubeAxes = 0;
   this->MotionFactor = 10.0;
   this->State = VTK_INTERACTOR_STYLE_CAMERA_NONE;
   this->RadianToDegree = 180.0 / vtkMath::Pi();
@@ -198,15 +194,6 @@ void VTKViewer_InteractorStyleSALOME::setGUIWindow(QWidget* theWindow){
   myGUIWindow = theWindow;
 }
 
-//----------------------------------------------------------------------------
-void VTKViewer_InteractorStyleSALOME::setTriedron(VTKViewer_Trihedron* theTrihedron){
-  m_Trihedron = theTrihedron;
-}
-
-void VTKViewer_InteractorStyleSALOME::setCubeAxes(SALOME_CubeAxesActor2D* theCubeAxes){
-  m_CubeAxes = theCubeAxes;
-}
-
 //----------------------------------------------------------------------------
 void VTKViewer_InteractorStyleSALOME::RotateXY(int dx, int dy)
 {
@@ -627,36 +614,6 @@ void VTKViewer_InteractorStyleSALOME::startFitArea()
 }
 
 
-//----------------------------------------------------------------------------
-void  VTKViewer_InteractorStyleSALOME::ViewFitAll() {
-  int aTriedronWasVisible = false;
-  int aCubeAxesWasVisible = false;
-  if(m_Trihedron){
-    aTriedronWasVisible = m_Trihedron->GetVisibility() == VTKViewer_Trihedron::eOn;
-    if(aTriedronWasVisible) m_Trihedron->VisibilityOff();
-  }
-  if(m_CubeAxes){
-    aCubeAxesWasVisible = m_CubeAxes->GetVisibility();
-    if(aCubeAxesWasVisible) m_CubeAxes->VisibilityOff();
-  }
-
-  if(m_Trihedron->GetVisibleActorCount(CurrentRenderer)){
-    m_Trihedron->VisibilityOff();
-    m_CubeAxes->VisibilityOff();
-    ::ResetCamera(CurrentRenderer);
-  }else{
-    m_Trihedron->SetVisibility(VTKViewer_Trihedron::eOnlyLineOn);
-    m_CubeAxes->SetVisibility(2);
-    ::ResetCamera(CurrentRenderer,true);
-  }
-  if(aTriedronWasVisible) m_Trihedron->VisibilityOn();
-  else m_Trihedron->VisibilityOff();
-  if(aCubeAxesWasVisible) m_CubeAxes->VisibilityOn();
-  else m_CubeAxes->VisibilityOff();
-  ::ResetCameraClippingRange(CurrentRenderer);
-}
-
-
 //----------------------------------------------------------------------------
 // starts Global Panning operation (e.g. through menu command)
 void VTKViewer_InteractorStyleSALOME::startGlobalPan()
@@ -673,7 +630,7 @@ void VTKViewer_InteractorStyleSALOME::startGlobalPan()
   vtkCamera *cam = this->CurrentRenderer->GetActiveCamera();
   myScale = cam->GetParallelScale();
 
-  ViewFitAll();
+  if (m_ViewFrame) m_ViewFrame->onViewFitAll();
 
   if (myGUIWindow) myGUIWindow->update();
   
index 2bb36fb4d2537e751592a194728c3321f4c001a5..1aa7382ab8eacc188ace7097b4ec695c2bb2dca3 100644 (file)
@@ -69,9 +69,6 @@ class VTKViewer_InteractorStyleSALOME : public QObject, public vtkInteractorStyl
   void setViewFrame(VTKViewer_ViewFrame* theViewFrame);
   void setGUIWindow(QWidget* theWindow);
 
-  void setTriedron(VTKViewer_Trihedron* theTrihedron);
-  void setCubeAxes(SALOME_CubeAxesActor2D* theCubeAxes);
-  
   void setPreselectionProp(const double& theRed = 0, const double& theGreen = 1,
                           const double& theBlue = 1, const int& theWidth = 5);
 
@@ -86,8 +83,6 @@ class VTKViewer_InteractorStyleSALOME : public QObject, public vtkInteractorStyl
 
   void OnSelectionModeChanged();
 
-  void  ViewFitAll();
-
   void                     SetFilter( const Handle(VTKViewer_Filter)& );
   Handle(VTKViewer_Filter) GetFilter( const int );  
   bool                     IsFilterPresent( const int );
@@ -172,8 +167,6 @@ class VTKViewer_InteractorStyleSALOME : public QObject, public vtkInteractorStyl
   
   VTKViewer_RenderWindowInteractor* m_Interactor;
   VTKViewer_ViewFrame*      m_ViewFrame;
-  VTKViewer_Trihedron*      m_Trihedron;
-  SALOME_CubeAxesActor2D*   m_CubeAxes;
   QWidget*                  myGUIWindow;
   
   std::map<int, Handle(VTKViewer_Filter)> myFilters;