#include <ExManagerInputGLUT.h>
Public Methods | |
ExManagerInputGLUT (void) | |
~ExManagerInputGLUT (void) | |
void | SetManagerCommand (ExManagerCommand *Command) |
bool | IsKeyboard (void) |
bool | IsMouse (void) |
bool | IsSpaceBall (void) |
bool | IsTablet (void) |
bool | IsJoystick (void) |
void | CheckInput (void) |
void | DisplayAviableInput (void) |
void | Key (unsigned char key, int x, int y) |
void | KeyUp (unsigned char key, int x, int y) |
void | KeySpe (int key, int x, int y) |
void | KeySpeUp (int key, int x, int y) |
void | Mouse (int button, int state, int x, int y) |
void | MouseMotion (int x, int y) |
void | MousePassiveMotion (int x, int y) |
void | Focus (int state) |
void | SpaceballMotion (int x, int y, int z) |
void | SpaceballRotate (int x, int y, int z) |
void | TabletMotion (int x, int y) |
void | TabletButton (int button, int state, int x, int y) |
Data Fields | |
std::ostrstream * | Consol |
void(* | WriteToConsol )(const char *Label) |
Private Attributes | |
ExManagerCommand * | ManagerCommand |
bool | m_Keyboard |
bool | m_Mouse |
bool | m_SpaceBall |
bool | m_Tablet |
bool | m_Joystick |
int | m_MouseNumberButtons |
int | m_SpaceBallNumberButtons |
int | m_TabletNumberButtons |
int | m_JoystickNumberButtons |
int | m_JoystickNumberAxes |
|
Definition at line 26 of file ExManagerInputGLUT.cpp. References ExManagerInputGLUT(), Guard, m_Joystick, m_JoystickNumberAxes, m_JoystickNumberButtons, m_Keyboard, m_Mouse, m_MouseNumberButtons, m_SpaceBall, m_SpaceBallNumberButtons, m_Tablet, m_TabletNumberButtons, and UnGuard. Referenced by ExManagerInputGLUT().
00027 { 00028 Guard(ExManagerInputGLUT::ExManagerInputGLUT(void)) 00029 m_Keyboard=false; 00030 m_Mouse=false; 00031 m_SpaceBall=false; 00032 m_Tablet=false; 00033 m_Joystick=false; 00034 m_MouseNumberButtons=0; 00035 m_SpaceBallNumberButtons=0; 00036 m_TabletNumberButtons=0; 00037 m_JoystickNumberButtons=0; 00038 m_JoystickNumberAxes=0; 00039 UnGuard 00040 } |
|
Definition at line 42 of file ExManagerInputGLUT.cpp.
00043 { 00044 } |
|
Definition at line 46 of file ExManagerInputGLUT.cpp. References CheckInput(), Consol, Guard, m_Joystick, m_JoystickNumberAxes, m_JoystickNumberButtons, m_Keyboard, m_Mouse, m_MouseNumberButtons, m_SpaceBall, m_SpaceBallNumberButtons, m_Tablet, m_TabletNumberButtons, and UnGuard. Referenced by CheckInput(), and main().
00047 { 00048 Guard(void ExManagerInputGLUT::CheckInput(void)) 00049 *Consol<<"****************************************"<<endl; 00050 *Consol<<"*Checking for Hardware *"<<endl; 00051 *Consol<<"****************************************"<<endl; 00052 if(glutDeviceGet(GLUT_HAS_KEYBOARD)!=0) 00053 { 00054 m_Keyboard=true; 00055 }else 00056 { 00057 m_Keyboard=false; 00058 } 00059 if(glutDeviceGet(GLUT_HAS_MOUSE)!=0) 00060 { 00061 m_Mouse=true; 00062 m_MouseNumberButtons=glutDeviceGet(GLUT_NUM_MOUSE_BUTTONS); 00063 } 00064 else 00065 { 00066 m_Mouse=false; 00067 } 00068 if(glutDeviceGet(GLUT_HAS_SPACEBALL)!=0) 00069 { 00070 m_SpaceBall=true; 00071 m_SpaceBallNumberButtons=glutDeviceGet(GLUT_NUM_SPACEBALL_BUTTONS); 00072 } 00073 else 00074 { 00075 m_SpaceBall=false; 00076 } 00077 if(glutDeviceGet(GLUT_HAS_TABLET)!=0) 00078 { 00079 m_Tablet=true; 00080 m_TabletNumberButtons=glutDeviceGet(GLUT_NUM_TABLET_BUTTONS); 00081 } 00082 else 00083 { 00084 m_Tablet=false; 00085 } 00086 if( glutDeviceGet(GLUT_HAS_JOYSTICK)!=0) 00087 { 00088 m_Joystick=true; 00089 m_JoystickNumberButtons=glutDeviceGet(GLUT_JOYSTICK_BUTTONS); 00090 m_JoystickNumberAxes=glutDeviceGet(GLUT_JOYSTICK_AXES); 00091 } 00092 else 00093 { 00094 m_Joystick=false; 00095 } 00096 UnGuard 00097 } |
|
Definition at line 99 of file ExManagerInputGLUT.cpp. References Consol, DisplayAviableInput(), Guard, m_MouseNumberButtons, m_SpaceBallNumberButtons, m_TabletNumberButtons, and UnGuard. Referenced by DisplayAviableInput(), and main().
00100 { 00101 Guard(void ExManagerInputGLUT::DisplayAviableInput(void)) 00102 *Consol<<"Graphic Render :"<<glGetString(GL_RENDERER)<<endl; 00103 *Consol<<"Company :"<<glGetString(GL_VENDOR)<<endl; 00104 *Consol<<"Version :"<<glGetString(GL_VERSION)<<endl; 00105 *Consol<<"Extension :"<<glGetString(GL_EXTENSIONS)<<endl; 00106 00107 if(m_Keyboard) 00108 *Consol<<"Keyboard : available"<<std::endl; 00109 else 00110 *Consol<<"Keyboard : Not available"<<std::endl; 00111 if(m_Mouse) 00112 *Consol<<"Mouse : available "<<m_MouseNumberButtons<<" buttons found"<<std::endl; 00113 else 00114 *Consol<<"Mouse : Not available"<<std::endl; 00115 if(m_SpaceBall) 00116 *Consol<<"SpaceBall : available "<<m_SpaceBallNumberButtons<<" buttons found"<<std::endl; 00117 else 00118 *Consol<<"SpaceBall : Not available"<<std::endl; 00119 if(m_Tablet) 00120 *Consol<<"Tablet : available "<<m_TabletNumberButtons<<" buttons found"<<std::endl; 00121 else 00122 *Consol<<"Tablet : Not available"<<std::endl; 00123 if(m_Joystick) 00124 *Consol<<"Joystick : available "<<m_TabletNumberButtons<<" buttons found"<<std::endl; 00125 else 00126 *Consol<<"Joystick : Not available"<<std::endl; 00127 UnGuard 00128 } |
|
Definition at line 387 of file ExManagerInputGLUT.cpp. References Guard, and UnGuard. Referenced by Focus().
|
|
Definition at line 73 of file ExManagerInputGLUT.h. References m_Joystick. Referenced by SetGlutCallBack().
00073 {return m_Joystick;}; |
|
Definition at line 69 of file ExManagerInputGLUT.h. References m_Keyboard. Referenced by SetGlutCallBack().
00069 {return m_Keyboard;}; |
|
Definition at line 70 of file ExManagerInputGLUT.h. References m_Mouse. Referenced by SetGlutCallBack().
00070 {return m_Mouse;}; |
|
Definition at line 71 of file ExManagerInputGLUT.h. References m_SpaceBall. Referenced by SetGlutCallBack().
00071 {return m_SpaceBall;}; |
|
Definition at line 72 of file ExManagerInputGLUT.h. References m_Tablet. Referenced by SetGlutCallBack().
00072 {return m_Tablet;}; |
|
|
|
|
|
Definition at line 349 of file ExManagerInputGLUT.cpp. References ExManagerCommand::InputCommand(), ManagerCommand, MOUSE_LEFT_BUTTON_DOWN, MOUSE_LEFT_BUTTON_UP, MOUSE_MIDDLE_BUTTON_DOWN, MOUSE_MIDDLE_BUTTON_UP, MOUSE_RIGHT_BUTTON_DOWN, MOUSE_RIGHT_BUTTON_UP, and ExManagerCommand::SetMousePosition(). Referenced by Mouse().
00350 { 00351 //GLUT_UP ou GLUT_DOWN 00352 switch(button) 00353 { 00354 case GLUT_LEFT_BUTTON: 00355 if(state==GLUT_UP) 00356 { 00357 ManagerCommand->InputCommand(MOUSE_LEFT_BUTTON_UP); 00358 } 00359 if(state==GLUT_DOWN) 00360 { 00361 ManagerCommand->InputCommand(MOUSE_LEFT_BUTTON_DOWN); 00362 } 00363 break; 00364 case GLUT_MIDDLE_BUTTON: 00365 if(state==GLUT_UP) 00366 { 00367 ManagerCommand->InputCommand(MOUSE_MIDDLE_BUTTON_UP); 00368 } 00369 if(state==GLUT_DOWN) 00370 { 00371 ManagerCommand->InputCommand(MOUSE_MIDDLE_BUTTON_DOWN); 00372 } 00373 break; 00374 case GLUT_RIGHT_BUTTON: 00375 if(state==GLUT_UP) 00376 { 00377 ManagerCommand->InputCommand(MOUSE_RIGHT_BUTTON_UP); 00378 } 00379 if(state==GLUT_DOWN) 00380 { 00381 ManagerCommand->InputCommand(MOUSE_RIGHT_BUTTON_DOWN); 00382 } 00383 break; 00384 } 00385 ManagerCommand->SetMousePosition(x,y); 00386 } |
|
Definition at line 399 of file ExManagerInputGLUT.cpp. References Guard, and UnGuard. Referenced by MotionFunc().
|
|
Definition at line 404 of file ExManagerInputGLUT.cpp. References Guard, and UnGuard. Referenced by PassiveMotionFunc().
|
|
Definition at line 65 of file ExManagerInputGLUT.h. Referenced by SetManagerLink().
00065 {ManagerCommand = Command;} |
|
Definition at line 409 of file ExManagerInputGLUT.cpp. References Guard, and UnGuard. Referenced by SpaceballMotionFunc().
|
|
Definition at line 414 of file ExManagerInputGLUT.cpp. References Guard, and UnGuard. Referenced by SpaceballRotateFunc().
|
|
Definition at line 424 of file ExManagerInputGLUT.cpp. References Guard, and UnGuard. Referenced by TabletButtonFunc().
|
|
Definition at line 419 of file ExManagerInputGLUT.cpp. References Guard, and UnGuard. Referenced by TabletMotionFunc().
|
|
Definition at line 62 of file ExManagerInputGLUT.h. Referenced by CheckInput(), DisplayAviableInput(), and SetManagerLink(). |
|
Definition at line 47 of file ExManagerInputGLUT.h. Referenced by CheckInput(), ExManagerInputGLUT(), and IsJoystick(). |
|
Definition at line 52 of file ExManagerInputGLUT.h. Referenced by CheckInput(), and ExManagerInputGLUT(). |
|
Definition at line 51 of file ExManagerInputGLUT.h. Referenced by CheckInput(), and ExManagerInputGLUT(). |
|
Definition at line 43 of file ExManagerInputGLUT.h. Referenced by CheckInput(), ExManagerInputGLUT(), and IsKeyboard(). |
|
Definition at line 44 of file ExManagerInputGLUT.h. Referenced by CheckInput(), ExManagerInputGLUT(), and IsMouse(). |
|
Definition at line 48 of file ExManagerInputGLUT.h. Referenced by CheckInput(), DisplayAviableInput(), and ExManagerInputGLUT(). |
|
Definition at line 45 of file ExManagerInputGLUT.h. Referenced by CheckInput(), ExManagerInputGLUT(), and IsSpaceBall(). |
|
Definition at line 49 of file ExManagerInputGLUT.h. Referenced by CheckInput(), DisplayAviableInput(), and ExManagerInputGLUT(). |
|
Definition at line 46 of file ExManagerInputGLUT.h. Referenced by CheckInput(), ExManagerInputGLUT(), and IsTablet(). |
|
Definition at line 50 of file ExManagerInputGLUT.h. Referenced by CheckInput(), DisplayAviableInput(), and ExManagerInputGLUT(). |
|
Definition at line 40 of file ExManagerInputGLUT.h. Referenced by Key(), KeySpe(), KeySpeUp(), KeyUp(), and Mouse(). |
|
Referenced by SetManagerLink(). |