vtkCameraManipulator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkCameraManipulator.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkCameraManipulator_h
27 #define vtkCameraManipulator_h
28 
29 #include "vtkObject.h"
30 #include "vtkPVVTKExtensionsInteractionStyleModule.h" // needed for export macro
31 
33 class vtkRenderer;
35 
37 {
38 public:
39  static vtkCameraManipulator* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
48  virtual void StartInteraction();
49  virtual void EndInteraction();
51 
52  virtual void OnMouseMove(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* iren);
53  virtual void OnButtonDown(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* iren);
54  virtual void OnButtonUp(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* iren);
55 
57 
62  virtual void OnKeyUp(vtkRenderWindowInteractor* iren);
63  virtual void OnKeyDown(vtkRenderWindowInteractor* iren);
65 
67 
72  vtkSetMacro(Button, int);
73  vtkGetMacro(Button, int);
74  vtkSetMacro(Shift, int);
75  vtkGetMacro(Shift, int);
76  vtkBooleanMacro(Shift, int);
77  vtkSetMacro(Control, int);
78  vtkGetMacro(Control, int);
79  vtkBooleanMacro(Control, int);
81 
83 
86  vtkSetVector3Macro(Center, double);
87  vtkGetVector3Macro(Center, double);
89 
91 
94  vtkSetMacro(RotationFactor, double);
95  vtkGetMacro(RotationFactor, double);
97 
99 
102  vtkSetStringMacro(ManipulatorName);
103  vtkGetStringMacro(ManipulatorName);
105 
107 
110  void SetGUIHelper(vtkCameraManipulatorGUIHelper*);
111  vtkGetObjectMacro(GUIHelper, vtkCameraManipulatorGUIHelper);
112 
113 protected:
115  ~vtkCameraManipulator() override;
117 
119 
120  int Button;
121  int Shift;
122  int Control;
123 
124  double Center[3];
126  double DisplayCenter[2];
127  void ComputeDisplayCenter(vtkRenderer* ren);
128 
130 
131 private:
133  void operator=(const vtkCameraManipulator&) = delete;
134 };
135 
136 #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 &)