vtkSMVRTravelTrackballExoSplitStyleProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkSMVRTravelTrackballExoSplitStyleProxy_h
14 #define vtkSMVRTravelTrackballExoSplitStyleProxy_h
15 
16 #include "vtkMatrix4x4.h"
17 #include "vtkNew.h"
18 #include "vtkPVIncubatorCAVEInteractionStylesModule.h" // for export macro
20 #include "vtkTransform.h"
21 
22 struct vtkVREvent;
23 
24 class VTKPVINCUBATORCAVEINTERACTIONSTYLES_EXPORT vtkSMVRTravelTrackballExoSplitStyleProxy
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31  int GetControlledPropertySize() override { return 16; }
32 
33  // Overridden to defer expensive calculations and update vtk objects
34  bool Update() override;
35 
36 protected:
38  ~vtkSMVRTravelTrackballExoSplitStyleProxy() override = default;
39 
40  void HandleButton(const vtkVREvent& event) override;
41  void HandleTracker(const vtkVREvent& event) override;
42 
43 private:
46  void operator=(const vtkSMVRTravelTrackballExoSplitStyleProxy&) = delete;
47 
48  double LastRecordedPosition[3];
49  bool PositionRecorded;
50  bool EnableTranslate;
51  bool EnableRotate;
52 
53  vtkNew<vtkMatrix4x4> TrackerMatrix;
54  vtkNew<vtkMatrix4x4> TransformMatrix;
56  vtkNew<vtkMatrix4x4> ModelMatrix;
57  vtkNew<vtkMatrix4x4> ModelViewMatrix;
58  vtkNew<vtkMatrix4x4> InvViewMatrix;
59 };
60 
61 #endif // vtkSMVRTravelTrackballExoSplitStyleProxy_h
the base class for all interactor styles
virtual void HandleButton(const vtkVREvent &event)
Transform
virtual void HandleTracker(const vtkVREvent &event)
an interaction style to control translation and rotation with a stylus
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.