vtkPVInteractorStyle.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVInteractorStyle.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 =========================================================================*/
27 #ifndef vtkPVInteractorStyle_h
28 #define vtkPVInteractorStyle_h
29 
31 #include "vtkPVVTKExtensionsInteractionStyleModule.h" // needed for export macro
32 
34 class vtkCollection;
35 
38 {
39 public:
40  static vtkPVInteractorStyle* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
49  void OnMouseMove() override;
50  void OnLeftButtonDown() override;
51  void OnLeftButtonUp() override;
52  void OnMiddleButtonDown() override;
53  void OnMiddleButtonUp() override;
54  void OnRightButtonDown() override;
55  void OnRightButtonUp() override;
57 
59 
64  void OnKeyDown() override;
65  void OnKeyUp() override;
67 
72  void OnChar() override;
73 
77  void AddManipulator(vtkCameraManipulator* m);
78 
82  void RemoveAllManipulators();
83 
85 
88  vtkGetObjectMacro(CameraManipulators, vtkCollection);
90 
92 
101  vtkSetVector3Macro(CenterOfRotation, double);
102  vtkGetVector3Macro(CenterOfRotation, double);
104 
106 
115  vtkSetMacro(RotationFactor, double);
116  vtkGetMacro(RotationFactor, double);
118 
122  virtual vtkCameraManipulator* FindManipulator(int button, int shift, int control);
123 
127  static void DollyToPosition(double fact, int* position, vtkRenderer* renderer);
128 
132  static void TranslateCamera(vtkRenderer* renderer, int toX, int toY, int fromX, int fromY);
133 
135 
136 protected:
138  ~vtkPVInteractorStyle() override;
139 
140  void Dolly(double factor) override;
141 
143  double CenterOfRotation[3];
145 
146  // The CameraInteractors also store there button and modifier.
148 
149  void OnButtonDown(int button, int shift, int control);
150  void OnButtonUp(int button);
151  void ResetLights();
152 
154  void operator=(const vtkPVInteractorStyle&) = delete;
155 };
156 
157 #endif
virtual void OnKeyUp()
void PrintSelf(ostream &os, vtkIndent indent)
vtkCollection * CameraManipulators
Abstraction of style away from button.
static vtkInteractorStyleTrackballCamera * New()
#define VTKPVVTKEXTENSIONSINTERACTIONSTYLE_EXPORT
virtual void OnKeyDown()
virtual void OnChar()
interactive manipulation of the camera
void operator=(const vtkObjectBase &)
vtkCameraManipulator * CurrentManipulator