VTK  9.5.2
vtkInteractorStyleFlight.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
23
24#ifndef vtkInteractorStyleFlight_h
25#define vtkInteractorStyleFlight_h
26
27#include "vtkInteractionStyleModule.h" // For export macro
28#include "vtkInteractorStyle.h"
29#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30VTK_ABI_NAMESPACE_BEGIN
31class vtkCamera;
33
34class CPIDControl;
35
36class VTKINTERACTIONSTYLE_EXPORT VTK_MARSHALAUTO vtkInteractorStyleFlight
37 : public vtkInteractorStyle
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
48 void JumpTo(double campos[3], double focpos[3]);
49
51
54 vtkSetMacro(MotionStepSize, double);
55 vtkGetMacro(MotionStepSize, double);
57
59
62 vtkSetMacro(MotionAccelerationFactor, double);
63 vtkGetMacro(MotionAccelerationFactor, double);
65
67
70 vtkSetMacro(AngleStepSize, double);
71 vtkGetMacro(AngleStepSize, double);
73
75
78 vtkSetMacro(AngleAccelerationFactor, double);
79 vtkGetMacro(AngleAccelerationFactor, double);
81
83
88 vtkBooleanMacro(DisableMotion, vtkTypeBool);
90
92
101 vtkBooleanMacro(RestoreUpVector, vtkTypeBool);
103
104 // Specify "up" (by default {0,0,1} but can be changed)
105 vtkGetVectorMacro(DefaultUpVector, double, 3);
106 vtkSetVectorMacro(DefaultUpVector, double, 3);
107
109
112 void OnMouseMove() override;
113 void OnLeftButtonDown() override;
114 void OnLeftButtonUp() override;
115 void OnMiddleButtonDown() override;
116 void OnMiddleButtonUp() override;
117 void OnRightButtonDown() override;
118 void OnRightButtonUp() override;
120
122
125 void OnChar() override;
126 void OnKeyDown() override;
127 void OnKeyUp() override;
128 void OnTimer() override;
129 //
130 virtual void ForwardFly();
131 virtual void ReverseFly();
132 //
133 virtual void StartForwardFly();
134 virtual void EndForwardFly();
135 virtual void StartReverseFly();
136 virtual void EndReverseFly();
138
139protected:
142
144
150 void FlyByKey(vtkCamera* cam);
151 void GetLRVector(double vector[3], vtkCamera* cam);
152 void MotionAlongVector(double vector[3], double amount, vtkCamera* cam);
155 //
156 //
157 unsigned char KeysDown;
170 double DeltaYaw;
171 double lYaw;
173 double lPitch;
175
176 CPIDControl* PID_Yaw;
177 CPIDControl* PID_Pitch;
178
179private:
181 void operator=(const vtkInteractorStyleFlight&) = delete;
182};
183
184VTK_ABI_NAMESPACE_END
185#endif
a virtual camera for 3D rendering
Definition vtkCamera.h:42
a simple class to control print indentation
Definition vtkIndent.h:29
void OnLeftButtonDown() override
Concrete implementation of Mouse event bindings for flight.
unsigned char KeysDown
Routines used internally for computing motion and steering.
double AzimuthStepSize
Routines used internally for computing motion and steering.
double MotionStepSize
Routines used internally for computing motion and steering.
void OnRightButtonDown() override
Concrete implementation of Mouse event bindings for flight.
void OnRightButtonUp() override
Concrete implementation of Mouse event bindings for flight.
void OnMiddleButtonDown() override
Concrete implementation of Mouse event bindings for flight.
~vtkInteractorStyleFlight() override
void MotionAlongVector(double vector[3], double amount, vtkCamera *cam)
Routines used internally for computing motion and steering.
void GetLRVector(double vector[3], vtkCamera *cam)
Routines used internally for computing motion and steering.
void UpdateSteering(vtkCamera *cam)
Routines used internally for computing motion and steering.
double DeltaYaw
Routines used internally for computing motion and steering.
double DeltaPitch
Routines used internally for computing motion and steering.
void SetupMotionVars(vtkCamera *cam)
Routines used internally for computing motion and steering.
double DiagonalLength
Routines used internally for computing motion and steering.
virtual void ReverseFly()
Concrete implementation of Keyboard event bindings for flight.
double MotionUserScale
Routines used internally for computing motion and steering.
double AngleAccelerationFactor
Routines used internally for computing motion and steering.
void OnMouseMove() override
Concrete implementation of Mouse event bindings for flight.
vtkPerspectiveTransform * Transform
Routines used internally for computing motion and steering.
void FlyByMouse(vtkCamera *cam)
Routines used internally for computing motion and steering.
double MotionAccelerationFactor
Routines used internally for computing motion and steering.
void FinishCamera(vtkCamera *cam)
Routines used internally for computing motion and steering.
double lYaw
Routines used internally for computing motion and steering.
void OnKeyUp() override
Concrete implementation of Keyboard event bindings for flight.
void OnMiddleButtonUp() override
Concrete implementation of Mouse event bindings for flight.
static vtkInteractorStyleFlight * New()
virtual void StartForwardFly()
Concrete implementation of Keyboard event bindings for flight.
void OnLeftButtonUp() override
Concrete implementation of Mouse event bindings for flight.
virtual void StartReverseFly()
Concrete implementation of Keyboard event bindings for flight.
void JumpTo(double campos[3], double focpos[3])
Move the Eye/Camera to a specific location (no intermediate steps are taken.
virtual void EndReverseFly()
Concrete implementation of Keyboard event bindings for flight.
virtual void ForwardFly()
Concrete implementation of Keyboard event bindings for flight.
void OnChar() override
Concrete implementation of Keyboard event bindings for flight.
double lPitch
Routines used internally for computing motion and steering.
vtkTypeBool DisableMotion
Routines used internally for computing motion and steering.
vtkTypeBool RestoreUpVector
Routines used internally for computing motion and steering.
void OnKeyDown() override
Concrete implementation of Keyboard event bindings for flight.
void OnTimer() override
Concrete implementation of Keyboard event bindings for flight.
double DefaultUpVector[3]
Routines used internally for computing motion and steering.
void UpdateMouseSteering(vtkCamera *cam)
Routines used internally for computing motion and steering.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double IdealFocalPoint[3]
Routines used internally for computing motion and steering.
double AngleStepSize
Routines used internally for computing motion and steering.
virtual void EndForwardFly()
Concrete implementation of Keyboard event bindings for flight.
void FlyByKey(vtkCamera *cam)
Routines used internally for computing motion and steering.
describes a 4x4 matrix transformation
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO