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 #ifndef __SVTK_RectPicker_h
00029 #define __SVTK_RectPicker_h
00030
00031 #include "SVTK.h"
00032 #include "VTKViewer.h"
00033
00034 #include <map>
00035 #include <vector>
00036
00037 #include <vtkAbstractPropPicker.h>
00038
00039 class vtkRenderer;
00040
00041 #ifdef WIN32
00042 #pragma warning ( disable:4251 )
00043 #endif
00044
00051 class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
00052 {
00053 public:
00054 static
00055 SVTK_RectPicker *New();
00056
00057 vtkTypeMacro(SVTK_RectPicker,vtkAbstractPropPicker);
00058
00064 vtkSetMacro(Tolerance,vtkFloatingPointType);
00065 vtkGetMacro(Tolerance,vtkFloatingPointType);
00066
00068 vtkSetMacro(PickPoints,int);
00069 vtkGetMacro(PickPoints,int);
00070 vtkBooleanMacro(PickPoints,int);
00071
00072 virtual
00073 int
00074 Pick(vtkFloatingPointType theSelectionX,
00075 vtkFloatingPointType theSelectionY,
00076 vtkFloatingPointType theSelectionZ,
00077 vtkFloatingPointType theSelectionX2,
00078 vtkFloatingPointType theSelectionY2,
00079 vtkFloatingPointType theSelectionZ2,
00080 vtkRenderer *theRenderer);
00081
00082 int
00083 Pick(vtkFloatingPointType theSelection[3],
00084 vtkFloatingPointType theSelection2[3],
00085 vtkRenderer *theRenderer);
00086
00087 typedef std::vector<vtkIdType> TVectorIds;
00088 typedef std::map<vtkActor*,TVectorIds> TVectorIdsMap;
00089
00090 const TVectorIdsMap&
00091 GetPointIdsMap() const;
00092
00093 const TVectorIdsMap&
00094 GetCellIdsMap() const;
00095
00096 protected:
00097 SVTK_RectPicker();
00098 ~SVTK_RectPicker();
00099
00101 vtkFloatingPointType Tolerance;
00102
00104 int PickPoints;
00105
00107 vtkFloatingPointType SelectionPoint2[3];
00108
00110 vtkFloatingPointType PickPosition2[3];
00111
00112 TVectorIdsMap myPointIdsMap;
00113 TVectorIdsMap myCellIdsMap;
00114
00115 private:
00116 virtual
00117 int
00118 Pick(vtkFloatingPointType,
00119 vtkFloatingPointType,
00120 vtkFloatingPointType,
00121 vtkRenderer*);
00122 };
00123
00124 #ifdef WIN32
00125 #pragma warning ( default:4251 )
00126 #endif
00127
00128 #endif
00129
00130