vtkPVJoystickFly.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVJoystickFly.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 =========================================================================*/
23 #ifndef vtkPVJoystickFly_h
24 #define vtkPVJoystickFly_h
25 
26 #include "vtkCameraManipulator.h"
27 #include "vtkPVVTKExtensionsInteractionStyleModule.h" // needed for export macro
28 
29 class vtkRenderer;
30 
32 {
33 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
42  void OnMouseMove(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* rwi) override;
43  void OnButtonDown(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* rwi) override;
44  void OnButtonUp(int x, int y, vtkRenderer* ren, vtkRenderWindowInteractor* rwi) override;
46 
48 
51  vtkSetClampMacro(FlySpeed, double, 1, 30);
52  vtkGetMacro(FlySpeed, double);
54 
55 protected:
57  ~vtkPVJoystickFly() override;
58 
59  int In;
60  int FlyFlag;
61 
62  double FlySpeed;
63  double Scale;
65  double CameraXAxis[3];
66  double CameraYAxis[3];
67  double CameraZAxis[3];
68 
69  void Fly(vtkRenderer* ren, vtkRenderWindowInteractor* rwi, double scale, double speed);
70  void ComputeCameraAxes(vtkRenderer*);
71 
72  vtkPVJoystickFly(const vtkPVJoystickFly&) = delete;
73  void operator=(const vtkPVJoystickFly&) = delete;
74 };
75 
76 #endif
Abstraction of style away from button.
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKPVVTKEXTENSIONSINTERACTIONSTYLE_EXPORT
Fly camera towards or away from the object.
virtual void OnMouseMove(int x, int y, vtkRenderer *ren, vtkRenderWindowInteractor *iren)
virtual void OnButtonUp(int x, int y, vtkRenderer *ren, vtkRenderWindowInteractor *iren)
virtual void OnButtonDown(int x, int y, vtkRenderer *ren, vtkRenderWindowInteractor *iren)