VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkInteractorStyleRubberBand3D.h 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 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 //BTX 00073 00074 enum 00075 { 00076 SELECT_NORMAL = 0, 00077 SELECT_UNION = 1 00078 }; 00079 //ETX 00081 00083 00084 vtkGetMacro(Interaction, int); 00086 00087 //BTX 00088 enum 00089 { 00090 NONE, 00091 PANNING, 00092 ZOOMING, 00093 ROTATING, 00094 SELECTING 00095 }; 00096 //ETX 00097 00099 00103 vtkGetVector2Macro(StartPosition,int); 00104 vtkGetVector2Macro(EndPosition,int); 00106 00107 protected: 00108 vtkInteractorStyleRubberBand3D(); 00109 ~vtkInteractorStyleRubberBand3D(); 00110 00111 // The interaction mode 00112 int Interaction; 00113 00114 // Draws the selection rubber band 00115 void RedrawRubberBand(); 00116 00117 // The end position of the selection 00118 int StartPosition[2]; 00119 00120 // The start position of the selection 00121 int EndPosition[2]; 00122 00123 // The pixel array for the rubber band 00124 vtkUnsignedCharArray* PixelArray; 00125 00126 // Whether to trigger a render when the mouse moves 00127 bool RenderOnMouseMove; 00128 00129 private: 00130 vtkInteractorStyleRubberBand3D(const vtkInteractorStyleRubberBand3D&); //Not implemented 00131 void operator=(const vtkInteractorStyleRubberBand3D&); // Not implemented 00132 }; 00133 00134 #endif