]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for Bug NPAL16814
authorapo <apo@opencascade.com>
Mon, 8 Oct 2007 08:14:35 +0000 (08:14 +0000)
committerapo <apo@opencascade.com>
Mon, 8 Oct 2007 08:14:35 +0000 (08:14 +0000)
  SIGSEGV on animation when field name is long
(final version)

src/VTKViewer/VTKViewer_ConvexTool.h

index 46f5cdf6e59e412cb5006e5e3eee64cc15e5da01..5e391d976af4cc0667d687c10e8f5a82ac4cc132 100644 (file)
@@ -40,6 +40,8 @@ class vtkCellArray;
 class vtkTriangle;
 class vtkOrderedTriangulator;
 
+
+//----------------------------------------------------------------------------
 class VTKVIEWER_EXPORT VTKViewer_Triangulator
 {
  public:
@@ -60,51 +62,48 @@ class VTKVIEWER_EXPORT VTKViewer_Triangulator
          std::vector<vtkIdType>& theVTK2ObjIds,
          bool theIsCheckConvex);
 
- protected:
+ private:
   vtkIdList* myCellIds;
 
-  vtkUnstructuredGrid *myInput;
-  vtkIdType myCellId;
-  int myShowInside;
-  int myAllVisible;
-  const char* myCellsVisibility;
+ protected:
+  vtkIdType *myPointIds;
+  vtkIdList* myFaceIds;
+  vtkPoints* myPoints;
 
   virtual
   vtkPoints* 
-  InitPoints() = 0;
+  InitPoints(vtkUnstructuredGrid *theInput,
+            vtkIdType theCellId);
 
   virtual
   vtkIdType 
-  GetNbOfPoints() = 0;
+  GetNumFaces() = 0;
 
   virtual
-  vtkIdType 
-  GetPointId(vtkIdType thePointId) = 0;
+  vtkCell* 
+  GetFace(vtkIdType theFaceId) = 0;
 
-  virtual
-  vtkFloatingPointType 
-  GetCellLength() = 0;
+  vtkIdType 
+  GetNbOfPoints();
 
-  virtual
   vtkIdType 
-  GetNumFaces() = 0;
+  GetPointId(vtkIdType thePointId);
 
-  virtual
-  vtkCell* 
-  GetFace(vtkIdType theFaceId) = 0;
+  vtkFloatingPointType 
+  GetCellLength();
 
-  virtual
   void 
-  GetCellNeighbors(vtkIdType theCellId,
+  GetCellNeighbors(vtkUnstructuredGrid *theInput,
+                  vtkIdType theCellId,
                   vtkCell* theFace,
-                  vtkIdList* theCellIds) = 0;
+                  vtkIdList* theCellIds);
 
-  virtual
   vtkIdType 
-  GetConnectivity(vtkIdType thePntId) = 0;
+  GetConnectivity(vtkIdType thePntId);
 };
 
 
+//----------------------------------------------------------------------------
 class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangulator
 {
  public:
@@ -114,25 +113,14 @@ class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangul
   ~VTKViewer_OrderedTriangulator();
 
  protected:
-  vtkGenericCell         *myCell;
-  vtkCellArray           *myBoundaryTris;
-  vtkTriangle            *myTriangle;
   vtkOrderedTriangulator *myTriangulator;
+  vtkCellArray *myBoundaryTris;
+  vtkTriangle  *myTriangle;
 
   virtual
   vtkPoints* 
-  InitPoints();
-
-  virtual
-  vtkIdType 
-  GetNbOfPoints();
-
-  vtkIdType 
-  GetPointId(vtkIdType thePointId);
-
-  virtual
-  vtkFloatingPointType 
-  GetCellLength();
+  InitPoints(vtkUnstructuredGrid *theInput,
+            vtkIdType theCellId);
 
   virtual
   vtkIdType 
@@ -141,19 +129,10 @@ class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangul
   virtual
   vtkCell* 
   GetFace(vtkIdType theFaceId);
-
-  virtual
-  void 
-  GetCellNeighbors(vtkIdType theCellId,
-                  vtkCell* theFace,
-                  vtkIdList* theCellIds);
-
-  virtual
-  vtkIdType 
-  GetConnectivity(vtkIdType thePntId);
 };
 
 
+//----------------------------------------------------------------------------
 class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangulator
 {
  public:
@@ -167,24 +146,11 @@ class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangu
   vtkGeometryFilter* myGeometryFilter;
   vtkDelaunay3D* myDelaunay3D;
   vtkPolyData* myPolyData;
-  vtkIdType *myPointIds;
-  vtkIdList* myFaceIds;
-  vtkPoints* myPoints;
 
   virtual
   vtkPoints* 
-  InitPoints();
-
-  virtual
-  vtkIdType 
-  GetNbOfPoints();
-
-  vtkIdType 
-  GetPointId(vtkIdType thePointId);
-
-  virtual
-  vtkFloatingPointType 
-  GetCellLength();
+  InitPoints(vtkUnstructuredGrid *theInput,
+            vtkIdType theCellId);
 
   virtual
   vtkIdType 
@@ -193,16 +159,6 @@ class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangu
   virtual
   vtkCell* 
   GetFace(vtkIdType theFaceId);
-
-  virtual
-  void 
-  GetCellNeighbors(vtkIdType theCellId,
-                  vtkCell* theFace,
-                  vtkIdList* theCellIds);
-
-  virtual
-  vtkIdType 
-  GetConnectivity(vtkIdType thePntId);
 };