VTK  9.3.20240418
vtkInteractorStyleJoystickActor.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
25 #ifndef vtkInteractorStyleJoystickActor_h
26 #define vtkInteractorStyleJoystickActor_h
27 
28 #include "vtkInteractionStyleModule.h" // For export macro
29 #include "vtkInteractorStyle.h"
30 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkCellPicker;
34 
35 // motion flags
36 
37 class VTKINTERACTIONSTYLE_EXPORT VTK_MARSHALAUTO vtkInteractorStyleJoystickActor
38  : public vtkInteractorStyle
39 {
40 public:
42 
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;
59 
60  // These methods for the different interactions in different modes
61  // are overridden in subclasses to perform the correct motion. Since
62  // they might be called from OnTimer, they do not have mouse coord parameters
63  // (use interactor's GetEventPosition and GetLastEventPosition)
64  void Rotate() override;
65  void Spin() override;
66  void Pan() override;
67  void Dolly() override;
68  void UniformScale() override;
69 
70 protected:
73 
74  void FindPickedActor(int x, int y);
75 
77  vtkProp3D* prop3D, double* boxCenter, int numRotation, double** rotate, double* scale);
78 
79  double MotionFactor;
80 
83 
84 private:
86  void operator=(const vtkInteractorStyleJoystickActor&) = delete;
87 };
88 
89 VTK_ABI_NAMESPACE_END
90 #endif
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:91
a simple class to control print indentation
Definition: vtkIndent.h:108
manipulate objects in the scene independently of one another
void OnRightButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void Prop3DTransform(vtkProp3D *prop3D, double *boxCenter, int numRotation, double **rotate, double *scale)
void OnLeftButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnLeftButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
static vtkInteractorStyleJoystickActor * New()
void OnRightButtonDown() 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 OnMiddleButtonUp() 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 PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void FindPickedActor(int x, int y)
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)
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:89
@ scale
Definition: vtkX3D.h:229
#define VTK_MARSHALAUTO