Salome HOME
updated copyright message
[modules/gui.git] / src / SVTK / SVTK_DeviceActor.cxx
index 8fefd95a8de2f810a978a6a197dbf03356b55418..351508a6eb38f180b868f2804ca510c060f57300 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  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
@@ -41,9 +41,9 @@
 #include <VTKViewer_PolyDataMapper.h>
 #include <VTKViewer_DataSetMapper.h>
 
-#include <vtkPassThroughFilter.h>
+#include <vtkPassThrough.h>
 
-vtkStandardNewMacro(SVTK_DeviceActor);
+vtkStandardNewMacro(SVTK_DeviceActor)
 
 /*!
   Constructor
@@ -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());
 }
 
 /*!
@@ -97,7 +97,7 @@ SVTK_DeviceActor
 
   myFeatureEdges->Delete();
 
-  for(int i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
+  for(size_t i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
     myPassFilter[i]->Delete();
 }
 
@@ -150,7 +150,7 @@ vtkDataSet*
 SVTK_DeviceActor
 ::GetInput()
 {
-  return myPassFilter.front()->GetOutput();
+  return static_cast<vtkDataSet *>(myPassFilter.front()->GetOutput());
 }
 
 /*!
@@ -205,7 +205,7 @@ SVTK_DeviceActor
   if(myIsFeatureEdgesEnabled)
     mTime = std::max(mTime,myFeatureEdges->GetMTime());
 
-  for(int i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
+  for(size_t i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
     std::max(mTime,myPassFilter[i]->GetMTime());
 
   return mTime;
@@ -266,10 +266,10 @@ 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() ) )
     {
-      int numCells=aDataSet->GetNumberOfCells();
-      int numPts = aDataSet->GetNumberOfPoints();
+      vtkIdType numCells=aDataSet->GetNumberOfCells();
+      vtkIdType numPts = aDataSet->GetNumberOfPoints();
       //It's impossible to use to apply "shrink" for "empty" dataset
       if (numCells < 1 || numPts < 1)
         return;
@@ -576,9 +576,9 @@ SVTK_DeviceActor
 /*!
   Maps VTK index of a node to corresponding object index
 */
-int
+vtkIdType
 SVTK_DeviceActor
-::GetNodeObjId(int theVtkID)
+::GetNodeObjId(vtkIdType theVtkID)
 {
   return theVtkID;
 }
@@ -588,7 +588,7 @@ SVTK_DeviceActor
 */
 double* 
 SVTK_DeviceActor
-::GetNodeCoord(int theObjID)
+::GetNodeCoord(vtkIdType theObjID)
 {
   return GetInput()->GetPoint(theObjID);
 }
@@ -599,7 +599,7 @@ SVTK_DeviceActor
 */
 vtkCell* 
 SVTK_DeviceActor
-::GetElemCell(int theObjID)
+::GetElemCell(vtkIdType theObjID)
 {
   return GetInput()->GetCell(theObjID);
 }
@@ -607,9 +607,9 @@ SVTK_DeviceActor
 /*!
   Maps VTK index of a cell to corresponding object index
 */
-int
+vtkIdType
 SVTK_DeviceActor
-::GetElemObjId(int theVtkID) 
+::GetElemObjId(vtkIdType theVtkID) 
 { 
   return theVtkID;
 }