VTK  9.7.1
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 
76  void Prop3DTransform(
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
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 UniformScale()
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:39
virtual void OnRightButtonUp()
a simple class to control print indentation
Definition: vtkIndent.h:28
manipulate objects in the scene independently of one another
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)
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:62
#define VTK_MARSHALAUTO
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.