00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00057 #ifndef __vtkAbstractPicker_h
00058 #define __vtkAbstractPicker_h
00059
00060 #include "vtkObject.h"
00061
00062 class vtkRenderer;
00063 class vtkProp;
00064 class vtkPropCollection;
00065
00066 class VTK_RENDERING_EXPORT vtkAbstractPicker : public vtkObject
00067 {
00068 public:
00069 vtkTypeMacro(vtkAbstractPicker,vtkObject);
00070 void PrintSelf(ostream& os, vtkIndent indent);
00071
00073
00074 vtkGetObjectMacro(Renderer,vtkRenderer);
00076
00078
00080 vtkGetVectorMacro(SelectionPoint,double,3);
00082
00084
00085 vtkGetVectorMacro(PickPosition,double,3);
00087
00089
00093 virtual int Pick(double selectionX, double selectionY, double selectionZ,
00094 vtkRenderer *renderer) = 0;
00096
00098
00101 int Pick(double selectionPt[3], vtkRenderer *ren)
00102 {return this->Pick(selectionPt[0],selectionPt[1],selectionPt[2],ren);};
00104
00106
00109 vtkSetMacro(PickFromList,int);
00110 vtkGetMacro(PickFromList,int);
00111 vtkBooleanMacro(PickFromList,int);
00113
00115 void InitializePickList();
00116
00118 void AddPickList(vtkProp *);
00119
00121 void DeletePickList(vtkProp *);
00122
00124 vtkPropCollection *GetPickList() {return this->PickList;}
00125
00126 protected:
00127 vtkAbstractPicker();
00128 ~vtkAbstractPicker();
00129
00130 virtual void Initialize();
00131
00132 vtkRenderer *Renderer;
00133 double SelectionPoint[3];
00134 double PickPosition[3];
00135
00136
00137 int PickFromList;
00138 vtkPropCollection *PickList;
00139 private:
00140 vtkAbstractPicker(const vtkAbstractPicker&);
00141 void operator=(const vtkAbstractPicker&);
00142 };
00143
00144 #endif
00145
00146