VTK
dox/Interaction/Style/vtkInteractorStyleTrackballCamera.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkInteractorStyleTrackballCamera.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 =========================================================================*/
00043 #ifndef __vtkInteractorStyleTrackballCamera_h
00044 #define __vtkInteractorStyleTrackballCamera_h
00045 
00046 #include "vtkInteractionStyleModule.h" // For export macro
00047 #include "vtkInteractorStyle.h"
00048 
00049 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
00050 {
00051 public:
00052   static vtkInteractorStyleTrackballCamera *New();
00053   vtkTypeMacro(vtkInteractorStyleTrackballCamera,vtkInteractorStyle);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00057 
00059   virtual void OnMouseMove();
00060   virtual void OnLeftButtonDown();
00061   virtual void OnLeftButtonUp();
00062   virtual void OnMiddleButtonDown();
00063   virtual void OnMiddleButtonUp();
00064   virtual void OnRightButtonDown();
00065   virtual void OnRightButtonUp();
00066   virtual void OnMouseWheelForward();
00067   virtual void OnMouseWheelBackward();
00069 
00070   // These methods for the different interactions in different modes
00071   // are overridden in subclasses to perform the correct motion. Since
00072   // they are called by OnTimer, they do not have mouse coord parameters
00073   // (use interactor's GetEventPosition and GetLastEventPosition)
00074   virtual void Rotate();
00075   virtual void Spin();
00076   virtual void Pan();
00077   virtual void Dolly();
00078 
00080 
00081   vtkSetMacro(MotionFactor,double);
00082   vtkGetMacro(MotionFactor,double);
00084 
00085 protected:
00086   vtkInteractorStyleTrackballCamera();
00087   ~vtkInteractorStyleTrackballCamera();
00088 
00089   double MotionFactor;
00090 
00091   virtual void Dolly(double factor);
00092 
00093 private:
00094   vtkInteractorStyleTrackballCamera(const vtkInteractorStyleTrackballCamera&);  // Not implemented.
00095   void operator=(const vtkInteractorStyleTrackballCamera&);  // Not implemented.
00096 };
00097 
00098 #endif