Back to index

salome-smesh  6.5.0
SMESH_NodeLabelActor.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_NodeLabelActor.h
00023 //  Author : Roman NIKOLAEV
00024 //  Module : SMESH
00025 //
00026 #ifndef SMESH_NODE_LABEL_ACTOR_H
00027 #define SMESH_NODE_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 
00038 class SMESHOBJECT_EXPORT SMESH_NodeLabelActor : public SMESH_DeviceActor {
00039 public:
00040   static SMESH_NodeLabelActor* New();
00041 
00042   static void ProcessEvents(vtkObject* theObject,
00043                          unsigned long theEvent,
00044                          void* theClientData,
00045                          void* theCallData);
00046 
00047 
00048   vtkTypeMacro(SMESH_NodeLabelActor, SMESH_DeviceActor);
00049 
00050 
00051   virtual void SetPointsLabeled(bool theIsPointsLabeled);
00052   virtual bool GetPointsLabeled(){ return myIsPointsLabeled;}  
00053 
00054   virtual void SetVisibility(int theMode);  
00055 
00056   virtual void AddToRender(vtkRenderer* theRenderer); 
00057   virtual void RemoveFromRender(vtkRenderer* theRenderer);
00058 
00059   void UpdateLabels();
00060   
00061 protected:
00062   SMESH_NodeLabelActor();
00063   ~SMESH_NodeLabelActor();
00064   
00065   bool myIsPointsLabeled;
00066   vtkUnstructuredGrid* myPointsNumDataSet;
00067   vtkActor2D *myPointLabels;
00068   vtkMaskPoints* myPtsMaskPoints;
00069   vtkLabeledDataMapper* myPtsLabeledDataMapper;
00070   vtkSelectVisiblePoints* myPtsSelectVisiblePoints;
00071 
00072 protected:
00073   // Not implemented.
00074   SMESH_NodeLabelActor(const SMESH_NodeLabelActor&);
00075   void operator=(const SMESH_NodeLabelActor&);
00076 };
00077 
00078 #endif //SMESH_NODE_LABEL_ACTOR_H