vtkSMVRControlLocationEgoStyleProxy.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
11 #ifndef vtkSMVRControlLocationEgoStyleProxy_h
12 #define vtkSMVRControlLocationEgoStyleProxy_h
13 
14 #include "vtkNew.h"
15 #include "vtkPVIncubatorCAVEInteractionStylesModule.h" // for export macro
17 
18 class vtkCamera;
19 class vtkMatrix4x4;
23 struct vtkVREvent;
24 
25 class VTKPVINCUBATORCAVEINTERACTIONSTYLES_EXPORT vtkSMVRControlLocationEgoStyleProxy
27 {
28 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32  int GetControlledPropertySize() override { return 3; }
33 
34  // Overridden to defer expensive calculations and update vtk objects
35  bool Update() override;
36 
37 protected:
39  ~vtkSMVRControlLocationEgoStyleProxy() override = default;
40 
41  void HandleButton(const vtkVREvent& event) override;
42  void HandleTracker(const vtkVREvent& event) override;
43 
44 private:
46  const vtkSMVRControlLocationEgoStyleProxy&) = delete; // Not implemented
47  void operator=(const vtkSMVRControlLocationEgoStyleProxy&) = delete; // Not implemented
48 
49  bool EnableNavigate; /* mirrors the button assigned the "Navigate World" role */
50  bool IsInitialRecorded; /* flag indicating that we're in the middle of a navigation operation */
51  double Origin[4];
52  double OriginalOrigin[3];
53  bool FirstUpdate;
54 
55  vtkNew<vtkMatrix4x4> SavedModelMatrix;
56  vtkNew<vtkMatrix4x4> SavedInverseModelMatrix;
57  vtkNew<vtkMatrix4x4> SavedInverseWandMatrix;
58  vtkNew<vtkMatrix4x4> TrackerMatrix;
59  vtkNew<vtkMatrix4x4> TransformMatrix;
60 };
61 
62 #endif // vtkSMVRControlLocationEgoStyleProxy_h
the base class for all interactor styles
rotation and translation of a point with a single button
virtual void HandleButton(const vtkVREvent &event)
property representing a vector of integers
implementation for View that includes render window and renderers.
property representing a vector of doubles
virtual void HandleTracker(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.