Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/gui.git] / src / SVTK / SVTK_Actor.h
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19
20 #ifndef SVTK_ACTOR_H
21 #define SVTK_ACTOR_H
22
23 #include <TColStd_IndexedMapOfInteger.hxx>
24
25 class vtkRenderer;
26 class vtkShrinkFilter;
27 class vtkDataSetMapper;
28 class vtkUnstructuredGrid;
29
30 #include "SVTK.h"
31 #include "SVTK_DeviceActor.h"
32
33 #include <vtkSmartPointer.h>
34
35 class SALOME_Actor;
36
37 //! This class used for internal SVTK package purpose (highlight and prehighlight)
38 class SVTK_EXPORT SVTK_Actor : public SVTK_DeviceActor
39 {
40 public:
41   static SVTK_Actor* New();
42
43   vtkTypeMacro(SVTK_Actor,SVTK_DeviceActor);
44
45   //! Initialiaze the instance completely
46   void
47   Initialize();
48
49   //! Allows to set an external source 
50   void
51   SetSource(vtkUnstructuredGrid* theUnstructuredGrid);
52
53   //! Get its internal data set
54   vtkUnstructuredGrid*
55   GetSource();
56
57   //! Allow to recostruct selected cells from source SALOME_Actor and map of subindexes
58   void
59   MapCells(SALOME_Actor* theMapActor, 
60            const TColStd_IndexedMapOfInteger& theMapIndex);
61
62   //! Allow to recostruct selected points from source SALOME_Actor and map of subindexes
63   void 
64   MapPoints(SALOME_Actor* theMapActor, 
65             const TColStd_IndexedMapOfInteger& theMapIndex);
66
67   //! Allow to recostruct selected edges from source SALOME_Actor and map of subindexes
68   void 
69   MapEdge(SALOME_Actor* theMapActor, 
70           const TColStd_IndexedMapOfInteger& theMapIndex);
71
72   const TColStd_IndexedMapOfInteger&
73   GetMapIndex() const;
74
75  protected:
76   TColStd_IndexedMapOfInteger myMapIndex;
77
78   vtkSmartPointer<vtkUnstructuredGrid> myUnstructuredGrid;
79
80   SVTK_Actor();
81   virtual
82   ~SVTK_Actor();
83 };
84
85 #endif