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

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