Salome HOME
updated copyright message
[modules/gui.git] / src / SVTK / SVTK_Renderer.h
index edf79ada1cb9521716e3b6243326ab80cd4549db..3716f95018c7b0bac89d7e510170e7c13cc15baf 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  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
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -29,6 +29,7 @@
 
 #include "SVTK.h"
 #include "VTKViewer.h"
+#include "SALOME_ListIO.hxx"
 
 #include <vtkObject.h>
 #include <vtkSmartPointer.h>
@@ -42,7 +43,7 @@ class vtkPointPicker;
 class vtkCellPicker;
 class vtkProperty;
 
-class SVTK_RectPicker;
+class SVTK_AreaPicker;
 
 class VTKViewer_Trihedron;
 class VTKViewer_Transform;
@@ -64,7 +65,7 @@ class SVTK_Selector;
 class SVTK_EXPORT SVTK_Renderer : public vtkObject
 {
  public:
-  vtkTypeMacro(SVTK_Renderer,vtkObject);
+  vtkTypeMacro(SVTK_Renderer,vtkObject)
   static SVTK_Renderer* New();
 
   //----------------------------------------------------------------------------
@@ -130,10 +131,10 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject
 
   //! Set size of the trihedron in percents from bounding box of the scene
   void
-  SetTrihedronSize(vtkFloatingPointType theSize, const bool theRelative = true);
+  SetTrihedronSize(double theSize, const bool theRelative = true);
  
   //! Get size of the trihedron in percents from bounding box of the scene
-  vtkFloatingPointType  
+  double  
   GetTrihedronSize() const;
 
   //! Shows if the size of the trihedron is relative
@@ -153,6 +154,11 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject
   void 
   OnViewTrihedron(); 
 
+  //! Set Toggle trihedron visibility
+
+  void
+  SetTrihedronVisibility( const bool );
+
   //! Adjust size of the trihedron to the bounding box of the scene
   void 
   OnAdjustTrihedron();
@@ -177,7 +183,14 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject
   //----------------------------------------------------------------------------
   //! Fit all presentation in the scene into the window
   void OnFitAll(); 
-  
+
+  //----------------------------------------------------------------------------
+  //! Fit all selected presentation in the scene
+  void onFitSelection();
+
+  //! Fit given presentations in the scene
+  void OnFitIObjects(const SALOME_ListIO& objects);
+
   //! Set camera into predefined state
   void OnResetView(); 
 
@@ -218,7 +231,7 @@ protected:
 
   //----------------------------------------------------------------------------
   // Priority at which events are processed
-  vtkFloatingPointType myPriority;
+  double myPriority;
 
   // Used to process events
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
@@ -242,8 +255,8 @@ protected:
   vtkSmartPointer<vtkPointPicker> myPointPicker;
   vtkSmartPointer<vtkCellPicker> myCellPicker;
 
-  vtkSmartPointer<SVTK_RectPicker> myPointRectPicker;
-  vtkSmartPointer<SVTK_RectPicker> myCellRectPicker;
+  vtkSmartPointer<SVTK_AreaPicker> myPointAreaPicker;
+  vtkSmartPointer<SVTK_AreaPicker> myCellAreaPicker;
 
   vtkSmartPointer<vtkProperty> myPreHighlightProperty;
   vtkSmartPointer<vtkProperty> myHighlightProperty;
@@ -251,9 +264,9 @@ protected:
   //----------------------------------------------------------------------------
   vtkSmartPointer<SVTK_CubeAxesActor2D> myCubeAxes;
   vtkSmartPointer<VTKViewer_Trihedron> myTrihedron;  
-  vtkFloatingPointType myTrihedronSize;
+  double myTrihedronSize;
   bool myIsTrihedronRelative;
-  vtkFloatingPointType myBndBox[6];
+  double myBndBox[6];
 };
 
 #ifdef WIN32