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

graphics/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 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013 
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020 
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024 
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027 
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038 
00039 =========================================================================*/
00040 
00070 #ifndef __vtkInteractorStyleFlight_h
00071 #define __vtkInteractorStyleFlight_h
00072 
00073 #include "vtkInteractorStyle.h"
00074 
00075 class VTK_EXPORT vtkInteractorStyleFlight : public vtkInteractorStyle
00076 {
00077 public:
00078   static vtkInteractorStyleFlight *New();
00079   vtkTypeMacro(vtkInteractorStyleFlight,vtkInteractorStyle);
00080   void PrintSelf(ostream& os, vtkIndent indent);
00081 
00083   virtual   void OnRightButtonDown (int ctrl, int shift, int X, int Y);
00084   virtual   void OnRightButtonUp   (int ctrl, int shift, int X, int Y);
00085   virtual   void OnMiddleButtonDown(int ctrl, int shift, int X, int Y);
00086   virtual   void OnMiddleButtonUp  (int ctrl, int shift, int X, int Y);
00087   virtual   void OnLeftButtonDown  (int ctrl, int shift, int X, int Y);
00088   virtual   void OnLeftButtonUp    (int ctrl, int shift, int X, int Y);
00089   virtual   void OnMouseMove       (int ctrl, int shift, int X, int Y);
00090 
00092   virtual void OnChar   (int ctrl, int shift, char keycode, int repeatcount);
00093   virtual void OnKeyDown(int ctrl, int shift, char keycode, int repeatcount);
00094   virtual void OnKeyUp  (int ctrl, int shift, char keycode, int repeatcount);
00095 
00098   virtual void OnTimer(void);
00099 
00102   void JumpTo(double campos[3], double focpos[3]);
00103 
00108   void PerformAzimuthalScan(int numsteps);
00109 
00111   vtkSetMacro(MotionStepSize,double);
00112   vtkGetMacro(MotionStepSize,double);
00113 
00115   vtkSetMacro(MotionAccelerationFactor,double);
00116   vtkGetMacro(MotionAccelerationFactor,double);
00117 
00119   vtkSetMacro(AngleStepSize,double);
00120   vtkGetMacro(AngleStepSize,double);
00121 
00123   vtkSetMacro(AngleAccelerationFactor,double);
00124   vtkGetMacro(AngleAccelerationFactor,double);
00125 
00127   vtkSetMacro(DisableMotion,int);
00128   vtkGetMacro(DisableMotion,int);
00129   vtkBooleanMacro(DisableMotion,int);
00130 
00132   vtkSetMacro(FixUpVector,int);
00133   vtkGetMacro(FixUpVector,int);
00134   vtkBooleanMacro(FixUpVector,int);
00135 
00136   // Specify fixed "up"
00137   vtkGetVectorMacro(FixedUpVector,double,3);
00138   vtkSetVectorMacro(FixedUpVector,double,3);
00139 
00140 protected:
00141   vtkInteractorStyleFlight();
00142   ~vtkInteractorStyleFlight();
00143   vtkInteractorStyleFlight(const vtkInteractorStyleFlight&) {};
00144   void operator=(const vtkInteractorStyleFlight&) {};
00145   //
00147   void DoTimerStart(void);
00148   void DoTimerStop(void);
00149   void UpdateMouseSteering(int x, int y);
00150   void FlyByMouse(void);
00151   void FlyByKey(void);
00152   void ComputeLRVector(double vector[3]);
00153   void MotionAlongVector(double vector[3], double amount);
00154   void SetupMotionVars(void);
00155   void AzimuthScan(void);
00156   //
00157   //
00158   unsigned char KeysDown;
00159   int           Flying;
00160   int           Reversing;
00161   int           TimerRunning;
00162   int           AzimuthScanning;
00163   int           DisableMotion;
00164   int           FixUpVector;
00165   double        OldX;
00166   double        OldY;
00167   double        X2;
00168   double        Y2;
00169   double        DiagonalLength;
00170   double        MotionStepSize;
00171   double        MotionUserScale;
00172   double        MotionAccelerationFactor;
00173   double        AngleStepSize;
00174   double        AngleAccelerationFactor;
00175   double        YawAngle;
00176   double        PitchAngle;
00177   double        FixedUpVector[3];
00178   double        AzimuthStepSize;
00179 };
00180 
00181 #endif

Generated on Wed Nov 21 12:26:59 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001