00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00043 #ifndef __vtkPicker_h
00044 #define __vtkPicker_h
00045
00046 #include "vtkAbstractPropPicker.h"
00047
00048 class vtkAbstractMapper3D;
00049 class vtkDataSet;
00050 class vtkTransform;
00051 class vtkActorCollection;
00052 class vtkProp3DCollection;
00053 class vtkPoints;
00054
00055 class VTK_RENDERING_EXPORT vtkPicker : public vtkAbstractPropPicker
00056 {
00057 public:
00058 static vtkPicker *New();
00059 vtkTypeMacro(vtkPicker,vtkAbstractPropPicker);
00060 void PrintSelf(ostream& os, vtkIndent indent);
00061
00063
00066 vtkSetMacro(Tolerance,double);
00067 vtkGetMacro(Tolerance,double);
00069
00071
00073 vtkGetVectorMacro(MapperPosition,double,3);
00075
00077
00078 vtkGetObjectMacro(Mapper,vtkAbstractMapper3D);
00080
00082
00084 vtkGetObjectMacro(DataSet,vtkDataSet);
00086
00089 vtkProp3DCollection *GetProp3Ds() {return this->Prop3Ds;};
00090
00094 vtkActorCollection *GetActors();
00095
00099 vtkPoints *GetPickedPositions() {return this->PickedPositions;};
00100
00102
00106 virtual int Pick(double selectionX, double selectionY, double selectionZ,
00107 vtkRenderer *renderer);
00109
00111
00115 int Pick(double selectionPt[3], vtkRenderer *ren)
00116 {return this->Pick(selectionPt[0], selectionPt[1], selectionPt[2], ren);};
00118
00119 protected:
00120 vtkPicker();
00121 ~vtkPicker();
00122
00123 void MarkPicked(vtkAssemblyPath *path, vtkProp3D *p, vtkAbstractMapper3D *m,
00124 double tMin, double mapperPos[3]);
00125 virtual double IntersectWithLine(double p1[3], double p2[3], double tol,
00126 vtkAssemblyPath *path, vtkProp3D *p,
00127 vtkAbstractMapper3D *m);
00128 virtual void Initialize();
00129
00130 double Tolerance;
00131 double MapperPosition[3];
00132
00133 vtkAbstractMapper3D *Mapper;
00134 vtkDataSet *DataSet;
00135
00136 double GlobalTMin;
00137 vtkTransform *Transform;
00138 vtkActorCollection *Actors;
00139 vtkProp3DCollection *Prop3Ds;
00140 vtkPoints *PickedPositions;
00141
00142 private:
00143 vtkPicker(const vtkPicker&);
00144 void operator=(const vtkPicker&);
00145 };
00146
00147
00148 #endif
00149
00150