00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00070 #ifndef __vtkInteractorStyleFlight_h
00071 #define __vtkInteractorStyleFlight_h
00072
00073 #include "vtkInteractorStyle.h"
00074
00075 class VTK_RENDERING_EXPORT vtkInteractorStyleFlight : public vtkInteractorStyle
00076 {
00077 public:
00078 static vtkInteractorStyleFlight *New();
00079 vtkTypeMacro(vtkInteractorStyleFlight,vtkInteractorStyle);
00080 void PrintSelf(ostream& os, vtkIndent indent);
00081
00083
00084 virtual void OnRightButtonDown (int ctrl, int shift, int X, int Y);
00085 virtual void OnRightButtonUp (int ctrl, int shift, int X, int Y);
00086 virtual void OnMiddleButtonDown(int ctrl, int shift, int X, int Y);
00087 virtual void OnMiddleButtonUp (int ctrl, int shift, int X, int Y);
00088 virtual void OnLeftButtonDown (int ctrl, int shift, int X, int Y);
00089 virtual void OnLeftButtonUp (int ctrl, int shift, int X, int Y);
00090 virtual void OnMouseMove (int ctrl, int shift, int X, int Y);
00092
00094
00095 virtual void OnChar (int ctrl, int shift, char keycode, int repeatcount);
00096 virtual void OnKeyDown(int ctrl, int shift, char keycode, int repeatcount);
00097 virtual void OnKeyUp (int ctrl, int shift, char keycode, int repeatcount);
00099
00102 virtual void OnTimer(void);
00103
00106 void JumpTo(double campos[3], double focpos[3]);
00107
00112 void PerformAzimuthalScan(int numsteps);
00113
00115
00116 vtkSetMacro(MotionStepSize,double);
00117 vtkGetMacro(MotionStepSize,double);
00119
00121
00122 vtkSetMacro(MotionAccelerationFactor,double);
00123 vtkGetMacro(MotionAccelerationFactor,double);
00125
00127
00128 vtkSetMacro(AngleStepSize,double);
00129 vtkGetMacro(AngleStepSize,double);
00131
00133
00134 vtkSetMacro(AngleAccelerationFactor,double);
00135 vtkGetMacro(AngleAccelerationFactor,double);
00137
00139
00140 vtkSetMacro(DisableMotion,int);
00141 vtkGetMacro(DisableMotion,int);
00142 vtkBooleanMacro(DisableMotion,int);
00144
00146
00147 vtkSetMacro(FixUpVector,int);
00148 vtkGetMacro(FixUpVector,int);
00149 vtkBooleanMacro(FixUpVector,int);
00151
00152
00153 vtkGetVectorMacro(FixedUpVector,double,3);
00154 vtkSetVectorMacro(FixedUpVector,double,3);
00155
00156 protected:
00157 vtkInteractorStyleFlight();
00158 ~vtkInteractorStyleFlight();
00159
00161
00162 void DoTimerStart(void);
00163 void DoTimerStop(void);
00164 void UpdateMouseSteering(int x, int y);
00165 void FlyByMouse(void);
00166 void FlyByKey(void);
00167 void ComputeLRVector(double vector[3]);
00168 void MotionAlongVector(double vector[3], double amount);
00169 void SetupMotionVars(void);
00170 void AzimuthScan(void);
00171
00172
00173 unsigned char KeysDown;
00174 int Flying;
00175 int Reversing;
00176 int TimerRunning;
00177 int AzimuthScanning;
00178 int DisableMotion;
00179 int FixUpVector;
00180 double OldX;
00181 double OldY;
00182 double X2;
00183 double Y2;
00184 double DiagonalLength;
00185 double MotionStepSize;
00186 double MotionUserScale;
00187 double MotionAccelerationFactor;
00188 double AngleStepSize;
00189 double AngleAccelerationFactor;
00190 double YawAngle;
00191 double PitchAngle;
00192 double FixedUpVector[3];
00193 double AzimuthStepSize;
00195 private:
00196 vtkInteractorStyleFlight(const vtkInteractorStyleFlight&);
00197 void operator=(const vtkInteractorStyleFlight&);
00198 };
00199
00200 #endif