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

dox/Rendering/vtkInteractorStyleSwitch.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkInteractorStyleSwitch.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 =========================================================================*/ 00038 #ifndef __vtkInteractorStyleSwitch_h 00039 #define __vtkInteractorStyleSwitch_h 00040 00041 #include "vtkInteractorStyle.h" 00042 00043 #define VTKIS_JOYSTICK 0 00044 #define VTKIS_TRACKBALL 1 00045 00046 #define VTKIS_CAMERA 0 00047 #define VTKIS_ACTOR 1 00048 00049 class vtkInteractorStyleJoystickActor; 00050 class vtkInteractorStyleJoystickCamera; 00051 class vtkInteractorStyleTrackballActor; 00052 class vtkInteractorStyleTrackballCamera; 00053 00054 class VTK_RENDERING_EXPORT vtkInteractorStyleSwitch : public vtkInteractorStyle 00055 { 00056 public: 00057 static vtkInteractorStyleSwitch *New(); 00058 vtkTypeRevisionMacro(vtkInteractorStyleSwitch, vtkInteractorStyle); 00059 void PrintSelf(ostream& os, vtkIndent indent); 00060 00062 void SetInteractor(vtkRenderWindowInteractor *iren); 00063 00066 void SetAutoAdjustCameraClippingRange( int value ); 00067 00069 00070 vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle); 00071 void SetCurrentStyleToJoystickActor(); 00072 void SetCurrentStyleToJoystickCamera(); 00073 void SetCurrentStyleToTrackballActor(); 00074 void SetCurrentStyleToTrackballCamera(); 00076 00079 virtual void OnChar(); 00080 00081 protected: 00082 vtkInteractorStyleSwitch(); 00083 ~vtkInteractorStyleSwitch(); 00084 00085 void SetCurrentStyle(); 00086 00087 vtkInteractorStyleJoystickActor *JoystickActor; 00088 vtkInteractorStyleJoystickCamera *JoystickCamera; 00089 vtkInteractorStyleTrackballActor *TrackballActor; 00090 vtkInteractorStyleTrackballCamera *TrackballCamera; 00091 vtkInteractorStyle* CurrentStyle; 00092 00093 int JoystickOrTrackball; 00094 int CameraOrActor; 00095 00096 private: 00097 vtkInteractorStyleSwitch(const vtkInteractorStyleSwitch&); // Not implemented. 00098 void operator=(const vtkInteractorStyleSwitch&); // Not implemented. 00099 }; 00100 00101 #endif