Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SMESH_PREVIEW_ACTOR_COLLECTION_H
00027 #define SMESH_PREVIEW_ACTOR_COLLECTION_H
00028
00029 #include "SMESH_Actor.h"
00030 #include <GEOM_Actor.h>
00031 #include "SMESH_Object.h"
00032 #include <TopoDS_Shape.hxx>
00033 #include <SMDS_SetIterator.hxx>
00034 #include <TopAbs_ShapeEnum.hxx>
00035 #include <TopTools_IndexedMapOfShape.hxx>
00036 #include <QString>
00037 #include <QMap>
00038
00039 class vtkRenderer;
00040 class GEOM_Actor;
00041
00042 class SMESHOBJECT_EXPORT SMESH_PreviewActorsCollection
00043 {
00044 public:
00045 SMESH_PreviewActorsCollection();
00046 ~SMESH_PreviewActorsCollection();
00047
00048 virtual void AddToRender(vtkRenderer* theRenderer);
00049 virtual void RemoveFromRender(vtkRenderer* theRenderer);
00050
00051 bool Init( const TopoDS_Shape& theShape, TopAbs_ShapeEnum subShapeType = TopAbs_EDGE, const QString& = QString("") );
00052
00053 void SetSelector( SVTK_Selector* );
00054
00055 void HighlightAll( bool );
00056 void HighlightID( int );
00057
00058 GEOM_Actor* GetActorByIndex( int );
00059
00060 int GetIndexByShape( const TopoDS_Shape& );
00061
00062 void SetShown( bool );
00063
00064 protected:
00065 GEOM_Actor* createActor( const TopoDS_Shape& );
00066
00067 protected:
00068 TopoDS_Shape myMainShape;
00069 SVTK_Selector* mySelector;
00070 vtkRenderer* myRenderer;
00071 TopTools_IndexedMapOfShape myMapOfShapes;
00072 QMap<int, GEOM_Actor*> myMapOfActors;
00073 };
00074
00075
00076 #endif //SMESH_DEVICE_ACTOR_COLLECTION_H