X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_IdPreview.h;h=dd87a7caf8bb3ea5e4a9ea6a8fbac0e2c8c3d292;hp=6c72b1fd545d92d56d1f6b837e863842ef31c14a;hb=53cfbcdd3398697cb1581f0dcd92fb3cd7805fc3;hpb=6883e45c6b4bf088fa71d0299d3a35383f283fbe diff --git a/src/SMESHGUI/SMESHGUI_IdPreview.h b/src/SMESHGUI/SMESHGUI_IdPreview.h index 6c72b1fd5..dd87a7caf 100644 --- a/src/SMESHGUI/SMESHGUI_IdPreview.h +++ b/src/SMESHGUI/SMESHGUI_IdPreview.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -29,6 +29,7 @@ #include #include +#include #include @@ -46,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 & theElemsIdMap, const std::list & theGrCentersXYZ ); + template< class INT_ITER, class XYZ_ITER > + void SetElemsData ( INT_ITER theElemsBegin, INT_ITER theElemsEnd, + XYZ_ITER theGrCentersBegin, XYZ_ITER theGrCentersEnd ) + { + std::vector elemsIds( theElemsBegin, theElemsEnd ); + std::list gcXYZ( theGrCentersBegin, theGrCentersEnd ); + SetElemsData( elemsIds, gcXYZ ); + } void SetPointsLabeled( bool theIsPointsLabeled, bool theIsActorVisible = true ); void AddToRender ( vtkRenderer* theRenderer );