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

# Rendering/vtkInteractorStyleJoystickActor.h

Go to the documentation of this file.

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