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 
24 class VTKPVVTKEXTENSIONSINTERACTIONSTYLE_EXPORT vtkCameraManipulator : public vtkObject
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
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkCameraManipulator::ManipulatorName
char * ManipulatorName
Definition: vtkCameraManipulator.h:106
vtkObject::New
static vtkObject * New()
vtkObject
vtkCameraManipulator::Button
int Button
Definition: vtkCameraManipulator.h:108
vtkIndent
vtkCameraManipulator::GUIHelper
vtkCameraManipulatorGUIHelper * GUIHelper
Definition: vtkCameraManipulator.h:117
vtkCameraManipulator::Shift
int Shift
Definition: vtkCameraManipulator.h:109
vtkRenderWindowInteractor
vtkCameraManipulatorGUIHelper
Helper class for Camera Manipulators.
Definition: vtkCameraManipulatorGUIHelper.h:23
vtkObject.h
vtkCameraManipulator
Abstraction of style away from button.
Definition: vtkCameraManipulator.h:24
vtkRenderer
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkCameraManipulator::Control
int Control
Definition: vtkCameraManipulator.h:110
vtkCameraManipulator::RotationFactor
double RotationFactor
Definition: vtkCameraManipulator.h:113