VTK
vtkInteractorStyleTrackballCamera.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyleTrackballCamera.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef vtkInteractorStyleTrackballCamera_h
36 #define vtkInteractorStyleTrackballCamera_h
37 
38 #include "vtkInteractionStyleModule.h" // For export macro
39 #include "vtkInteractorStyle.h"
40 
41 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 
49 
53  void OnMouseMove() VTK_OVERRIDE;
54  void OnLeftButtonDown() VTK_OVERRIDE;
55  void OnLeftButtonUp() VTK_OVERRIDE;
56  void OnMiddleButtonDown() VTK_OVERRIDE;
57  void OnMiddleButtonUp() VTK_OVERRIDE;
58  void OnRightButtonDown() VTK_OVERRIDE;
59  void OnRightButtonUp() VTK_OVERRIDE;
60  void OnMouseWheelForward() VTK_OVERRIDE;
61  void OnMouseWheelBackward() VTK_OVERRIDE;
63 
64  // These methods for the different interactions in different modes
65  // are overridden in subclasses to perform the correct motion. Since
66  // they are called by OnTimer, they do not have mouse coord parameters
67  // (use interactor's GetEventPosition and GetLastEventPosition)
68  void Rotate() VTK_OVERRIDE;
69  void Spin() VTK_OVERRIDE;
70  void Pan() VTK_OVERRIDE;
71  void Dolly() VTK_OVERRIDE;
72 
74 
77  vtkSetMacro(MotionFactor,double);
78  vtkGetMacro(MotionFactor,double);
80 
81 protected:
83  ~vtkInteractorStyleTrackballCamera() VTK_OVERRIDE;
84 
85  double MotionFactor;
86 
87  virtual void Dolly(double factor);
88 
89 private:
90  vtkInteractorStyleTrackballCamera(const vtkInteractorStyleTrackballCamera&) VTK_DELETE_FUNCTION;
91  void operator=(const vtkInteractorStyleTrackballCamera&) VTK_DELETE_FUNCTION;
92 };
93 
94 #endif
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
a simple class to control print indentation
Definition: vtkIndent.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
provide event-driven interface to the rendering window (defines trackball mode)
interactive manipulation of the camera
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.