VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkInteractorStyleMultiTouchCamera.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 =========================================================================*/ 00033 #ifndef vtkInteractorStyleMultiTouchCamera_h 00034 #define vtkInteractorStyleMultiTouchCamera_h 00035 00036 #include "vtkInteractionStyleModule.h" // For export macro 00037 #include "vtkRenderWindowInteractor.h" // for max pointers 00038 #include "vtkInteractorStyleTrackballCamera.h" 00039 00040 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleMultiTouchCamera : public vtkInteractorStyleTrackballCamera 00041 { 00042 public: 00043 static vtkInteractorStyleMultiTouchCamera *New(); 00044 vtkTypeMacro(vtkInteractorStyleMultiTouchCamera,vtkInteractorStyleTrackballCamera); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00050 virtual void OnMouseMove(); 00051 virtual void OnLeftButtonDown(); 00052 virtual void OnLeftButtonUp(); 00054 00055 // These methods for the different interactions in different modes 00056 // are overridden in subclasses to perform the correct motion. Since 00057 // they are called by OnTimer, they do not have mouse coord parameters 00058 // (use interactor's GetEventPosition and GetLastEventPosition) 00059 virtual void AdjustCamera(); 00060 00062 00063 vtkSetMacro(MotionFactor,double); 00064 vtkGetMacro(MotionFactor,double); 00066 00067 protected: 00068 vtkInteractorStyleMultiTouchCamera(); 00069 ~vtkInteractorStyleMultiTouchCamera(); 00070 00071 int PointersDownCount; 00072 int PointersDown[VTKI_MAX_POINTERS]; 00073 00074 double MotionFactor; 00075 00076 private: 00077 vtkInteractorStyleMultiTouchCamera(const vtkInteractorStyleMultiTouchCamera&); // Not implemented. 00078 void operator=(const vtkInteractorStyleMultiTouchCamera&); // Not implemented. 00079 }; 00080 00081 #endif