vtkSMVRControlLocationRelativeStyleProxy.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 vtkSMVRControlLocationRelativeStyleProxy_h
12 #define vtkSMVRControlLocationRelativeStyleProxy_h
13 
14 #include "vtkMatrix4x4.h"
15 #include "vtkNew.h"
16 #include "vtkPVIncubatorCAVEInteractionStylesModule.h" // for export macro
17 #include "vtkSMVRTrackStyleProxy.h"
18 
19 struct vtkVREvent;
20 
21 class VTKPVINCUBATORCAVEINTERACTIONSTYLES_EXPORT vtkSMVRControlLocationRelativeStyleProxy
22  : public vtkSMVRTrackStyleProxy
23 {
24 public:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28  int GetControlledPropertySize() override { return 3; }
29 
30  // Overridden to defer expensive calculations and update vtk objects
31  bool Update() override;
32 
33 protected:
35  ~vtkSMVRControlLocationRelativeStyleProxy() override = default;
36 
37  void HandleButton(const vtkVREvent& data) override;
38  void HandleTracker(const vtkVREvent& data) override;
39 
40 private:
43  void operator=(const vtkSMVRControlLocationRelativeStyleProxy&) = delete;
44 
45  bool EnableMovePoint;
46  double OriginalPoint[3];
47  bool FirstUpdate;
48  double LastRecordedPosition[3];
49  bool PositionRecorded;
50 
51  vtkNew<vtkMatrix4x4> TrackerMatrix;
52 };
53 
54 #endif // vtkSMVRControlLocationRelativeStyleProxy_h
data
virtual void HandleButton(const vtkVREvent &event)
an interaction style to control the position of a point with a stylus
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.