00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00058 #ifndef __vtk3DWidget_h
00059 #define __vtk3DWidget_h
00060
00061 #include "vtkInteractorObserver.h"
00062
00063 class vtkDataSet;
00064 class vtkProp3D;
00065
00066 class VTK_WIDGETS_EXPORT vtk3DWidget : public vtkInteractorObserver
00067 {
00068 public:
00069 vtkTypeRevisionMacro(vtk3DWidget,vtkInteractorObserver);
00070 void PrintSelf(ostream& os, vtkIndent indent);
00071
00073
00080 virtual void PlaceWidget(double bounds[6]) = 0;
00081 virtual void PlaceWidget();
00082 virtual void PlaceWidget(double xmin, double xmax, double ymin, double ymax,
00083 double zmin, double zmax);
00085
00087
00090 virtual void SetProp3D(vtkProp3D*);
00091 vtkGetObjectMacro(Prop3D,vtkProp3D);
00093
00095
00098 virtual void SetInput(vtkDataSet*);
00099 vtkGetObjectMacro(Input,vtkDataSet);
00101
00103
00109 vtkSetClampMacro(PlaceFactor,double,0.01,VTK_FLOAT_MAX);
00110 vtkGetMacro(PlaceFactor,double);
00112
00114
00118 vtkSetClampMacro(HandleSize,double,0.001,0.5);
00119 vtkGetMacro(HandleSize,double);
00121
00122 protected:
00123 vtk3DWidget();
00124 ~vtk3DWidget();
00125
00126
00127 vtkProp3D *Prop3D;
00128 vtkDataSet *Input;
00129
00130
00131 double PlaceFactor;
00132 int Placed;
00133 void AdjustBounds(double bounds[6], double newBounds[6], double center[3]);
00134
00135
00136 double InitialBounds[6];
00137 double InitialLength;
00138 double HandleSize;
00139 double SizeHandles(double factor);
00140 virtual void SizeHandles() {}
00141
00142
00143 int ValidPick;
00144 double LastPickPosition[3];
00145
00146 private:
00147 vtk3DWidget(const vtk3DWidget&);
00148 void operator=(const vtk3DWidget&);
00149
00150 };
00151
00152 #endif