00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkInteractorStyleJoystickCamera.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 =========================================================================*/ 00038 #ifndef __vtkInteractorStyleJoystickCamera_h 00039 #define __vtkInteractorStyleJoystickCamera_h 00040 00041 #include "vtkInteractorStyle.h" 00042 00043 class VTK_RENDERING_EXPORT vtkInteractorStyleJoystickCamera : public vtkInteractorStyle 00044 { 00045 public: 00046 static vtkInteractorStyleJoystickCamera *New(); 00047 vtkTypeMacro(vtkInteractorStyleJoystickCamera,vtkInteractorStyle); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 00053 virtual void OnMouseMove(); 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 OnMouseWheelForward(); 00061 virtual void OnMouseWheelBackward(); 00063 00064 // These methods for the different interactions in different modes 00065 // are overridden in subclasses to perform the correct motion. Since 00066 // they are called by OnTimer, they do not have mouse coord parameters 00067 // (use interactor's GetEventPosition and GetLastEventPosition) 00068 virtual void Rotate(); 00069 virtual void Spin(); 00070 virtual void Pan(); 00071 virtual void Dolly(); 00072 00073 protected: 00074 vtkInteractorStyleJoystickCamera(); 00075 ~vtkInteractorStyleJoystickCamera(); 00076 00077 virtual void Dolly(double factor); 00078 00079 private: 00080 vtkInteractorStyleJoystickCamera(const vtkInteractorStyleJoystickCamera&); // Not implemented. 00081 void operator=(const vtkInteractorStyleJoystickCamera&); // Not implemented. 00082 }; 00083 00084 #endif