1 #ifndef EOS_INTERACTOR_MY_STYLE_HH
2 #define EOS_INTERACTOR_MY_STYLE_HH
4 #include <vtkInteractorStyle.h>
11 class eosStereoWindow;
12 extern int Vtktcl_SafeInit(Tcl_Interp *interp);
13 class VTK_RENDERING_EXPORT eosInteractorMyStyle : public vtkInteractorStyleSwitch
16 static eosInteractorMyStyle *New();
18 vtkTypeMacro(eosInteractorMyStyle, vtkInteractorStyle);
20 virtual void OnMouseMove();
21 void OnMouseMoveTrackball();
22 void OnMouseMoveJoyStick();
23 virtual void OnLeftButtonDown();
24 virtual void OnLeftButtonUp();
25 virtual void OnMiddleButtonDown();
26 virtual void OnMiddleButtonUp();
27 virtual void OnRightButtonDown();
28 virtual void OnRightButtonUp();
29 virtual void OnChar ();
31 virtual void OnButtonFromWindow (char* ButtonCode);
33 void SetInteractor(vtkRenderWindowInteractor *iren);
34 void SetStereoInteractor(vtkRenderWindowInteractor *iren);
35 void SetAutoAdjustCameraClippingRange( int value );
36 void ResetCameraClippingRange(void);
38 virtual void StartState(int newstate);
39 virtual void StopState();
41 void SetRenderWindowData(vtkRenderer*,vtkRenderWindowInteractor*);
43 void SetStereoCamera(vtkCamera*,vtkCamera*,double,double);
48 void StereoCameraRotate(int,int);
49 void StereoCameraPan(int,int);
50 void StereoCameraDolly(int,int);
51 void StereoCameraSpin(int,int);
53 void DeleteXwindow(Display* disp, Window win);
55 void DeleteStereoWindow(void);
56 void CreateStereoWindow(void);
58 void SetTclWindowInterp(Tcl_Interp *interp);
60 Tcl_Interp* GetTclWindowInterp(void);
61 eosInteractorMyStyle();
62 eosInteractorMyStyle(const eosInteractorMyStyle& myStyle);
63 ~eosInteractorMyStyle();
69 void SetStereoWindowInformation();
70 void ResetStereoWindowInformation();
72 void JoyStickPan(void);
73 void TrackballPan(void);
74 void StereoCameraPanJoyStick();
75 void StereoCameraPanTrackball();
76 void StereoCameraDollyJoyStick();
77 void StereoCameraDollyTrackball();
78 static int StereoState;
79 static int WindowButtonState;
80 static int TJSwitchState;
81 static vtkRenderer *Ren,*RenLeft,*RenRight;
82 static vtkCamera *Cam,*CamLeft,*CamRight;
84 static vtkRenderWindowInteractor *rwiStereo;
85 static vtkRenderWindowInteractor *rwiMain;
87 eosStereoWindow *stereoWin;
88 Tcl_Interp *TclWindowInterp;
90 //static const int VTKIS_CAMERA = 0;
91 //static const int VTKIS_ACTOR = 1;
92 static const char SPACE = ' ';
93 static const int VTKIS_STEREO = 8;
94 static const int SPACE_ON = 1;
95 static const int SPACE_OFF = 0;
96 static const int STEREO_ON = 1;
97 static const int STEREO_OFF = 0;
98 static const int TRACKBALL = 0;
99 static const int JOYSTICK = 1;