Salome HOME
Some fixes to compile against ParaView master.
authorPascal Obry <pascal@obry.net>
Thu, 8 Sep 2022 13:18:55 +0000 (15:18 +0200)
committerjfa <jfa@opencascade.com>
Mon, 10 Oct 2022 08:50:15 +0000 (11:50 +0300)
src/SVTK/SALOME_Actor.cxx
src/SVTK/SVTK_DeviceActor.cxx
src/SVTK/SVTK_DeviceActor.h
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_OpenGLRenderer.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx
src/VTKViewer/VTKViewer_Texture.cxx
src/VTKViewer/VTKViewer_Trihedron.cxx

index de76c46055cc6a067fc9ffe451116c3926857a52..18d5406df03986e4e3b61dd45b73382faf6308e6 100644 (file)
@@ -63,7 +63,7 @@
 
 #include <vtkInteractorStyle.h>
 #include <vtkRenderWindowInteractor.h>
-#include <vtkPassThroughFilter.h>
+#include <vtkPassThrough.h>
 
 #include <TColStd_MapOfInteger.hxx>
 #include <TColStd_IndexedMapOfInteger.hxx>
index 6142443dd077a89b5556a7e1a4c548cb10fdca53..af2999e925166432497035375d64e8d0730633e6 100644 (file)
@@ -41,7 +41,7 @@
 #include <VTKViewer_PolyDataMapper.h>
 #include <VTKViewer_DataSetMapper.h>
 
-#include <vtkPassThroughFilter.h>
+#include <vtkPassThrough.h>
 
 vtkStandardNewMacro(SVTK_DeviceActor)
 
@@ -76,7 +76,7 @@ SVTK_DeviceActor
   myTransformFilter = VTKViewer_TransformFilter::New();
 
   for(int i = 0; i < 6; i++)
-    myPassFilter.push_back(vtkPassThroughFilter::New());
+    myPassFilter.push_back(vtkPassThrough::New());
 }
 
 /*!
@@ -150,7 +150,7 @@ vtkDataSet*
 SVTK_DeviceActor
 ::GetInput()
 {
-  return myPassFilter.front()->GetOutput();
+  return static_cast<vtkDataSet *>(myPassFilter.front()->GetOutput());
 }
 
 /*!
@@ -266,7 +266,7 @@ SVTK_DeviceActor
   if ( vtkAlgorithmOutput* anOutput = myPassFilter[ 0 ]->GetOutputPort() )
   {     
     myPassFilter[ 0 ]->Update();
-    if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
+    if ( vtkDataSet* aDataSet = static_cast<vtkDataSet *>( myPassFilter[ 0 ]->GetOutput() ) )
     {
       vtkIdType numCells=aDataSet->GetNumberOfCells();
       vtkIdType numPts = aDataSet->GetNumberOfPoints();
index 331c8848be58416f8fe11f723273d7e65d3c321b..a2749d030b96c755a8a3458f6c0cafc3c38c772e 100644 (file)
@@ -46,7 +46,7 @@ class vtkDataSet;
 class vtkShrinkFilter;
 class vtkFeatureEdges;
 class VTKViewer_DataSetMapper;
-class vtkPassThroughFilter;
+class vtkPassThrough;
 class vtkAlgorithmOutput;
 
 #ifdef WIN32
@@ -279,7 +279,7 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
 
   VTKViewer_GeometryFilter *myGeomFilter;
   VTKViewer_TransformFilter *myTransformFilter;
-  std::vector<vtkPassThroughFilter*> myPassFilter;
+  std::vector<vtkPassThrough*> myPassFilter;
   vtkShrinkFilter* myShrinkFilter;
   vtkFeatureEdges* myFeatureEdges;
   VTKViewer_DataSetMapper* myMapper;
index 9989dbebc04e3a5529dbf10ff3cfb8b30b00529f..1c40f660153e35236032c7aa9ff3e180eff04532 100644 (file)
@@ -42,7 +42,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkPolyDataMapper.h>
 #include <vtkRenderer.h>
-#include <vtkPassThroughFilter.h>
+#include <vtkPassThrough.h>
 
 #if defined __GNUC__
   #if __GNUC__ == 2
@@ -78,7 +78,7 @@ VTKViewer_Actor
                                                     myPolygonOffsetUnits);
 
   for(int i = 0; i < 6; i++)
-    myPassFilter.push_back(vtkPassThroughFilter::New());
+    myPassFilter.push_back(vtkPassThrough::New());
 }
 
 /*!
@@ -339,7 +339,7 @@ vtkDataSet*
 VTKViewer_Actor
 ::GetInput()
 {
-  return myPassFilter.front()->GetOutput();
+  return static_cast<vtkDataSet *>( myPassFilter.front()->GetOutput() );
 }
 
 /*!
index 4c9f73eba001d95b2b7d684bfe1a3c5c53446c5c..945135f48121340128f15c481d0f09040d401e5f 100644 (file)
@@ -46,7 +46,7 @@ class vtkDataSet;
 class vtkCamera;
 class vtkProperty;
 class vtkRenderer;
-class vtkPassThroughFilter;
+class vtkPassThrough;
 
 class VTKViewer_Transform;
 class VTKViewer_GeometryFilter;
@@ -381,7 +381,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   bool myStoreMapping;
   VTKViewer_GeometryFilter *myGeomFilter;
   VTKViewer_TransformFilter *myTransformFilter;
-  std::vector<vtkPassThroughFilter*> myPassFilter;
+  std::vector<vtkPassThrough*> myPassFilter;
 
   int myRepresentation;
   vtkProperty *myProperty;
index ee72257ec3b849b6af0a31f72eab53deeb2fbbf9..db0b092edbf90869e1ed52bca02a87e9a4be2fab 100644 (file)
@@ -219,9 +219,10 @@ VTKViewer_GeometryFilter
      vtkInformation* excInfo = inputVector[1]->GetInformationObject(0);
 
      vtkExcludedFaces exc; // Will delete exc->Links when goes out of scope
+     vtkPolyData* excFaces = nullptr;
      if (excInfo)
        {
-        vtkPolyData* excFaces = vtkPolyData::SafeDownCast(excInfo->Get(vtkDataObject::DATA_OBJECT()));
+        excFaces = vtkPolyData::SafeDownCast(excInfo->Get(vtkDataObject::DATA_OBJECT()));
         vtkCellArray* excPolys = excFaces->GetPolys();
         if (excPolys->GetNumberOfCells() > 0)
           {
@@ -233,7 +234,7 @@ VTKViewer_GeometryFilter
      switch (input->GetDataObjectType())
      {
        case VTK_POLY_DATA:
-          return this->vtkGeometryFilter::PolyDataExecute(input, output, &exc);
+          return this->vtkGeometryFilter::PolyDataExecute(input, output, excFaces);
        case VTK_UNSTRUCTURED_GRID:
          {
           vtkUnstructuredGrid* inputUnstructured = static_cast<vtkUnstructuredGrid*>(input);
@@ -282,20 +283,20 @@ VTKViewer_GeometryFilter
             if ( myStoreMapping ) {
               // pass through cell ids to get original cell ids
               this->PassThroughCellIds = true;
-              ret = this->vtkGeometryFilter::UnstructuredGridExecute(input, output, info, &exc);
+              ret = this->vtkGeometryFilter::UnstructuredGridExecute(input, output, info, excFaces);
               FillVTK2ObjIds(output);
             }
             else {
               // no need to get original cell ids
               this->PassThroughCellIds = false;
-              ret = this->vtkGeometryFilter::UnstructuredGridExecute(input, output, info, &exc);
+              ret = this->vtkGeometryFilter::UnstructuredGridExecute(input, output, info, excFaces);
             }
             return ret;
            }
          }
      }
 
-     return this->vtkGeometryFilter::DataSetExecute(input, output, &exc);
+     return this->vtkGeometryFilter::DataSetExecute(input, output, excFaces);
     }  
     else // !delegateToVtk
 #endif
index 4d5e6bbbd568f65bbdb854ae4434496acdd40032..1d409155663a00267163f4fa1494df2aaaabd266 100644 (file)
@@ -42,7 +42,7 @@
 #include <vtkPNGWriter.h>
 #include <vtkOpenGLTexture.h>
 #include <vtkTimerLog.h>
-#include <vtkOpenGL.h>
+#include <vtk_glew.h>
 #include <vtkObjectFactory.h>
 
 #include <Basics_Utils.hxx>
index fc73a00cdf90d56f9ec05293ca56119f6fb4b3ae..6629447e1b9d8901404194be9b15371b9cfb70e3 100644 (file)
@@ -359,7 +359,7 @@ void VTKViewer_RenderWindowInteractor::TimerFunc()
     return ;
   }
   
-  ((vtkInteractorStyle*)this->InteractorStyle)->OnTimer() ;
+  ((vtkInteractorStyle*)this->InteractorStyle.Get())->OnTimer() ;
   emit RenderWindowModified() ;
 }
 
index 2e67a94ef2830b68a0767c1eba13cae5ce62b11b..a105eb031890045a7e534cdeb957a97991879607 100644 (file)
@@ -38,7 +38,7 @@
 #include "vtkOpenGLRenderWindow.h"
 #include "vtkTransform.h"
 #include "vtkPixelBufferObject.h"
-#include "vtkOpenGL.h"
+#include "vtk_glew.h"
 #include <vtkObjectFactory.h>
 
 vtkStandardNewMacro(VTKViewer_Texture)
index a448144377d29eea10056b6bf842bf06927746f3..a9b5192c92dccf9e6a82f21b4341a2a42acbff47 100644 (file)
@@ -25,7 +25,6 @@
 #include "VTKViewer_Algorithm.h"
 
 // VTK Includes
-#include <vtkConfigure.h>
 #include <vtkMath.h>
 #include <vtkMapper.h>
 #include <vtkDataSet.h>