Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / OCCViewer / OCCViewer_ViewPort3d.cxx
index 1782f87852007455fdf1aa3efc1a624cf2838bb1..0ace89025e595e3354be5a7024d17fe80f65a3fc 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "OCCViewer_ViewPort3d.h"
 
 #include "QAD.h"
@@ -47,6 +46,8 @@ using namespace std;
 #include <Xw.hxx>
 #endif
 
+using namespace std;
+
 /*!
     Constructor
 */
@@ -83,8 +84,6 @@ void OCCViewer_ViewPort3d::onCreatePopup()
 {
   if ( myPopup ) {     
     QAD_Desktop*     Desktop = (QAD_Desktop*) QAD_Application::getDesktop();
-    QAD_Study*   myActiveStudy = Desktop->getActiveStudy();
-    SALOME_Selection*      Sel = SALOME_Selection::Selection( myActiveStudy->getSelection() );
     
     QString theContext;
     QString theParent("Viewer");
@@ -385,3 +384,35 @@ void OCCViewer_ViewPort3d::reset()
       myActiveView->Reset();
     }
 }
+
+/*!
+  Incremental panning
+*/
+void OCCViewer_ViewPort3d::incrementalPan( const int incrX, const int incrY )
+{
+  this->pan( incrX, incrY );
+}
+
+/*!
+  Incremental zooming
+*/
+void OCCViewer_ViewPort3d::incrementalZoom( const int incr )
+{
+  int cx = width()  / 2;
+  int cy = height() / 2;
+  this->zoom( cx, cy, cx + incr, cy + incr );
+}
+
+/*!
+  Incremental rotating
+*/
+void OCCViewer_ViewPort3d::incrementalRotate( const int incrX, const int incrY )
+{
+  int cx = width()  / 2;
+  int cy = height() / 2;
+  this->startRotation( cx, cy );
+  this->rotate( cx + incrX, cy + incrY );
+  this->endRotation();
+}
+
+