Back to index

salome-smesh  6.5.0
SMESH_CellLabelActor.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  File   : SMESH_CellLabelActor.h
00023 //  Author : Roman NIKOLAEV
00024 //  Module : SMESH
00025 //
00026 #ifndef SMESH_CELL_LABEL_ACTOR_H
00027 #define SMESH_CELL_LABEL_ACTOR_H
00028 
00029 #include "SMESH_DeviceActor.h"
00030 
00031 class vtkSelectVisiblePoints;
00032 class vtkLabeledDataMapper;
00033 class vtkActor2D;
00034 class vtkMaskPoints;
00035 class vtkUnstructuredGrid;
00036 
00037 class VTKViewer_CellCenters;
00038 
00039 
00040 class SMESHOBJECT_EXPORT SMESH_CellLabelActor : public SMESH_DeviceActor {
00041 public:
00042   static SMESH_CellLabelActor* New();
00043 
00044   static void ProcessEvents(vtkObject* theObject,
00045                          unsigned long theEvent,
00046                          void* theClientData,
00047                          void* theCallData);
00048 
00049 
00050   vtkTypeMacro(SMESH_CellLabelActor, SMESH_DeviceActor);
00051 
00052 
00053   virtual void SetCellsLabeled(bool theIsCellsLabeled);
00054   virtual bool GetCellsLabeled(){ return myIsCellsLabeled;}
00055 
00056   virtual void SetVisibility(int theMode);
00057 
00058   virtual void AddToRender(vtkRenderer* theRenderer);
00059   virtual void RemoveFromRender(vtkRenderer* theRenderer);
00060 
00061   void UpdateLabels();
00062   
00063 protected:
00064   SMESH_CellLabelActor();
00065   ~SMESH_CellLabelActor();
00066 
00067   bool myIsCellsLabeled;
00068   vtkUnstructuredGrid* myCellsNumDataSet;
00069   vtkActor2D *myCellsLabels;
00070   vtkMaskPoints* myClsMaskPoints;
00071   VTKViewer_CellCenters* myCellCenters;
00072   vtkLabeledDataMapper* myClsLabeledDataMapper;
00073   vtkSelectVisiblePoints* myClsSelectVisiblePoints;  
00074   SMESH_DeviceActor* myBaseActor; //Pointer to the base actor
00075 
00076 protected:
00077   // Not implemented.
00078   SMESH_CellLabelActor(const SMESH_CellLabelActor&);
00079   void operator=(const SMESH_CellLabelActor&);
00080 };
00081 
00082 #endif //SMESH_NODE_LABEL_ACTOR_H