From 578768ed12d8736554d6f4188f498ce99882230a Mon Sep 17 00:00:00 2001 From: Viktor UZLOV Date: Tue, 9 Feb 2021 10:13:09 +0300 Subject: [PATCH] VTKViewer: node, cell to vtkIdType --- src/VTKViewer/VTKViewer_Actor.cxx | 10 +++++----- src/VTKViewer/VTKViewer_Actor.h | 10 +++++----- src/VTKViewer/VTKViewer_Filter.cxx | 2 +- src/VTKViewer/VTKViewer_Filter.h | 4 ++-- src/VTKViewer/VTKViewer_GeometryFilter.cxx | 4 ++-- src/VTKViewer/VTKViewer_GeometryFilter.h | 4 ++-- src/VTKViewer/VTKViewer_InteractorStyle.cxx | 2 +- src/VTKViewer/VTKViewer_InteractorStyle.h | 6 +++--- src/VTKViewer/VTKViewer_ShrinkFilter.cxx | 4 ++-- src/VTKViewer/VTKViewer_ShrinkFilter.h | 4 ++-- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index 49e98cbac..b63ee8146 100644 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -435,7 +435,7 @@ VTKViewer_Actor */ int VTKViewer_Actor -::GetNodeObjId(int theVtkID) +::GetNodeObjId(vtkIdType theVtkID) { return theVtkID; } @@ -445,7 +445,7 @@ VTKViewer_Actor */ double* VTKViewer_Actor -::GetNodeCoord(int theObjID) +::GetNodeCoord(vtkIdType theObjID) { return GetInput()->GetPoint(theObjID); } @@ -455,7 +455,7 @@ VTKViewer_Actor */ int VTKViewer_Actor -::GetNodeVtkId( int theObjID ) +::GetNodeVtkId( vtkIdType theObjID ) { return theObjID; } @@ -466,7 +466,7 @@ VTKViewer_Actor */ vtkCell* VTKViewer_Actor -::GetElemCell(int theObjID) +::GetElemCell(vtkIdType theObjID) { return GetInput()->GetCell(theObjID); } @@ -476,7 +476,7 @@ VTKViewer_Actor */ int VTKViewer_Actor -::GetElemObjId(int theVtkID) +::GetElemObjId(vtkIdType theVtkID) { return theVtkID; } diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index 805eaca23..dd37acc96 100644 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -139,27 +139,27 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //! Maps VTK index of a node to corresponding object index virtual int - GetNodeObjId(int theVtkID); + GetNodeObjId(vtkIdType theVtkID); //! Get coordinates of a node for given object index virtual double* - GetNodeCoord(int theObjID); + GetNodeCoord(vtkIdType theObjID); //! Maps object index of a node to corresponding VTK index virtual int - GetNodeVtkId(int theObjID); + GetNodeVtkId(vtkIdType theObjID); //! Maps VTK index of a cell to corresponding object index virtual int - GetElemObjId(int theVtkID); + GetElemObjId(vtkIdType theVtkID); //! Get corresponding #vtkCell for given object index virtual vtkCell* - GetElemCell(int theObjID); + GetElemCell(vtkIdType theObjID); //---------------------------------------------------------------------------- //! Get dimension of corresponding mesh element diff --git a/src/VTKViewer/VTKViewer_Filter.cxx b/src/VTKViewer/VTKViewer_Filter.cxx index 8a0e4f562..cbf29f453 100644 --- a/src/VTKViewer/VTKViewer_Filter.cxx +++ b/src/VTKViewer/VTKViewer_Filter.cxx @@ -51,7 +51,7 @@ VTKViewer_Filter::~VTKViewer_Filter() * \param theCellId - cell id. * \retval \c true - if cell id is valid, else \c false. */ -bool VTKViewer_Filter::IsValid( VTKViewer_Actor* theActor, const int theCellId ) +bool VTKViewer_Filter::IsValid( VTKViewer_Actor* theActor, const vtkIdType theCellId ) { SetActor( theActor ); return IsValid( theCellId ); diff --git a/src/VTKViewer/VTKViewer_Filter.h b/src/VTKViewer/VTKViewer_Filter.h index 4dd15b106..4153b388b 100644 --- a/src/VTKViewer/VTKViewer_Filter.h +++ b/src/VTKViewer/VTKViewer_Filter.h @@ -50,8 +50,8 @@ public: VTKVIEWER_EXPORT VTKViewer_Filter(); VTKVIEWER_EXPORT virtual ~VTKViewer_Filter(); - VTKVIEWER_EXPORT bool IsValid( VTKViewer_Actor*, const int theId ); - VTKVIEWER_EXPORT virtual bool IsValid( const int theId ) const = 0; + VTKVIEWER_EXPORT bool IsValid( VTKViewer_Actor*, const vtkIdType theId ); + VTKVIEWER_EXPORT virtual bool IsValid( const vtkIdType theId ) const = 0; VTKVIEWER_EXPORT virtual int GetId() const = 0; VTKVIEWER_EXPORT virtual bool IsNodeFilter() const = 0; diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index a4ce3be23..a7e6717c3 100644 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -1315,9 +1315,9 @@ VTKViewer_GeometryFilter } -vtkIdType VTKViewer_GeometryFilter::GetElemObjId( int theVtkID ) +vtkIdType VTKViewer_GeometryFilter::GetElemObjId( vtkIdType theVtkID ) { - if( theVtkID < 0 || theVtkID >= (int)myVTK2ObjIds.size() ) + if( theVtkID < 0 || theVtkID >= (vtkIdType)myVTK2ObjIds.size() ) return -1; return myVTK2ObjIds[theVtkID]; } diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.h b/src/VTKViewer/VTKViewer_GeometryFilter.h index 9a641896f..87af7952b 100644 --- a/src/VTKViewer/VTKViewer_GeometryFilter.h +++ b/src/VTKViewer/VTKViewer_GeometryFilter.h @@ -93,12 +93,12 @@ public: * \brief Return input value theVtkID * \retval theVtkID */ - virtual vtkIdType GetNodeObjId(int theVtkID) { return theVtkID;} + virtual vtkIdType GetNodeObjId(vtkIdType theVtkID) { return theVtkID;} /*! \fn virtual vtkIdType GetElemObjId(int theVtkID); * \brief Return object ID by VTK ID cell * \retval myVTK2ObjIds[theVtkID] */ - virtual vtkIdType GetElemObjId(int theVtkID); + virtual vtkIdType GetElemObjId(vtkIdType theVtkID); virtual void SetQuadraticArcMode(bool theFlag); virtual bool GetQuadraticArcMode() const; diff --git a/src/VTKViewer/VTKViewer_InteractorStyle.cxx b/src/VTKViewer/VTKViewer_InteractorStyle.cxx index 0a74de2ef..827d0e3e6 100644 --- a/src/VTKViewer/VTKViewer_InteractorStyle.cxx +++ b/src/VTKViewer/VTKViewer_InteractorStyle.cxx @@ -1485,7 +1485,7 @@ void VTKViewer_InteractorStyle::RemoveFilter( const int theId ) *\param theIsNode - boolean flag, if \c true - node, else - cell. */ bool VTKViewer_InteractorStyle::IsValid( VTKViewer_Actor* theActor, - const int theId, + const vtkIdType theId, const bool theIsNode ) { std::map::const_iterator anIter; diff --git a/src/VTKViewer/VTKViewer_InteractorStyle.h b/src/VTKViewer/VTKViewer_InteractorStyle.h index 8a2fe13f7..ff9515fb5 100644 --- a/src/VTKViewer/VTKViewer_InteractorStyle.h +++ b/src/VTKViewer/VTKViewer_InteractorStyle.h @@ -101,7 +101,7 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt bool IsFilterPresent( const int ); void RemoveFilter( const int ); bool IsValid( VTKViewer_Actor* theActor, - const int theId, + const vtkIdType theId, const bool theIsNode = false ); void IncrementalPan ( const int incrX, const int incrY ); @@ -140,9 +140,9 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt VTKViewer_Actor *myPreViewActor, *myPreSelectionActor, *mySelectedActor; - int myElemId; + vtkIdType myElemId; int myEdgeId; - int myNodeId; + vtkIdType myNodeId; public: bool eventFilter(QObject* object, QEvent* event); diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx index 9d7d8d6a3..114bf50b2 100644 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx @@ -178,9 +178,9 @@ void VTKViewer_ShrinkFilter::SetStoreMapping(int theStoreMapping){ /*!Return node object id by vtk node id. *\retval -1 - if no object, else return id. */ -vtkIdType VTKViewer_ShrinkFilter::GetNodeObjId(int theVtkID) +vtkIdType VTKViewer_ShrinkFilter::GetNodeObjId(vtkIdType theVtkID) { - if ( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() ) + if ( myVTK2ObjIds.empty() || theVtkID > (vtkIdType)myVTK2ObjIds.size() ) return -1; return myVTK2ObjIds.at(theVtkID); } diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.h b/src/VTKViewer/VTKViewer_ShrinkFilter.h index b19c19a84..62321d267 100644 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.h +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.h @@ -47,9 +47,9 @@ public: /*!Gets store mapping flag.*/ int GetStoreMapping(){ return myStoreMapping;} - virtual vtkIdType GetNodeObjId(int theVtkID); + virtual vtkIdType GetNodeObjId(vtkIdType theVtkID); /*!Return element id by vtk id.*/ - virtual vtkIdType GetElemObjId(int theVtkID) { return theVtkID;} + virtual vtkIdType GetElemObjId(vtkIdType theVtkID) { return theVtkID;} protected: VTKViewer_ShrinkFilter(); -- 2.39.2