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

vtkInteractorStyleTrackballActor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInteractorStyleTrackballActor.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 =========================================================================*/
00050 #ifndef __vtkInteractorStyleTrackballActor_h
00051 #define __vtkInteractorStyleTrackballActor_h
00052 
00053 #include "vtkInteractorStyle.h"
00054 
00055 class vtkCellPicker;
00056 
00057 class VTK_RENDERING_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
00058 {
00059 public:
00060   static vtkInteractorStyleTrackballActor *New();
00061   vtkTypeRevisionMacro(vtkInteractorStyleTrackballActor,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   vtkInteractorStyleTrackballActor();
00088   ~vtkInteractorStyleTrackballActor();
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   vtkInteractorStyleTrackballActor(const vtkInteractorStyleTrackballActor&);  // Not implemented.
00105   void operator=(const vtkInteractorStyleTrackballActor&);  // Not implemented.
00106 };
00107 
00108 #endif