00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00062 #ifndef __vtkInteractorStyleSwitch_h
00063 #define __vtkInteractorStyleSwitch_h
00064
00065 #define VTKIS_JOYSTICK 0
00066 #define VTKIS_TRACKBALL 1
00067 #define VTKIS_CAMERA 0
00068 #define VTKIS_ACTOR 1
00069
00070 #include "vtkInteractorStyle.h"
00071 #include "vtkInteractorStyleJoystickActor.h"
00072 #include "vtkInteractorStyleJoystickCamera.h"
00073 #include "vtkInteractorStyleTrackballActor.h"
00074 #include "vtkInteractorStyleTrackballCamera.h"
00075
00076 class VTK_RENDERING_EXPORT vtkInteractorStyleSwitch : public vtkInteractorStyle
00077 {
00078 public:
00079 static vtkInteractorStyleSwitch *New();
00080 vtkTypeMacro(vtkInteractorStyleSwitch, vtkInteractorStyle);
00081
00083
00086 void OnLeftButtonDown(int ctrl, int shift, int x, int y);
00087 void OnLeftButtonUp(int ctrl, int shift, int x, int y);
00088 void OnMiddleButtonDown(int ctrl, int shift, int x, int y);
00089 void OnMiddleButtonUp (int ctrl, int shift, int x, int y);
00090 void OnRightButtonDown(int ctrl, int shift, int x, int y);
00091 void OnRightButtonUp (int ctrl, int shift, int x, int y);
00092 void OnMouseMove(int ctrl, int shift, int x, int y);
00093 void OnChar (int ctrl, int shift, char keycode, int repeatcount);
00095
00097 void SetInteractor(vtkRenderWindowInteractor *iren);
00098
00099 void OnTimer();
00100
00103 void SetAutoAdjustCameraClippingRange( int value );
00104
00105 protected:
00106 vtkInteractorStyleSwitch();
00107 ~vtkInteractorStyleSwitch();
00108
00109 vtkInteractorStyleJoystickActor *JoystickActor;
00110 vtkInteractorStyleJoystickCamera *JoystickCamera;
00111 vtkInteractorStyleTrackballActor *TrackballActor;
00112 vtkInteractorStyleTrackballCamera *TrackballCamera;
00113
00114 int JoystickOrTrackball;
00115 int CameraOrActor;
00116 private:
00117 vtkInteractorStyleSwitch(const vtkInteractorStyleSwitch&);
00118 void operator=(const vtkInteractorStyleSwitch&);
00119 };
00120
00121 #endif