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 "vtkInteractionStyleModule.h" // For export macro 00044 #include "vtkInteractorStyleTrackballCamera.h" 00045 00046 class vtkUnsignedCharArray; 00047 00048 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand3D : public vtkInteractorStyleTrackballCamera 00049 { 00050 public: 00051 static vtkInteractorStyleRubberBand3D *New(); 00052 vtkTypeMacro(vtkInteractorStyleRubberBand3D, vtkInteractorStyleTrackballCamera); 00053 void PrintSelf(ostream& os, vtkIndent indent); 00054 00055 virtual void OnLeftButtonDown(); 00056 virtual void OnLeftButtonUp(); 00057 virtual void OnMiddleButtonDown(); 00058 virtual void OnMiddleButtonUp(); 00059 virtual void OnRightButtonDown(); 00060 virtual void OnRightButtonUp(); 00061 virtual void OnMouseMove(); 00062 virtual void OnMouseWheelForward(); 00063 virtual void OnMouseWheelBackward(); 00064 00066 00067 vtkSetMacro(RenderOnMouseMove, bool); 00068 vtkGetMacro(RenderOnMouseMove, bool); 00069 vtkBooleanMacro(RenderOnMouseMove, bool); 00071 00072 //BTX 00074 00075 enum 00076 { 00077 SELECT_NORMAL = 0, 00078 SELECT_UNION = 1 00079 }; 00080 //ETX 00082 00084 00085 vtkGetMacro(Interaction, int); 00087 00088 //BTX 00089 enum 00090 { 00091 NONE, 00092 PANNING, 00093 ZOOMING, 00094 ROTATING, 00095 SELECTING 00096 }; 00097 //ETX 00098 00100 00104 vtkGetVector2Macro(StartPosition,int); 00105 vtkGetVector2Macro(EndPosition,int); 00107 00108 protected: 00109 vtkInteractorStyleRubberBand3D(); 00110 ~vtkInteractorStyleRubberBand3D(); 00111 00112 // The interaction mode 00113 int Interaction; 00114 00115 // Draws the selection rubber band 00116 void RedrawRubberBand(); 00117 00118 // The end position of the selection 00119 int StartPosition[2]; 00120 00121 // The start position of the selection 00122 int EndPosition[2]; 00123 00124 // The pixel array for the rubber band 00125 vtkUnsignedCharArray* PixelArray; 00126 00127 // Whether to trigger a render when the mouse moves 00128 bool RenderOnMouseMove; 00129 00130 private: 00131 vtkInteractorStyleRubberBand3D(const vtkInteractorStyleRubberBand3D&); //Not implemented 00132 void operator=(const vtkInteractorStyleRubberBand3D&); // Not implemented 00133 }; 00134 00135 #endif