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 
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_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   // Specify fixed "up"
00153   vtkGetVectorMacro(FixedUpVector,double,3);
00154   vtkSetVectorMacro(FixedUpVector,double,3);
00155 
00156 protected:
00157   vtkInteractorStyleFlight();
00158   ~vtkInteractorStyleFlight();
00159   //
00161   /*! Routines used internally for computing motion and steering */
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&);  // Not implemented.
00197   void operator=(const vtkInteractorStyleFlight&);  // Not implemented.
00198 };
00199 
00200 #endif

Generated on Thu Mar 28 14:19:32 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001