VTK  9.3.1
vtkInteractorStyleTrackballCamera.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkInteractorStyleTrackballCamera_h
33 #define vtkInteractorStyleTrackballCamera_h
34 
35 #include "vtkInteractionStyleModule.h" // For export macro
36 #include "vtkInteractorStyle.h"
37 
38 VTK_ABI_NAMESPACE_BEGIN
39 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
51  void OnMouseMove() override;
52  void OnLeftButtonDown() override;
53  void OnLeftButtonUp() override;
54  void OnMiddleButtonDown() override;
55  void OnMiddleButtonUp() override;
56  void OnRightButtonDown() override;
57  void OnRightButtonUp() override;
58  void OnMouseWheelForward() override;
59  void OnMouseWheelBackward() override;
61 
62  // These methods for the different interactions in different modes
63  // are overridden in subclasses to perform the correct motion. Since
64  // they are called by OnTimer, they do not have mouse coord parameters
65  // (use interactor's GetEventPosition and GetLastEventPosition)
66  void Rotate() override;
67  void Spin() override;
68  void Pan() override;
69  void Dolly() override;
70  void EnvironmentRotate() override;
71 
73 
76  vtkSetMacro(MotionFactor, double);
77  vtkGetMacro(MotionFactor, double);
79 
80 protected:
83 
84  double MotionFactor;
85 
86  virtual void Dolly(double factor);
87 
88 private:
90  void operator=(const vtkInteractorStyleTrackballCamera&) = delete;
91 };
92 
93 VTK_ABI_NAMESPACE_END
94 #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:28
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 EnvironmentRotate()
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.