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

vtkInteractorStyleJoystickActor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInteractorStyleJoystickActor.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 =========================================================================*/
00047 #ifndef __vtkInteractorStyleJoystickActor_h
00048 #define __vtkInteractorStyleJoystickActor_h
00049 
00050 #include "vtkInteractorStyle.h"
00051 
00052 class vtkCellPicker;
00053 
00054 // motion flags
00055 
00056 class VTK_RENDERING_EXPORT vtkInteractorStyleJoystickActor : public vtkInteractorStyle
00057 {
00058 public:
00059   static vtkInteractorStyleJoystickActor *New();
00060 
00061   vtkTypeRevisionMacro(vtkInteractorStyleJoystickActor,vtkInteractorStyle);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00065 
00067   virtual void OnMouseMove();
00068   virtual void OnLeftButtonDown();
00069   virtual void OnLeftButtonUp();
00070   virtual void OnMiddleButtonDown();
00071   virtual void OnMiddleButtonUp();
00072   virtual void OnRightButtonDown();
00073   virtual void OnRightButtonUp();
00075 
00076   // These methods for the different interactions in different modes
00077   // are overridden in subclasses to perform the correct motion. Since
00078   // they might be called from OnTimer, they do not have mouse coord parameters
00079   // (use interactor's GetEventPosition and GetLastEventPosition)
00080   virtual void Rotate();
00081   virtual void Spin();
00082   virtual void Pan();
00083   virtual void Dolly();
00084   virtual void UniformScale();
00085 
00086 protected:
00087   vtkInteractorStyleJoystickActor();
00088   ~vtkInteractorStyleJoystickActor();
00089 
00090   void FindPickedActor(int x, int y);
00091 
00092   void Prop3DTransform(vtkProp3D *prop3D, 
00093                        double *boxCenter,
00094                        int numRotation, 
00095                        double **rotate,
00096                        double *scale);
00097 
00098   double MotionFactor;
00099 
00100   vtkProp3D *InteractionProp;
00101   vtkCellPicker *InteractionPicker;
00102 
00103 private:
00104   vtkInteractorStyleJoystickActor(const vtkInteractorStyleJoystickActor&);  // Not implemented.
00105   void operator=(const vtkInteractorStyleJoystickActor&);  // Not implemented.
00106 };
00107 
00108 #endif