1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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, or (at your option) any later version.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SMESH OBJECT : interactive object for SMESH visualization
24 // File : SMESH_SVTKActor.h
25 // Author : Roman NIKOLAEV
28 #ifndef SMESH_SVTKACTOR_H
29 #define SMESH_SVTKACTOR_H
31 #include "SMESH_Object.h"
32 #include <SVTK_Actor.h>
36 class vtkUnstructureGrid;
37 class vtkDataSetMapper;
39 class SMESHOBJECT_EXPORT SMESH_SVTKActor : public SVTK_Actor {
42 static SMESH_SVTKActor* New();
44 vtkTypeMacro(SMESH_SVTKActor, SVTK_Actor);
46 void SetBallScale(double theSize);
47 void SetBallSize(float theSize);
48 void Set0DSize(float theSize);
50 //! To publish the actor an all its internal devices
53 AddToRender(vtkRenderer* theRendere);
55 virtual void SetVisibility( int theVisibility );
57 //! Initialiaze the instance completely
61 //! Allow to recostruct selected cells from source SALOME_Actor and map of subindexes
63 MapCells(SALOME_Actor* theMapActor,
64 const TColStd_IndexedMapOfInteger& theMapIndex);
67 //! To remove the actor an all its internal devices
70 RemoveFromRender(vtkRenderer* theRendere);
72 void SetVisualObject(TVisualObjPtr theVisualObj);
75 SVTK_DeviceActor* my0DActor;
76 SVTK_DeviceActor* myBallActor;
78 vtkUnstructuredGrid* my0DGrid;
79 vtkUnstructuredGrid* myBallGrid;
80 TVisualObjPtr myVisualObj;
83 virtual ~SMESH_SVTKActor();