VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Interaction/Style/vtkInteractorStyleTrackballActor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkInteractorStyleTrackballActor.h
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 =========================================================================*/
00039 #ifndef vtkInteractorStyleTrackballActor_h
00040 #define vtkInteractorStyleTrackballActor_h
00041 
00042 #include "vtkInteractionStyleModule.h" // For export macro
00043 #include "vtkInteractorStyle.h"
00044 
00045 class vtkCellPicker;
00046 
00047 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
00048 {
00049 public:
00050   static vtkInteractorStyleTrackballActor *New();
00051   vtkTypeMacro(vtkInteractorStyleTrackballActor,vtkInteractorStyle);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055 
00057   virtual void OnMouseMove();
00058   virtual void OnLeftButtonDown();
00059   virtual void OnLeftButtonUp();
00060   virtual void OnMiddleButtonDown();
00061   virtual void OnMiddleButtonUp();
00062   virtual void OnRightButtonDown();
00063   virtual void OnRightButtonUp();
00065 
00066   // These methods for the different interactions in different modes
00067   // are overridden in subclasses to perform the correct motion. Since
00068   // they might be called from OnTimer, they do not have mouse coord parameters
00069   // (use interactor's GetEventPosition and GetLastEventPosition)
00070   virtual void Rotate();
00071   virtual void Spin();
00072   virtual void Pan();
00073   virtual void Dolly();
00074   virtual void UniformScale();
00075 
00076 protected:
00077   vtkInteractorStyleTrackballActor();
00078   ~vtkInteractorStyleTrackballActor();
00079 
00080   void FindPickedActor(int x, int y);
00081 
00082   void Prop3DTransform(vtkProp3D *prop3D,
00083                        double *boxCenter,
00084                        int NumRotation,
00085                        double **rotate,
00086                        double *scale);
00087 
00088   double MotionFactor;
00089 
00090   vtkProp3D *InteractionProp;
00091   vtkCellPicker *InteractionPicker;
00092 
00093 private:
00094   vtkInteractorStyleTrackballActor(const vtkInteractorStyleTrackballActor&);  // Not implemented.
00095   void operator=(const vtkInteractorStyleTrackballActor&);  // Not implemented.
00096 };
00097 
00098 #endif