VTK  9.2.6
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 =========================================================================*/
53 #ifndef vtkInteractorStyleTrackballCamera_h
54 #define vtkInteractorStyleTrackballCamera_h
55 
56 #include "vtkInteractionStyleModule.h" // For export macro
57 #include "vtkInteractorStyle.h"
58 
59 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
60 {
61 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
67 
71  void OnMouseMove() override;
72  void OnLeftButtonDown() override;
73  void OnLeftButtonUp() override;
74  void OnMiddleButtonDown() override;
75  void OnMiddleButtonUp() override;
76  void OnRightButtonDown() override;
77  void OnRightButtonUp() override;
78  void OnMouseWheelForward() override;
79  void OnMouseWheelBackward() override;
81 
82  // These methods for the different interactions in different modes
83  // are overridden in subclasses to perform the correct motion. Since
84  // they are called by OnTimer, they do not have mouse coord parameters
85  // (use interactor's GetEventPosition and GetLastEventPosition)
86  void Rotate() override;
87  void Spin() override;
88  void Pan() override;
89  void Dolly() override;
90  void EnvironmentRotate() override;
91 
93 
96  vtkSetMacro(MotionFactor, double);
97  vtkGetMacro(MotionFactor, double);
99 
100 protected:
103 
104  double MotionFactor;
105 
106  virtual void Dolly(double factor);
107 
108 private:
110  void operator=(const vtkInteractorStyleTrackballCamera&) = delete;
111 };
112 
113 #endif
a simple class to control print indentation
Definition: vtkIndent.h:49
interactive manipulation of the camera
void OnRightButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
virtual void Dolly(double factor)
void OnLeftButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void OnMouseWheelForward() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnMiddleButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void Rotate() override
These methods for the different interactions in different modes are overridden in subclasses to perfo...
static vtkInteractorStyleTrackballCamera * New()
void OnMouseWheelBackward() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnRightButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnLeftButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnMiddleButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
provide event-driven interface to the rendering window (defines trackball mode)