00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00040 #ifndef __vtkInteractorStyleRubberBand3D_h
00041 #define __vtkInteractorStyleRubberBand3D_h
00042 
00043 #include "vtkInteractorStyleTrackballCamera.h"
00044 
00045 class vtkUnsignedCharArray;
00046 
00047 class VTK_RENDERING_EXPORT vtkInteractorStyleRubberBand3D : public vtkInteractorStyleTrackballCamera
00048 {
00049 public:
00050   static vtkInteractorStyleRubberBand3D *New();
00051   vtkTypeMacro(vtkInteractorStyleRubberBand3D, vtkInteractorStyleTrackballCamera);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00054   virtual void OnLeftButtonDown();
00055   virtual void OnLeftButtonUp();
00056   virtual void OnMiddleButtonDown();
00057   virtual void OnMiddleButtonUp();
00058   virtual void OnRightButtonDown();
00059   virtual void OnRightButtonUp();
00060   virtual void OnMouseMove();
00061   virtual void OnMouseWheelForward();
00062   virtual void OnMouseWheelBackward();
00063 
00065 
00066   vtkSetMacro(RenderOnMouseMove, bool);
00067   vtkGetMacro(RenderOnMouseMove, bool);
00068   vtkBooleanMacro(RenderOnMouseMove, bool);
00070 
00071   
00073 
00074   enum
00075     {
00076     SELECT_NORMAL = 0,
00077     SELECT_UNION = 1
00078     };
00079   
00081 
00083 
00084   vtkGetMacro(Interaction, int);
00086   
00087   
00088   enum
00089     {
00090     NONE,
00091     PANNING,
00092     ZOOMING,
00093     ROTATING,
00094     SELECTING
00095     };
00096   
00097     
00099 
00103   vtkGetVector2Macro(StartPosition,int);
00104   vtkGetVector2Macro(EndPosition,int);
00106 
00107 protected:
00108   vtkInteractorStyleRubberBand3D();
00109   ~vtkInteractorStyleRubberBand3D();
00110   
00111   
00112   int Interaction;
00113   
00114   
00115   void RedrawRubberBand();
00116   
00117   
00118   int StartPosition[2];
00119   
00120   
00121   int EndPosition[2];
00122   
00123   
00124   vtkUnsignedCharArray* PixelArray;
00125 
00126   
00127   bool RenderOnMouseMove;
00128   
00129 private:
00130   vtkInteractorStyleRubberBand3D(const vtkInteractorStyleRubberBand3D&); 
00131   void operator=(const vtkInteractorStyleRubberBand3D&); 
00132 };
00133 
00134 #endif