]> SALOME platform Git repositories - modules/smesh.git/blob - src/OBJECT/SMESH_CellLabelActor.h
Salome HOME
0021825: Error in the example of "Projection Algorithms" in the user's guide
[modules/smesh.git] / src / OBJECT / SMESH_CellLabelActor.h
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : SMESH_CellLabelActor.h
23 //  Author : Roman NIKOLAEV
24 //  Module : SMESH
25 //
26 #ifndef SMESH_CELL_LABEL_ACTOR_H
27 #define SMESH_CELL_LABEL_ACTOR_H
28
29 #include "SMESH_DeviceActor.h"
30
31 class vtkSelectVisiblePoints;
32 class vtkLabeledDataMapper;
33 class vtkActor2D;
34 class vtkMaskPoints;
35 class vtkUnstructuredGrid;
36
37 class VTKViewer_CellCenters;
38
39
40 class SMESHOBJECT_EXPORT SMESH_CellLabelActor : public SMESH_DeviceActor {
41 public:
42   static SMESH_CellLabelActor* New();
43
44   static void ProcessEvents(vtkObject* theObject,
45                             unsigned long theEvent,
46                             void* theClientData,
47                             void* theCallData);
48
49
50   vtkTypeMacro(SMESH_CellLabelActor, SMESH_DeviceActor);
51
52
53   virtual void SetCellsLabeled(bool theIsCellsLabeled);
54   virtual bool GetCellsLabeled(){ return myIsCellsLabeled;}
55
56   virtual void SetVisibility(int theMode);
57
58   virtual void AddToRender(vtkRenderer* theRenderer);
59   virtual void RemoveFromRender(vtkRenderer* theRenderer);
60
61   void UpdateLabels();
62   
63 protected:
64   SMESH_CellLabelActor();
65   ~SMESH_CellLabelActor();
66
67   bool myIsCellsLabeled;
68   vtkUnstructuredGrid* myCellsNumDataSet;
69   vtkActor2D *myCellsLabels;
70   vtkMaskPoints* myClsMaskPoints;
71   VTKViewer_CellCenters* myCellCenters;
72   vtkLabeledDataMapper* myClsLabeledDataMapper;
73   vtkSelectVisiblePoints* myClsSelectVisiblePoints;  
74   SMESH_DeviceActor* myBaseActor; //Pointer to the base actor
75
76 protected:
77   // Not implemented.
78   SMESH_CellLabelActor(const SMESH_CellLabelActor&);
79   void operator=(const SMESH_CellLabelActor&);
80 };
81
82 #endif //SMESH_NODE_LABEL_ACTOR_H