Salome HOME
Update of CheckDone
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_IdPreview.h
index ac547ee4c3258f9a6c66dc855876fccffc00cfb0..a3a03de26a5908d74c1d57ccd28affe932ff1fe8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 #include <list>
 #include <vector>
 
+#include <TColStd_MapOfInteger.hxx>
+#include <SVTK_Hash.h>
+
 #include <gp_XYZ.hxx>
 
 class SALOME_Actor;
 class SMDS_Mesh;
 class SVTK_ViewWindow;
-class TColStd_MapOfInteger;
 class vtkActor2D;
 class vtkLabeledDataMapper;
 class vtkMaskPoints;
@@ -45,15 +47,23 @@ class vtkUnstructuredGrid;
 /*!
  * \brief To display in the viewer IDs of selected elements or nodes
  */
-class SMESHGUI_IdPreview
+class SMESHGUI_EXPORT SMESHGUI_IdPreview
 {
 public:
   SMESHGUI_IdPreview(SVTK_ViewWindow* theViewWindow);
   ~SMESHGUI_IdPreview();
 
-  void SetPointsData( SMDS_Mesh* theMesh, const TColStd_MapOfInteger & theNodesIdMap );
+  void SetPointsData( SMDS_Mesh* theMesh, const SVTK_TVtkIDsMap & theNodesIdMap );
   void SetElemsData ( const std::vector<int> &  theElemsIdMap,
                       const std::list<gp_XYZ> & theGrCentersXYZ );
+  template< class INT_ITER, class XYZ_ITER >
+  void SetElemsData ( INT_ITER theElemsBegin, INT_ITER theElemsEnd,
+                      XYZ_ITER theGrCentersBegin, XYZ_ITER theGrCentersEnd )
+  {
+    std::vector<int> elemsIds( theElemsBegin, theElemsEnd );
+    std::list<gp_XYZ> gcXYZ( theGrCentersBegin, theGrCentersEnd );
+    SetElemsData( elemsIds, gcXYZ );
+  }
   void SetPointsLabeled( bool theIsPointsLabeled, bool theIsActorVisible = true );
 
   void AddToRender     ( vtkRenderer* theRenderer );