vtkSMVRJoystickCameraStyleProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkSMVRJoystickCameraStyleProxy_h
15 #define vtkSMVRJoystickCameraStyleProxy_h
16 
17 #include "vtkPVIncubatorCAVEInteractionStylesModule.h" // for export macro
19 
20 class vtkCamera;
24 struct vtkVREvent;
25 
26 class VTKPVINCUBATORCAVEINTERACTIONSTYLES_EXPORT vtkSMVRJoystickCameraStyleProxy
28 {
29 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
37  int GetControlledPropertySize() override { return 0; }
38 
40 
43  vtkSetMacro(LookRotationSensitivity, double);
44  vtkGetMacro(LookRotationSensitivity, double);
46 
48 
51  vtkSetMacro(MoveCameraSensitivity, double);
52  vtkGetMacro(MoveCameraSensitivity, double);
54 
56 
59  vtkSetMacro(InvertXAxis, bool);
60  vtkGetMacro(InvertXAxis, bool);
61  vtkSetMacro(InvertYAxis, bool);
62  vtkGetMacro(InvertYAxis, bool);
64 
68  enum Axis
69  {
70  X_AXIS = 0,
72  Z_AXIS
73  };
74 
76 
80  vtkSetMacro(UpAxis, Axis);
81  vtkGetMacro(UpAxis, Axis);
83 
87  bool Update() override;
88 
93  void UpdateVTKObjects() override;
94 
95 protected:
97  ~vtkSMVRJoystickCameraStyleProxy() override = default;
98 
99  void HandleValuator(const vtkVREvent& event) override;
100 
101 private:
103  void operator=(const vtkSMVRJoystickCameraStyleProxy&) = delete;
104 
105  double OrientationX = 0;
106  bool InvertXAxis = false;
107  double OrientationY = 0;
108  bool InvertYAxis = false;
109 
110  double MoveForward = 0;
111  double MoveRight = 0;
112 
113  Axis UpAxis = Y_AXIS;
114 
115  double LookRotationSensitivity = 0.01;
116  double MoveCameraSensitivity = 0.1;
117 };
118 
119 #endif // vtkSMVRJoystickCameraStyleProxy_h
interactor style with a controller with joysticks
the base class for all interactor styles
Axis
Enum axis to retrieve the forward, the right and the up axis of the scene.
property representing a vector of integers
virtual void UpdateVTKObjects()
Update the VTK object on the server by pushing the values of all modified properties (un-modified pro...
implementation for View that includes render window and renderers.
property representing a vector of doubles
virtual void HandleValuator(const vtkVREvent &event)
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSMVRInteractorStyleProxy * New()
virtual bool Update()
Update() called to update all the remote vtkObjects and perhaps even to render.
int GetControlledPropertySize() override
Override this function to automatically set the controlled property.