Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Search  

/home/mrm/Simex/simulations/hr_bike/pv_mouse.h

Go to the documentation of this file.
00001 #ifndef Pv_Mouse_Included
00002 #define Pv_Mouse_Included
00003 
00004 #include "pv_camera.h"
00005 #include "pv_scene.h"
00006 
00007 class Pv_Mouse{
00008   
00009   /*buttons*/
00010   static const int None=0;
00011   static const int Left=1;
00012   static const int Right=2;
00013   static const int Middle=4;
00014 
00015   static const int Up=5;
00016   static const int Down=6;
00017   static const int Active_Move=7;
00018   static const int Passive_Move=8;
00019 
00020   /*available actions*/
00021   static const int No_Action=0;
00022   static const int Camera_Translate=1;
00023   static const int Camera_Zoom=2;
00024   static const int Camera_Roll=3;
00025   static const int Camera_Rotate=4;
00026 
00027   /*configuration*/
00028   int no_action;
00029   int left_action;
00030   int middle_action;
00031   int right_action;
00032   int left_middle_action;
00033   int middle_right_action;
00034   int left_right_action;
00035   int left_middle_right_action;
00036 
00037   /*misc*/
00038   int mouse_state;
00039   int current_action;
00040 
00041   int initial_x;
00042   int initial_y;
00043 
00044   Pv_Scene *my_scene;
00045   Pv_Camera *my_camera;
00046 
00047 public:
00048   Pv_Mouse(Pv_Scene *,Pv_Camera *);
00049   void press_release(int button,int state,int x,int y);
00050   void active_motion(int x,int y);
00051   void passive_motion(int x,int y);
00052 
00053   /*available action functions*/
00054   void camera_translate(int state,int x,int y);
00055   void camera_zoom(int state,int x,int y);
00056   void camera_roll(int state,int x,int y);
00057   void camera_rotate(int state,int x,int y);
00058 
00059 };
00060 
00061 #endif
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 

Generated on Sat Jul 19 04:01:23 2003 for SIMEX by doxygen1.2.18