Salome HOME
Migration to OpenCASCADE CMake configuration
[modules/gui.git] / src / SVTK / SVTK_ViewWindow.h
index ea6f672369d9060d1c926d6c81af21f520ab047b..d43e7678376e82f04da6bab8c9e336dda19ef865 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -230,6 +230,15 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow
   //! Set current projection mode
   virtual void SetProjectionMode( const int );
 
+  //! Sets stereo type
+  virtual void SetStereoType( const int );
+
+  //! Sets anaglyph filter
+  virtual void SetAnaglyphFilter( const int );
+
+  //! Set support quad-buffered stereo
+  virtual void SetQuadBufferSupport( const bool );
+
   //! Set interactive style
   virtual void SetInteractionStyle( const int );
 
@@ -309,7 +318,9 @@ public slots:
   void activatePanning(); 
   void activateGlobalPanning(); 
 
-  void onPerspectiveMode();
+  void onProjectionMode( QAction* theAction );
+  void onStereoMode( bool activate );
+  void onProjectionMode();
 
   void activateProjectionMode(int);
 
@@ -367,6 +378,9 @@ public slots:
   //! Redirect the request to #SVTK_Renderer::OnFitAll
   virtual void onFitAll();
 
+  //! Redirect the request to #SVTK_Renderer::OnFitSelection
+  virtual void onFitSelection();
+
   //! Redirect the request to #SVTK_Renderer::OnViewTrihedron
   virtual void onViewTrihedron(bool); 
 
@@ -390,6 +404,13 @@ protected slots:
   void onMouseReleased(QMouseEvent* event);
   void onMouseMoving(QMouseEvent* event);
 
+public:
+  enum ProjectionType { Parallel, Projection, Stereo };
+
+  enum StereoType { CrystalEyes, RedBlue, Interlaced, Left, Right, Dresden, Anaglyph, Checkerboard, SplitViewPortHorizontal };
+
+  enum AnaglyphFilter { RedCyan, YellowBlue, GreenMagenta };
+
 protected:
   virtual void Initialize(SVTK_View* theView,
                           SVTK_ViewModelBase* theModel);
@@ -400,6 +421,8 @@ protected:
                             void* clientdata,
                             void* calldata);
 
+  bool isOpenGlStereoSupport() const;
+
   void doSetVisualParameters( const QString&, bool = false );
   void SetEventDispatcher(vtkObject* theDispatcher);
 
@@ -414,11 +437,11 @@ protected:
   void createToolBar();
   void createActions(SUIT_ResourceMgr* theResourceMgr);
 
-  enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, 
+  enum { DumpId, FitAllId, FitRectId, FitSelectionId, ZoomId, PanId, GlobalPanId,
          ChangeRotationPointId, RotationId,
          FrontId, BackId, TopId, BottomId, LeftId, RightId, ClockWiseId, AntiClockWiseId, ResetId,
-        ViewTrihedronId, NonIsometric, GraduatedAxes, UpdateRate,
-         ParallelModeId, ProjectionModeId, ViewParametersId, SynchronizeId, SwitchInteractionStyleId,
+         ViewTrihedronId, NonIsometric, GraduatedAxes, UpdateRate,
+         ParallelModeId, ProjectionModeId, StereoModeId, ViewParametersId, SynchronizeId, SwitchInteractionStyleId,
          SwitchZoomingStyleId, 
         PreselectionId, StandardPreselectionId, DynamicPreselectionId, DisablePreselectionId, 
         EnableSelectionId,