Salome HOME
Copyright update 2022
[modules/gui.git] / src / VTKViewer / VTKViewer_GeometryFilter.h
old mode 100755 (executable)
new mode 100644 (file)
index e2420fe..c86b59c
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  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
@@ -48,7 +48,7 @@ public:
   /*! \fn vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
    *  \brief VTK type revision macros.
    */
-  vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter);
+  vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
   /*! \fn void SetInside(int theShowInside)
    * \brief Sets \a myShowInside flag. \a myShowInside is changed, call this->Modified().
    * \param theShowInside - used for changing value of \a myShowInside variable.
@@ -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;
@@ -112,7 +112,7 @@ public:
 
   static void InsertId( const vtkIdType theCellId,
                         const vtkIdType theCellType,
-                        TVectorId& theVTK2ObjIds,
+                        TVectorId& /*theVTK2ObjIds*/,
                         TMapOfVectorId& theDimension2VTK2ObjIds );
 
 protected:
@@ -125,12 +125,12 @@ protected:
    */
   ~VTKViewer_GeometryFilter();
 
-  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
 
   //special cases for performance
   
   /*! \fn void UnstructuredGridExecute();
-   * \brief Filter culculation method for data object type is VTK_UNSTRUCTURED_GRID.
+   * \brief Filter calculation method for data object type is VTK_UNSTRUCTURED_GRID.
    */
   int UnstructuredGridExecute (vtkDataSet *, vtkPolyData *, vtkInformation *);
 
@@ -140,6 +140,15 @@ protected:
                          vtkPolyData *output,
                          TMapOfVectorId& theDimension2VTK2ObjIds,
                          bool triangulate = false);
+
+  /*! \fn void FillVTK2ObjIds(vtkPolyData *output);
+   * \brief fill myVTK2ObjIds to get the correspondence between vtk ids (displayed edges and faces
+   * computed in vtkGeometryFilter::UnstructuredGridExecute) and original cell ids (mesh cells)
+   */
+  void FillVTK2ObjIds(vtkPolyData *output);
+
+  // Delegate VTKViewer_GeometryFilter::UnstructuredGridExecute to vtkGeometryFilter::UnstructuredGridExecute
+  bool delegateToVtk = false;
     
 private:
   TVectorId myVTK2ObjIds;
@@ -148,7 +157,7 @@ private:
   int       myIsWireframeMode;
   int       myAppendCoincident3D;
 
-  double    myMaxArcAngle;   // define max angle for mesh 2D quadratic element in the degrees
+  double    myMaxArcAngle;    // define max angle for mesh 2D quadratic element in the degrees
   bool      myIsBuildArc;     // flag for representation 2D quadratic element as arked polygon
 };