00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkInteractorStyleRubberBand3D.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 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 vtkTypeRevisionMacro(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 00064 //BTX 00066 00067 enum 00068 { 00069 SELECT_NORMAL = 0, 00070 SELECT_UNION = 1 00071 }; 00072 //ETX 00074 00076 00077 vtkGetMacro(Interaction, int); 00079 00080 //BTX 00081 enum 00082 { 00083 NONE, 00084 PANNING, 00085 ZOOMING, 00086 ROTATING, 00087 SELECTING 00088 }; 00089 //ETX 00090 00091 protected: 00092 vtkInteractorStyleRubberBand3D(); 00093 ~vtkInteractorStyleRubberBand3D(); 00094 00095 // The interaction mode 00096 int Interaction; 00097 00098 // Draws the selection rubber band 00099 void RedrawRubberBand(); 00100 00101 // The end position of the selection 00102 int StartPosition[2]; 00103 00104 // The start position of the selection 00105 int EndPosition[2]; 00106 00107 // The pixel array for the rubber band 00108 vtkUnsignedCharArray* PixelArray; 00109 00110 private: 00111 vtkInteractorStyleRubberBand3D(const vtkInteractorStyleRubberBand3D&); //Not implemented 00112 void operator=(const vtkInteractorStyleRubberBand3D&); // Not implemented 00113 }; 00114 00115 #endif