]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
VTKViewer: node, cell to vtkIdType
authorViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Tue, 9 Feb 2021 07:13:09 +0000 (10:13 +0300)
committerViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Tue, 9 Feb 2021 07:13:09 +0000 (10:13 +0300)
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h
src/VTKViewer/VTKViewer_Filter.cxx
src/VTKViewer/VTKViewer_Filter.h
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_GeometryFilter.h
src/VTKViewer/VTKViewer_InteractorStyle.cxx
src/VTKViewer/VTKViewer_InteractorStyle.h
src/VTKViewer/VTKViewer_ShrinkFilter.cxx
src/VTKViewer/VTKViewer_ShrinkFilter.h

index 49e98cbac058150fb09a540442172119bca1d6dc..b63ee8146d5bf0a932c3649e745c561d0e0d3210 100644 (file)
@@ -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;
 }
index 805eaca23dcb7958f39ba4f5f97a2d439d4da3e7..dd37acc9621259232e5e12a5c59b57e15806f284 100644 (file)
@@ -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
index 8a0e4f5628f0f9b067efbd260e29df76d09dab3f..cbf29f45383328fd6990fdf5c22cec793b6dbe37 100644 (file)
@@ -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 );
index 4dd15b106f8a96c59bce2ef7f8a692ba115ab96c..4153b388bece2f9ad9b5a6875075efa635be4edb 100644 (file)
@@ -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;
 
index a4ce3be23c0d5b1610d4e8dea2cb11144fbc2001..a7e6717c34f29a47e31ba1cb2ebb00e93a29fd41 100644 (file)
@@ -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];
 }
index 9a641896f382353d592089a8f20b43940d8927e0..87af7952b28eef9c1038601b1c69c787ea142941 100644 (file)
@@ -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;
index 0a74de2ef24ba0bf49d95632123e8265a2e7c824..827d0e3e669fefeceef71284413e3835d15d106c 100644 (file)
@@ -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<int, Handle(VTKViewer_Filter)>::const_iterator anIter;
index 8a2fe13f77c2a726f798937ca329ba785d81c4d7..ff9515fb5418c742cbe1e0fe6f17381a0c6583b4 100644 (file)
@@ -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);
index 9d7d8d6a3051e6f04aa867813a0fe3641bf03efc..114bf50b295efb311d3733d89a2673fc61372ba2 100644 (file)
@@ -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);
 }
index b19c19a84b3e839054c45e76f96afd2ee4b70f13..62321d26744475a1ef51cc617944a16b4216727a 100644 (file)
@@ -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();