#include <vtkInteractorStyle.h>
#include <vtkRenderWindowInteractor.h>
+#include <vtkUnstructuredGrid.h>
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
{
myHighlightActor->SetProperty(theProperty);
}
+
+void
+SALOME_Actor
+::MapCells(const TColStd_IndexedMapOfInteger& theMapIndex,
+ vtkUnstructuredGrid* theUG)
+{
+ int aNbOfParts = theMapIndex.Extent();
+ for(int ind = 1; ind <= aNbOfParts; ind++){
+ int aPartId = theMapIndex( ind );
+ if(vtkCell* aCell = GetElemCell(aPartId))
+ theUG->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
+ }
+}
\ No newline at end of file
class vtkOutlineSource;
class vtkInteractorStyle;
class vtkRenderWindowInteractor;
+class vtkUnstructuredGrid;
class SVTK_Actor;
class SVTK_RectPicker;
void
SetHighlightProperty(vtkProperty* theProperty);
+ virtual void MapCells(const TColStd_IndexedMapOfInteger& theMapIndex,
+ vtkUnstructuredGrid* theUG);
+
protected:
//----------------------------------------------------------------------------
vtkRenderWindowInteractor* myInteractor;
vtkDataSet *aSourceDataSet = theMapActor->GetInput();
CopyPoints(GetSource(),aSourceDataSet);
- int aNbOfParts = theMapIndex.Extent();
- for(int ind = 1; ind <= aNbOfParts; ind++){
- int aPartId = theMapIndex( ind );
- if(vtkCell* aCell = theMapActor->GetElemCell(aPartId))
- myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
- }
+ theMapActor->MapCells(theMapIndex,myUnstructuredGrid.GetPointer());
UnShrink();
if(theMapActor->IsShrunk()){