Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkInteractorStyleFlight.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInteractorStyleFlight.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00041 #ifndef __vtkInteractorStyleFlight_h
00042 #define __vtkInteractorStyleFlight_h
00043 
00044 #include "vtkInteractorStyle.h"
00045 class vtkCamera;
00046 class vtkPerspectiveTransform;
00047 //BTX
00048 class CPIDControl;
00049 //ETX
00050 
00051 class VTK_RENDERING_EXPORT vtkInteractorStyleFlight : public vtkInteractorStyle
00052 {
00053 public:
00054   static vtkInteractorStyleFlight *New();
00055   vtkTypeRevisionMacro(vtkInteractorStyleFlight,vtkInteractorStyle);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00060   void JumpTo(double campos[3], double focpos[3]);
00061 
00063 
00064   vtkSetMacro(MotionStepSize,double);
00065   vtkGetMacro(MotionStepSize,double);
00067 
00069 
00070   vtkSetMacro(MotionAccelerationFactor,double);
00071   vtkGetMacro(MotionAccelerationFactor,double);
00073 
00075 
00076   vtkSetMacro(AngleStepSize,double);
00077   vtkGetMacro(AngleStepSize,double);
00079 
00081 
00082   vtkSetMacro(AngleAccelerationFactor,double);
00083   vtkGetMacro(AngleAccelerationFactor,double);
00085 
00087 
00088   vtkSetMacro(DisableMotion,int);
00089   vtkGetMacro(DisableMotion,int);
00090   vtkBooleanMacro(DisableMotion,int);
00092 
00094 
00099   vtkSetMacro(RestoreUpVector,int);
00100   vtkGetMacro(RestoreUpVector,int);
00101   vtkBooleanMacro(RestoreUpVector,int);
00103 
00104   // Specify "up" (by default {0,0,1} but can be changed)
00105   vtkGetVectorMacro(DefaultUpVector,double,3);
00106   vtkSetVectorMacro(DefaultUpVector,double,3);
00107 
00109 
00110   virtual void OnMouseMove();
00111   virtual void OnLeftButtonDown();
00112   virtual void OnLeftButtonUp();
00113   virtual void OnMiddleButtonDown();
00114   virtual void OnMiddleButtonUp();
00115   virtual void OnRightButtonDown();
00116   virtual void OnRightButtonUp();
00118 
00120 
00121   virtual void OnChar();
00122   virtual void OnKeyDown();
00123   virtual void OnKeyUp();
00124   virtual void OnTimer();
00125   //
00126   virtual void ForwardFly();
00127   virtual void ReverseFly();
00128   //
00129   virtual void StartForwardFly();
00130   virtual void EndForwardFly();
00131   virtual void StartReverseFly();
00132   virtual void EndReverseFly();
00134 
00135 protected:
00136    vtkInteractorStyleFlight();
00137   ~vtkInteractorStyleFlight();
00138 
00140 
00141   void UpdateSteering(vtkCamera *cam);
00142   void UpdateMouseSteering(vtkCamera *cam);
00143   void FlyByMouse(vtkCamera* cam);
00144   void FlyByKey(vtkCamera* cam);
00145   void GetLRVector(double vector[3], vtkCamera* cam);
00146   void MotionAlongVector(double vector[3], double amount, vtkCamera* cam);
00147   void SetupMotionVars(vtkCamera *cam);
00148   void FinishCamera(vtkCamera* cam);
00149   //
00150   //
00151   unsigned char KeysDown;
00152   int           DisableMotion;
00153   int           RestoreUpVector;
00154   double        DiagonalLength;
00155   double        MotionStepSize;
00156   double        MotionUserScale;
00157   double        MotionAccelerationFactor;
00158   double        AngleStepSize;
00159   double        AngleAccelerationFactor;
00160   double        DefaultUpVector[3];
00161   double        AzimuthStepSize;
00162   double        IdealFocalPoint[3];
00163   vtkPerspectiveTransform *Transform;
00164   double        DeltaYaw;
00165   double        lYaw;
00166   double        DeltaPitch;
00167   double        lPitch;
00169 //BTX
00170   CPIDControl  *PID_Yaw;
00171   CPIDControl  *PID_Pitch;
00172 //ETX
00173 private:
00174   vtkInteractorStyleFlight(const vtkInteractorStyleFlight&);  // Not implemented.
00175   void operator=(const vtkInteractorStyleFlight&);  // Not implemented.
00176 };
00177 
00178 #endif

Generated on Mon Jan 21 23:07:34 2008 for VTK by  doxygen 1.4.3-20050530