ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkCameraManipulator.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "qPCL.h" // needed for export macro
11 #include "vtkObject.h"
12 
14 class vtkRenderer;
15 class vtkRenderWindowInteractor;
16 
17 class QPCL_ENGINE_LIB_API vtkCameraManipulator : public vtkObject {
18 public:
21  void PrintSelf(ostream& os, vtkIndent indent) override;
22 
24 
28  virtual void StartInteraction();
29  virtual void EndInteraction();
31 
32  virtual void OnMouseMove(int x,
33  int y,
34  vtkRenderer* ren,
35  vtkRenderWindowInteractor* iren);
36  virtual void OnButtonDown(int x,
37  int y,
38  vtkRenderer* ren,
39  vtkRenderWindowInteractor* iren);
40  virtual void OnButtonUp(int x,
41  int y,
42  vtkRenderer* ren,
43  vtkRenderWindowInteractor* iren);
44 
46 
51  virtual void OnKeyUp(vtkRenderWindowInteractor* iren);
52  virtual void OnKeyDown(vtkRenderWindowInteractor* iren);
54 
56 
61  vtkSetMacro(Button, int);
62  vtkGetMacro(Button, int);
63  vtkSetMacro(Shift, int);
64  vtkGetMacro(Shift, int);
65  vtkBooleanMacro(Shift, int);
66  vtkSetMacro(Control, int);
67  vtkGetMacro(Control, int);
68  vtkBooleanMacro(Control, int);
70 
72 
75  vtkSetVector3Macro(Center, double);
76  vtkGetVector3Macro(Center, double);
78 
80 
83  vtkSetMacro(RotationFactor, double);
84  vtkGetMacro(RotationFactor, double);
86 
88 
91  vtkSetStringMacro(ManipulatorName);
92  vtkGetStringMacro(ManipulatorName);
94 
96 
101 
102 protected:
104  ~vtkCameraManipulator() override;
106 
108 
109  int Button;
110  int Shift;
111  int Control;
112 
113  double Center[3];
115  double DisplayCenter[2];
116  void ComputeDisplayCenter(vtkRenderer* ren);
117 
119 
120 private:
122  void operator=(const vtkCameraManipulator&) = delete;
123 };
vtkSetMacro(RotationFactor, double)
vtkBooleanMacro(Shift, int)
vtkGetMacro(Shift, int)
vtkBooleanMacro(Control, int)
void SetGUIHelper(vtkCameraManipulatorGUIHelper *)
vtkSetMacro(Control, int)
vtkSetVector3Macro(Center, double)
vtkSetMacro(Shift, int)
vtkGetStringMacro(ManipulatorName)
vtkGetVector3Macro(Center, double)
vtkGetMacro(Control, int)
vtkTypeMacro(vtkCameraManipulator, vtkObject)
vtkSetStringMacro(ManipulatorName)
vtkSetMacro(Button, int)
vtkGetMacro(RotationFactor, double)
vtkGetMacro(Button, int)
static vtkCameraManipulator * New()
vtkGetObjectMacro(GUIHelper, vtkCameraManipulatorGUIHelper)
vtkCameraManipulatorGUIHelper * GUIHelper
normal_z y
normal_z x
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15