vtkSMVRTravelGrabExoSplitStyleProxy.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
14 #ifndef vtkSMVRTravelGrabExoSplitStyleProxy_h
15 #define vtkSMVRTravelGrabExoSplitStyleProxy_h
16 
17 #include "vtkNew.h"
18 #include "vtkPVIncubatorCAVEInteractionStylesModule.h" // for export macro
19 #include "vtkSMVRTrackStyleProxy.h"
20 
21 class vtkCamera;
22 class vtkMatrix4x4;
26 struct vtkVREvent;
27 
28 class VTKPVINCUBATORCAVEINTERACTIONSTYLES_EXPORT vtkSMVRTravelGrabExoSplitStyleProxy
29  : public vtkSMVRTrackStyleProxy
30 {
31 public:
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
36  // Overridden to defer expensive calculations and update vtk objects
37  bool Update() override;
38 
39 protected:
41  ~vtkSMVRTravelGrabExoSplitStyleProxy() override = default;
42 
43  void HandleButton(const vtkVREvent& event) override;
44  void HandleTracker(const vtkVREvent& event) override;
45 
46 private:
48  const vtkSMVRTravelGrabExoSplitStyleProxy&) = delete; // Not implemented
49  void operator=(const vtkSMVRTravelGrabExoSplitStyleProxy&) = delete; // Not implemented
50 
51  // mirrors the state of the button assigned the "Translate World" role,
52  // indicating whether or not we are currently translating
53  bool EnableTranslate;
54 
55  // mirrors the button assigned the "Rotate World" role, indicating
56  // whether or not we are currently rotating
57  bool EnableRotate;
58 
59  // Indicates whether we still need to capture the initial state after
60  // button press
61  bool IsInitialRecorded;
62 
63  // Saved on button down to capture the target property matrix and
64  // the inverse wand matrix
65  vtkNew<vtkMatrix4x4> InverseWandMatrix;
66  vtkNew<vtkMatrix4x4> SavedPropertyMatrix;
67 
68  // Some matrices used for other internal computations. Keep them
69  // here to avoid creating and destroying them on every event.
70  vtkNew<vtkMatrix4x4> TrackerMatrix;
71  vtkNew<vtkMatrix4x4> TransformMatrix;
72  vtkNew<vtkMatrix4x4> TranslateMatrix;
73  vtkNew<vtkMatrix4x4> TranslateToOrigin;
74  vtkNew<vtkMatrix4x4> TranslateBack;
75 
76  double CurrentTranslation[3];
77 };
78 
79 #endif // vtkSMVRTravelGrabExoSplitStyleProxy_h
virtual void HandleButton(const vtkVREvent &event)
an interaction style to control a matrix
property representing a vector of integers
implementation for View that includes render window and renderers.
property representing a vector of doubles
void PrintSelf(ostream &os, vtkIndent indent) override
void HandleTracker(const vtkVREvent &event) override
interactor style for head tracking
static vtkSMVRTrackStyleProxy * New()
bool Update() override
Update() called to update all the remote vtkObjects and perhaps even to render.