vtkCameraManipulator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkCameraManipulator_h
15 #define vtkCameraManipulator_h
16 
17 #include "vtkObject.h"
18 #include "vtkPVVTKExtensionsInteractionStyleModule.h" // needed for export macro
19 
21 class vtkRenderer;
23 
25 {
26 public:
27  static vtkCameraManipulator* New();
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
36  virtual void StartInteraction();
37  virtual void EndInteraction();
39 
40  virtual void OnMouseMove(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* iren);
41  virtual void OnButtonDown(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* iren);
42  virtual void OnButtonUp(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* iren);
43 
45 
50  virtual void OnKeyUp(vtkRenderWindowInteractor* iren);
51  virtual void OnKeyDown(vtkRenderWindowInteractor* iren);
53 
55 
60  vtkSetMacro(Button, int);
61  vtkGetMacro(Button, int);
62  vtkSetMacro(Shift, int);
63  vtkGetMacro(Shift, int);
64  vtkBooleanMacro(Shift, int);
65  vtkSetMacro(Control, int);
66  vtkGetMacro(Control, int);
67  vtkBooleanMacro(Control, int);
69 
71 
74  vtkSetVector3Macro(Center, double);
75  vtkGetVector3Macro(Center, double);
77 
79 
82  vtkSetMacro(RotationFactor, double);
83  vtkGetMacro(RotationFactor, double);
85 
87 
90  vtkSetStringMacro(ManipulatorName);
91  vtkGetStringMacro(ManipulatorName);
93 
95 
98  void SetGUIHelper(vtkCameraManipulatorGUIHelper*);
99  vtkGetObjectMacro(GUIHelper, vtkCameraManipulatorGUIHelper);
100 
101 protected:
103  ~vtkCameraManipulator() override;
105 
107 
108  int Button;
109  int Shift;
110  int Control;
111 
112  double Center[3];
114  double DisplayCenter[2];
115  void ComputeDisplayCenter(vtkRenderer* ren);
116 
118 
119 private:
121  void operator=(const vtkCameraManipulator&) = delete;
122 };
123 
124 #endif
Helper class for Camera Manipulators.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstraction of style away from button.
vtkCameraManipulatorGUIHelper * GUIHelper
#define VTKPVVTKEXTENSIONSINTERACTIONSTYLE_EXPORT
static vtkObject * New()
void operator=(const vtkObjectBase &)