Salome HOME
This commit was generated by cvs2git to create branch 'IMPORT'.
[modules/smesh.git] / src / OBJECT / SMESH_Grid.h
1 //  File      : SMESH_Grid.h
2 //  Created   : Fri Sep 27 15:30:51 2002
3 //  Author    : Nicolas REJNERI
4
5 //  Project   : SALOME
6 //  Module    : SMESH
7 //  Copyright : Open CASCADE 2002
8 //  $Header$
9
10
11 #ifndef SMESH_GRID_H
12 #define SMESH_GRID_H
13
14 // VTK Includes
15 #include <vtkUnstructuredGrid.h>
16
17 // Open CASCADE Includes
18 #include <TColStd_DataMapOfIntegerInteger.hxx>
19
20 class SMESH_Grid : public vtkUnstructuredGrid {
21
22  public:
23   vtkTypeMacro(SMESH_Grid, vtkUnstructuredGrid);
24
25   static SMESH_Grid* New();
26
27   void ClearNode();
28   void ClearElement();
29
30   void RemoveNode(int idSMESHDSnode);
31   void RemoveElement(int idSMESHDSelement);
32
33   void AddNode(int idSMESHDSnode, int idVTKnode);
34   void AddElement(int idSMESHDSelement, int idVTKelement);
35
36   int GetIdVTKNode(int idSMESHDSnode);
37   int GetIdVTKElement(int idSMESHDSelement);
38
39   int GetIdSMESHDSNode(int idVTKnode);
40   int GetIdSMESHDSElement(int idVTKelement);
41
42   void SetIdsVTKNode(const TColStd_DataMapOfIntegerInteger& mapVTK);
43   void SetIdsSMESHDSNode(const TColStd_DataMapOfIntegerInteger& mapSMESHDS);
44
45   void SetIdsVTKElement(const TColStd_DataMapOfIntegerInteger& mapVTK);
46   void SetIdsSMESHDSElement(const TColStd_DataMapOfIntegerInteger& mapSMESHDS);
47
48   virtual void DeepCopy (vtkDataObject *src);
49   void CopyMaps(SMESH_Grid *src);
50
51  protected:
52   SMESH_Grid() : vtkUnstructuredGrid() {};
53
54   TColStd_DataMapOfIntegerInteger myMapNodeVTKtoSMDS;
55   TColStd_DataMapOfIntegerInteger myMapNodeSMDStoVTK;
56
57   TColStd_DataMapOfIntegerInteger myMapElementVTKtoSMDS;
58   TColStd_DataMapOfIntegerInteger myMapElementSMDStoVTK;
59 };
60
61 #endif