Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Rendering/vtkInteractorStyleFlight.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkInteractorStyleFlight.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00016
    00057 #ifndef __vtkInteractorStyleFlight_h
    00058 #define __vtkInteractorStyleFlight_h
    00059
    00060 #include "vtkInteractorStyle.h"
    00061 class vtkCamera;
    00062 class vtkPerspectiveTransform;
    00063 //BTX
    00064 class CPIDControl;
    00065 //ETX
    00066
    00067 class VTK_RENDERING_EXPORT vtkInteractorStyleFlight : public vtkInteractorStyle
    00068 {
    00069 public:
    00070   static vtkInteractorStyleFlight *New();
    00071   vtkTypeRevisionMacro(vtkInteractorStyleFlight,vtkInteractorStyle);
    00072   void PrintSelf(ostream& os, vtkIndent indent);
    00073
    00076   void JumpTo(double campos[3], double focpos[3]);
    00077
    00079
    00080   vtkSetMacro(MotionStepSize,double);
    00081   vtkGetMacro(MotionStepSize,double);
    00083
    00085
    00086   vtkSetMacro(MotionAccelerationFactor,double);
    00087   vtkGetMacro(MotionAccelerationFactor,double);
    00089
    00091
    00092   vtkSetMacro(AngleStepSize,double);
    00093   vtkGetMacro(AngleStepSize,double);
    00095
    00097
    00098   vtkSetMacro(AngleAccelerationFactor,double);
    00099   vtkGetMacro(AngleAccelerationFactor,double);
    00101
    00103
    00104   vtkSetMacro(DisableMotion,int);
    00105   vtkGetMacro(DisableMotion,int);
    00106   vtkBooleanMacro(DisableMotion,int);
    00108
    00110
    00115   vtkSetMacro(RestoreUpVector,int);
    00116   vtkGetMacro(RestoreUpVector,int);
    00117   vtkBooleanMacro(RestoreUpVector,int);
    00119
    00120   // Specify "up" (by default {0,0,1} but can be changed)
    00121   vtkGetVectorMacro(DefaultUpVector,double,3);
    00122   vtkSetVectorMacro(DefaultUpVector,double,3);
    00123
    00125
    00126   virtual void OnMouseMove();
    00127   virtual void OnLeftButtonDown();
    00128   virtual void OnLeftButtonUp();
    00129   virtual void OnMiddleButtonDown();
    00130   virtual void OnMiddleButtonUp();
    00131   virtual void OnRightButtonDown();
    00132   virtual void OnRightButtonUp();
    00134
    00136
    00137   virtual void OnChar();
    00138   virtual void OnKeyDown();
    00139   virtual void OnKeyUp();
    00140   virtual void OnTimer();
    00141   //
    00142   virtual void ForwardFly();
    00143   virtual void ReverseFly();
    00144   //
    00145   virtual void StartForwardFly();
    00146   virtual void EndForwardFly();
    00147   virtual void StartReverseFly();
    00148   virtual void EndReverseFly();
    00150
    00151 protected:
    00152    vtkInteractorStyleFlight();
    00153   ~vtkInteractorStyleFlight();
    00154
    00156
    00157   void UpdateSteering(vtkCamera *cam);
    00158   void UpdateMouseSteering(vtkCamera *cam);
    00159   void FlyByMouse(vtkCamera* cam);
    00160   void FlyByKey(vtkCamera* cam);
    00161   void GetLRVector(double vector[3], vtkCamera* cam);
    00162   void MotionAlongVector(double vector[3], double amount, vtkCamera* cam);
    00163   void SetupMotionVars(vtkCamera *cam);
    00164   void FinishCamera(vtkCamera* cam);
    00165   //
    00166   //
    00167   unsigned char KeysDown;
    00168   int           DisableMotion;
    00169   int           RestoreUpVector;
    00170   double        DiagonalLength;
    00171   double        MotionStepSize;
    00172   double        MotionUserScale;
    00173   double        MotionAccelerationFactor;
    00174   double        AngleStepSize;
    00175   double        AngleAccelerationFactor;
    00176   double        DefaultUpVector[3];
    00177   double        AzimuthStepSize;
    00178   double        IdealFocalPoint[3];
    00179   vtkPerspectiveTransform *Transform;
    00180   double        DeltaYaw;
    00181   double        lYaw;
    00182   double        DeltaPitch;
    00183   double        lPitch;
    00185 //BTX
    00186   CPIDControl  *PID_Yaw;
    00187   CPIDControl  *PID_Pitch;
    00188 //ETX
    00189 private:
    00190   vtkInteractorStyleFlight(const vtkInteractorStyleFlight&);  // Not implemented.
    00191   void operator=(const vtkInteractorStyleFlight&);  // Not implemented.
    00192 };
    00193
    00194 #endif