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

Rendering/vtkInteractorStyleTrackballActor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInteractorStyleTrackballActor.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 =========================================================================*/
00054 #ifndef __vtkInteractorStyleTrackballActor_h
00055 #define __vtkInteractorStyleTrackballActor_h
00056 
00057 #include "vtkInteractorStyle.h"
00058 
00059 class vtkCellPicker;
00060 
00061 class VTK_RENDERING_EXPORT vtkInteractorStyleTrackballActor : public vtkInteractorStyle
00062 {
00063 public:
00064   static vtkInteractorStyleTrackballActor *New();
00065   vtkTypeRevisionMacro(vtkInteractorStyleTrackballActor,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   vtkInteractorStyleTrackballActor();
00092   ~vtkInteractorStyleTrackballActor();
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   vtkInteractorStyleTrackballActor(const vtkInteractorStyleTrackballActor&);  // Not implemented.
00115   void operator=(const vtkInteractorStyleTrackballActor&);  // Not implemented.
00116 };
00117 
00118 #endif