VTK  9.3.0
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
29#ifndef vtkInteractorStyleTrackballCamera_h
30#define vtkInteractorStyleTrackballCamera_h
31
32#include "vtkInteractionStyleModule.h" // For export macro
33#include "vtkInteractorStyle.h"
34
35VTK_ABI_NAMESPACE_BEGIN
36class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
44
48 void OnMouseMove() override;
49 void OnLeftButtonDown() override;
50 void OnLeftButtonUp() override;
51 void OnMiddleButtonDown() override;
52 void OnMiddleButtonUp() override;
53 void OnRightButtonDown() override;
54 void OnRightButtonUp() override;
55 void OnMouseWheelForward() override;
56 void OnMouseWheelBackward() override;
58
59 // These methods for the different interactions in different modes
60 // are overridden in subclasses to perform the correct motion. Since
61 // they are called by OnTimer, they do not have mouse coord parameters
62 // (use interactor's GetEventPosition and GetLastEventPosition)
63 void Rotate() override;
64 void Spin() override;
65 void Pan() override;
66 void Dolly() override;
67 void EnvironmentRotate() override;
68
70
73 vtkSetMacro(MotionFactor, double);
74 vtkGetMacro(MotionFactor, double);
76
77protected:
80
82
83 virtual void Dolly(double factor);
84
85private:
87 void operator=(const vtkInteractorStyleTrackballCamera&) = delete;
88};
89
90VTK_ABI_NAMESPACE_END
91#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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)
static vtkInteractorStyleTrackballCamera * New()
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...
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)