Salome HOME
PR: display submeshes and groups
[modules/smesh.git] / src / OBJECT / SMESH_ObjectDef.h
index ac0bd30c126bd4ff86cdc7f229d6dfc5efca6b60..f136c3714289f4a8a02fc5e354a9fb0b401a8fa8 100644 (file)
@@ -61,6 +61,7 @@ public:
   virtual                   ~SMESH_VisualObjDef();
   
   virtual bool              Update( int theIsClear = true ) = 0;
+  virtual bool              NulData() {return 0; };
   virtual void              UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor ) = 0;
   virtual int               GetElemDimension( const int theObjId ) = 0;
 
@@ -76,7 +77,7 @@ public:
                                           int&      theNodeId1,
                                           int&      theNodeId2 ) const;
 
-  virtual vtkUnstructuredGrid* GetUnstructuredGrid() { return myGrid; }
+  virtual vtkUnstructuredGrid* GetUnstructuredGrid();
   
   virtual vtkIdType         GetNodeObjId( int theVTKID );
   virtual vtkIdType         GetNodeVTKId( int theObjID );
@@ -85,17 +86,18 @@ public:
   
 protected:
 
-//  void                      createPoints( vtkPoints* );
-  void                      buildPrs();
-//  void                      buildNodePrs();
-//  void                      buildElemPrs();
+  void                      createPoints( vtkPoints* );
+  void                      buildPrs(bool buildGrid = false);
+  void                      buildNodePrs();
+  void                      buildElemPrs();
   
-private:                                   
+//private:
 
-//  TMapOfIds                 mySMDS2VTKNodes;
-//  TMapOfIds                 myVTK2SMDSNodes;
-//  TMapOfIds                 mySMDS2VTKElems;
-//  TMapOfIds                 myVTK2SMDSElems;
+  TMapOfIds                 mySMDS2VTKNodes;
+  TMapOfIds                 myVTK2SMDSNodes;
+  TMapOfIds                 mySMDS2VTKElems;
+  TMapOfIds                 myVTK2SMDSElems;
+  bool                      myLocalGrid;
 
   vtkUnstructuredGrid*      myGrid;
 };
@@ -114,6 +116,7 @@ public:
   virtual                   ~SMESH_MeshObj();
   
   virtual bool              Update( int theIsClear = true );
+  virtual bool              NulData();
   
   virtual int               GetNbEntities( const SMDSAbs_ElementType) const;
   virtual int               GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
@@ -128,6 +131,7 @@ public:
 
 protected:
   SMESH_Client              myClient;
+  vtkUnstructuredGrid*      myEmptyGrid;
 };