1 // Copyright (C) 2007-2008 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.
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
22 // SMESH OBJECT : interactive object for SMESH visualization
23 // File : SMESH_PreviewActorsCollection.h
26 // $Header: /home/server/cvs/SMESH/SMESH_SRC/src/OBJECT/SMESH_PreviewActorsCollection.h,v 1
28 #ifndef SMESH_PREVIEW_ACTOR_COLLECTION_H
29 #define SMESH_PREVIEW_ACTOR_COLLECTION_H
31 #include <SMESH_Actor.h>
32 #include <GEOM_Actor.h>
33 #include "SMESH_Object.h"
34 #include <TopoDS_Shape.hxx>
35 #include <SMDS_SetIterator.hxx>
36 #include <TopAbs_ShapeEnum.hxx>
37 #include <TopTools_IndexedMapOfShape.hxx>
44 class SMESHOBJECT_EXPORT SMESH_PreviewActorsCollection
47 SMESH_PreviewActorsCollection();
48 ~SMESH_PreviewActorsCollection();
50 virtual void AddToRender(vtkRenderer* theRenderer);
51 virtual void RemoveFromRender(vtkRenderer* theRenderer);
53 bool Init( const TopoDS_Shape& theShape, TopAbs_ShapeEnum subShapeType = TopAbs_EDGE, const QString& = QString("") );
55 void SetSelector( SVTK_Selector* );
57 void HighlightAll( bool );
58 void HighlightID( int );
60 GEOM_Actor* GetActorByIndex( int );
62 int GetIndexByShape( const TopoDS_Shape& );
64 void SetShown( bool );
67 GEOM_Actor* createActor( const TopoDS_Shape& );
70 TopoDS_Shape myMainShape;
71 SVTK_Selector* mySelector;
72 vtkRenderer* myRenderer;
73 TopTools_IndexedMapOfShape myMapOfShapes;
74 QMap<int, GEOM_Actor*> myMapOfActors;
78 #endif //SMESH_DEVICE_ACTOR_COLLECTION_H