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
00027
00028
00029 #ifndef SVTK_SELECTOR_H
00030 #define SVTK_SELECTOR_H
00031
00032 #include "SVTK.h"
00033 #include "SVTK_Selection.h"
00034 #include "SALOME_ListIO.hxx"
00035
00036 #include <TColStd_MapOfInteger.hxx>
00037 #include <TColStd_IndexedMapOfInteger.hxx>
00038
00039 #include <vtkObject.h>
00040
00041 class Handle(VTKViewer_Filter);
00042
00043 class SALOME_Actor;
00044 class SVTK_SelectionEvent;
00045 class vtkActorCollection;
00046 class vtkRenderer;
00047 class Handle(SALOME_InteractiveObject);
00048
00050
00057 class SVTK_EXPORT SVTK_Selector: public vtkObject
00058 {
00059 public:
00060 static SVTK_Selector* New();
00061
00062 vtkTypeMacro(SVTK_Selector,vtkObject);
00063
00065 virtual
00066 void
00067 SetSelectionMode(Selection_Mode theMode) = 0;
00068
00070 virtual
00071 Selection_Mode
00072 SelectionMode() const = 0;
00073
00075 virtual
00076 void
00077 ClearIObjects() = 0;
00078
00080 virtual
00081 SALOME_Actor*
00082 GetActor(const Handle(SALOME_InteractiveObject)& theIO) const = 0;
00083
00085 virtual
00086 bool
00087 IsSelected(const Handle(SALOME_InteractiveObject)& theIO) const = 0;
00088
00090 virtual
00091 bool
00092 IsSelected(SALOME_Actor* theActor) const = 0;
00093
00095 virtual
00096 bool
00097 AddIObject(const Handle(SALOME_InteractiveObject)& theIO) = 0;
00098
00100 virtual
00101 bool
00102 AddIObject(SALOME_Actor* theActor) = 0;
00103
00105 virtual
00106 bool
00107 RemoveIObject(const Handle(SALOME_InteractiveObject)& theIO) = 0;
00108
00110 virtual
00111 bool
00112 RemoveIObject(SALOME_Actor* theActor) = 0;
00113
00115 virtual
00116 const SALOME_ListIO&
00117 StoredIObjects() const = 0;
00118
00120 virtual
00121 int
00122 IObjectCount() const = 0;
00123
00125 virtual
00126 bool
00127 HasIndex(const Handle(SALOME_InteractiveObject)& theIO ) const = 0;
00128
00130 virtual
00131 void
00132 GetIndex( const Handle(SALOME_InteractiveObject)& theIO,
00133 TColStd_IndexedMapOfInteger& theIndex ) = 0;
00134
00136 virtual
00137 bool
00138 AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO,
00139 const TColStd_IndexedMapOfInteger& theIndices,
00140 bool theIsModeShift) = 0;
00141
00143 virtual
00144 bool
00145 AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO,
00146 const TColStd_MapOfInteger& theIndices,
00147 bool theIsModeShift) = 0;
00148
00150 virtual
00151 bool
00152 AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO,
00153 int theIndex,
00154 bool theIsModeShift) = 0;
00155
00157 virtual
00158 void
00159 RemoveIndex( const Handle(SALOME_InteractiveObject)& theIO,
00160 int theIndex) = 0;
00161
00163 virtual
00164 bool
00165 IsIndexSelected(const Handle(SALOME_InteractiveObject)& theIO,
00166 int theIndex) const = 0;
00167
00169 virtual
00170 void
00171 ClearIndex() = 0;
00172
00173
00174 typedef int TFilterID;
00175
00177 virtual
00178 void
00179 SetFilter(const Handle(VTKViewer_Filter)& theFilter) = 0;
00180
00182 virtual
00183 Handle(VTKViewer_Filter)
00184 GetFilter(const TFilterID theId) const = 0;
00185
00187 virtual
00188 bool
00189 IsFilterPresent(const TFilterID theId) const = 0;
00190
00192 virtual
00193 void
00194 RemoveFilter(const TFilterID theId) = 0;
00195
00197 virtual
00198 bool
00199 IsValid(SALOME_Actor* theActor,
00200 const int theId,
00201 const bool theIsNode = false) const = 0;
00202
00203
00204 virtual
00205 void
00206 StartPickCallback() = 0;
00207
00209 virtual
00210 void
00211 EndPickCallback() = 0;
00212
00213
00214 virtual
00215 vtkActorCollection*
00216 Pick(const SVTK_SelectionEvent* theEvent, vtkRenderer* theRenderer) const = 0;
00217
00218 virtual
00219 void
00220 SetTolerance(const double& theTolerance) = 0;
00221 };
00222
00223
00224 #endif