]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/OBJECT/SMESH_CellLabelActor.h
Salome HOME
Merge from V6_4_BR 05/12/2011
[modules/smesh.git] / src / OBJECT / SMESH_CellLabelActor.h
diff --git a/src/OBJECT/SMESH_CellLabelActor.h b/src/OBJECT/SMESH_CellLabelActor.h
new file mode 100644 (file)
index 0000000..dda47fe
--- /dev/null
@@ -0,0 +1,82 @@
+// Copyright (C) 2007-2011  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
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//  File   : SMESH_CellLabelActor.h
+//  Author : Roman NIKOLAEV
+//  Module : SMESH
+//
+#ifndef SMESH_CELL_LABEL_ACTOR_H
+#define SMESH_CELL_LABEL_ACTOR_H
+
+#include "SMESH_DeviceActor.h"
+
+class vtkSelectVisiblePoints;
+class vtkLabeledDataMapper;
+class vtkActor2D;
+class vtkMaskPoints;
+class vtkPolyData;
+
+class VTKViewer_CellCenters;
+
+
+class SMESHOBJECT_EXPORT SMESH_CellLabelActor : public SMESH_DeviceActor {
+public:
+  static SMESH_CellLabelActor* New();
+
+  static void ProcessEvents(vtkObject* theObject,
+                           unsigned long theEvent,
+                           void* theClientData,
+                           void* theCallData);
+
+
+  vtkTypeMacro(SMESH_CellLabelActor, SMESH_DeviceActor);
+
+
+  virtual void SetCellsLabeled(bool theIsCellsLabeled);
+  virtual bool GetCellsLabeled(){ return myIsCellsLabeled;}
+
+  virtual void SetVisibility(int theMode);
+
+  virtual void AddToRender(vtkRenderer* theRenderer);
+  virtual void RemoveFromRender(vtkRenderer* theRenderer);
+
+  void UpdateLabels();
+  
+protected:
+  SMESH_CellLabelActor();
+  ~SMESH_CellLabelActor();
+
+  bool myIsCellsLabeled;
+  vtkPolyData* myCellsNumDataSet;
+  vtkActor2D *myCellsLabels;
+  vtkMaskPoints* myClsMaskPoints;
+  VTKViewer_CellCenters* myCellCenters;
+  vtkLabeledDataMapper* myClsLabeledDataMapper;
+  vtkSelectVisiblePoints* myClsSelectVisiblePoints;  
+  SMESH_DeviceActor* myBaseActor; //Pointer to the base actor
+
+protected:
+  // Not implemented.
+  SMESH_CellLabelActor(const SMESH_CellLabelActor&);
+  void operator=(const SMESH_CellLabelActor&);
+};
+
+#endif //SMESH_NODE_LABEL_ACTOR_H