VTK  9.3.20240318
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
141 #ifndef vtkInteractorStyleTrackballCamera_h
142 #define vtkInteractorStyleTrackballCamera_h
143 
144 #include "vtkInteractionStyleModule.h" // For export macro
145 #include "vtkInteractorStyle.h"
146 
147 VTK_ABI_NAMESPACE_BEGIN
148 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
149 {
150 public:
153  void PrintSelf(ostream& os, vtkIndent indent) override;
154 
156 
160  void OnMouseMove() override;
161  void OnLeftButtonDown() override;
162  void OnLeftButtonUp() override;
163  void OnMiddleButtonDown() override;
164  void OnMiddleButtonUp() override;
165  void OnRightButtonDown() override;
166  void OnRightButtonUp() override;
167  void OnMouseWheelForward() override;
168  void OnMouseWheelBackward() override;
170 
171  // These methods for the different interactions in different modes
172  // are overridden in subclasses to perform the correct motion. Since
173  // they are called by OnTimer, they do not have mouse coord parameters
174  // (use interactor's GetEventPosition and GetLastEventPosition)
175  void Rotate() override;
176  void Spin() override;
177  void Pan() override;
178  void Dolly() override;
179  void EnvironmentRotate() override;
180 
182 
185  vtkSetMacro(MotionFactor, double);
186  vtkGetMacro(MotionFactor, double);
188 
189 protected:
192 
193  double MotionFactor;
194 
195  virtual void Dolly(double factor);
196 
197 private:
199  void operator=(const vtkInteractorStyleTrackballCamera&) = delete;
200 };
201 
202 VTK_ABI_NAMESPACE_END
203 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
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)