VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkInteractorStyleSwitch.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 =========================================================================*/ 00034 #ifndef vtkInteractorStyleSwitch_h 00035 #define vtkInteractorStyleSwitch_h 00036 00037 #include "vtkInteractionStyleModule.h" // For export macro 00038 #include "vtkInteractorStyleSwitchBase.h" 00039 00040 #define VTKIS_JOYSTICK 0 00041 #define VTKIS_TRACKBALL 1 00042 00043 #define VTKIS_CAMERA 0 00044 #define VTKIS_ACTOR 1 00045 00046 class vtkInteractorStyleJoystickActor; 00047 class vtkInteractorStyleJoystickCamera; 00048 class vtkInteractorStyleTrackballActor; 00049 class vtkInteractorStyleTrackballCamera; 00050 class vtkInteractorStyleMultiTouchCamera; 00051 00052 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleSwitch 00053 : public vtkInteractorStyleSwitchBase 00054 { 00055 public: 00056 static vtkInteractorStyleSwitch *New(); 00057 vtkTypeMacro(vtkInteractorStyleSwitch, vtkInteractorStyleSwitchBase); 00058 void PrintSelf(ostream& os, vtkIndent indent); 00059 00061 void SetInteractor(vtkRenderWindowInteractor *iren); 00062 00065 void SetAutoAdjustCameraClippingRange( int value ); 00066 00068 00069 vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle); 00070 void SetCurrentStyleToJoystickActor(); 00071 void SetCurrentStyleToJoystickCamera(); 00072 void SetCurrentStyleToTrackballActor(); 00073 void SetCurrentStyleToTrackballCamera(); 00074 void SetCurrentStyleToMultiTouchCamera(); 00076 00079 virtual void OnChar(); 00080 00082 00084 virtual void SetDefaultRenderer(vtkRenderer*); 00085 virtual void SetCurrentRenderer(vtkRenderer*); 00087 00088 protected: 00089 vtkInteractorStyleSwitch(); 00090 ~vtkInteractorStyleSwitch(); 00091 00092 void SetCurrentStyle(); 00093 00094 vtkInteractorStyleJoystickActor *JoystickActor; 00095 vtkInteractorStyleJoystickCamera *JoystickCamera; 00096 vtkInteractorStyleTrackballActor *TrackballActor; 00097 vtkInteractorStyleTrackballCamera *TrackballCamera; 00098 vtkInteractorStyleMultiTouchCamera *MultiTouchCamera; 00099 vtkInteractorStyle* CurrentStyle; 00100 00101 int JoystickOrTrackball; 00102 int CameraOrActor; 00103 bool MultiTouch; 00104 00105 private: 00106 vtkInteractorStyleSwitch(const vtkInteractorStyleSwitch&); // Not implemented. 00107 void operator=(const vtkInteractorStyleSwitch&); // Not implemented. 00108 }; 00109 00110 #endif