-class SMESH_VisualObj
-{
-protected:
-
- typedef std::list<const SMDS_MeshElement*> TEntityList;
- typedef std::map<vtkIdType,vtkIdType> TMapOfIds;
-
-public:
- SMESH_VisualObj();
- virtual ~SMESH_VisualObj();
-
- virtual void Update( int theIsClear = true ) = 0;
- virtual void UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor ) = 0;
- virtual int GetElemDimension( const int theObjId ) = 0;
-
- virtual int GetNbEntities( const SMESH::ElementType) const = 0;
- virtual int GetEntities( const SMESH::ElementType, TEntityList& ) const = 0;
- virtual bool IsNodePrs() const = 0;
- virtual SMDS_Mesh* GetMesh() const = 0;
-
- bool GetEdgeNodes( const int theElemId,
- const int theEdgeNum,
- int& theNodeId1,
- int& theNodeId2 ) const;
-
- vtkUnstructuredGrid* GetUnstructuredGrid() { return myGrid; }
-
- vtkIdType GetNodeObjId( int theVTKID );
- vtkIdType GetNodeVTKId( int theObjID );
- vtkIdType GetElemObjId( int theVTKID );
- vtkIdType GetElemVTKId( int theObjID );
-
-protected:
-
- void createPoints( vtkPoints* );
- void buildPrs();
- void buildNodePrs();
- void buildElemPrs();
-
-private:
-
- TMapOfIds mySMDS2VTKNodes;
- TMapOfIds myVTK2SMDSNodes;
- TMapOfIds mySMDS2VTKElems;
- TMapOfIds myVTK2SMDSElems;
-
- vtkUnstructuredGrid* myGrid;
-};
-
-
-/*
- Class : SMESH_MeshObj
- Description : Class for visualisation of mesh
-*/
-
-class SMESH_MeshObj: public SMESH_VisualObj
-{
-public:
-
- SMESH_MeshObj( SMESH::SMESH_Mesh_ptr );
- virtual ~SMESH_MeshObj();
-
- virtual void Update( int theIsClear = true );
-
- virtual int GetNbEntities( const SMESH::ElementType) const;
- virtual int GetEntities( const SMESH::ElementType, TEntityList& ) const;
- virtual bool IsNodePrs() const;
-
- virtual int GetElemDimension( const int theObjId );
-
- virtual void UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor );
-
- SMESH::SMESH_Mesh_ptr GetMeshServer() { return myMeshServer.in(); }
- SMDS_Mesh* GetMesh() const { return myMesh; }
-
-protected:
-
- SMESH::SMESH_Mesh_var myMeshServer;
- SMDS_Mesh* myMesh;
-};
-
-
-/*
- Class : SMESH_SubMeshObj
- Description : Base class for visualisation of submeshes and groups
-*/
-
-class SMESH_SubMeshObj: public SMESH_VisualObj