VTK  9.2.20230606
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 =========================================================================*/
153 #ifndef vtkInteractorStyleTrackballCamera_h
154 #define vtkInteractorStyleTrackballCamera_h
155 
156 #include "vtkInteractionStyleModule.h" // For export macro
157 #include "vtkInteractorStyle.h"
158 
159 VTK_ABI_NAMESPACE_BEGIN
160 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
161 {
162 public:
165  void PrintSelf(ostream& os, vtkIndent indent) override;
166 
168 
172  void OnMouseMove() override;
173  void OnLeftButtonDown() override;
174  void OnLeftButtonUp() override;
175  void OnMiddleButtonDown() override;
176  void OnMiddleButtonUp() override;
177  void OnRightButtonDown() override;
178  void OnRightButtonUp() override;
179  void OnMouseWheelForward() override;
180  void OnMouseWheelBackward() override;
182 
183  // These methods for the different interactions in different modes
184  // are overridden in subclasses to perform the correct motion. Since
185  // they are called by OnTimer, they do not have mouse coord parameters
186  // (use interactor's GetEventPosition and GetLastEventPosition)
187  void Rotate() override;
188  void Spin() override;
189  void Pan() override;
190  void Dolly() override;
191  void EnvironmentRotate() override;
192 
194 
197  vtkSetMacro(MotionFactor, double);
198  vtkGetMacro(MotionFactor, double);
200 
201 protected:
204 
205  double MotionFactor;
206 
207  virtual void Dolly(double factor);
208 
209 private:
211  void operator=(const vtkInteractorStyleTrackballCamera&) = delete;
212 };
213 
214 VTK_ABI_NAMESPACE_END
215 #endif
a simple class to control print indentation
Definition: vtkIndent.h:120
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)