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 =========================================================================*/
41 #ifndef vtkInteractorStyleTrackballCamera_h
42 #define vtkInteractorStyleTrackballCamera_h
43 
44 #include "vtkInteractionStyleModule.h" // For export macro
45 #include "vtkInteractorStyle.h"
46 
47 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
59  void OnMouseMove() override;
60  void OnLeftButtonDown() override;
61  void OnLeftButtonUp() override;
62  void OnMiddleButtonDown() override;
63  void OnMiddleButtonUp() override;
64  void OnRightButtonDown() override;
65  void OnRightButtonUp() override;
66  void OnMouseWheelForward() override;
67  void OnMouseWheelBackward() override;
69 
70  // These methods for the different interactions in different modes
71  // are overridden in subclasses to perform the correct motion. Since
72  // they are called by OnTimer, they do not have mouse coord parameters
73  // (use interactor's GetEventPosition and GetLastEventPosition)
74  void Rotate() override;
75  void Spin() override;
76  void Pan() override;
77  void Dolly() override;
78 
80 
83  vtkSetMacro(MotionFactor,double);
84  vtkGetMacro(MotionFactor,double);
86 
87 protected:
90 
91  double MotionFactor;
92 
93  virtual void Dolly(double factor);
94 
95 private:
97  void operator=(const vtkInteractorStyleTrackballCamera&) = delete;
98 };
99 
100 #endif
virtual void OnLeftButtonDown()
virtual void Rotate()
These methods for the different interactions in different modes are overridden in subclasses to perfo...
virtual void OnMiddleButtonDown()
virtual void OnRightButtonDown()
virtual void OnLeftButtonUp()
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
virtual void OnMiddleButtonUp()
virtual void OnMouseWheelForward()
virtual void OnRightButtonUp()
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void OnMouseWheelBackward()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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.