Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

inputDeviceJoystick.h

Go to the documentation of this file.
00001 #ifndef DEVICEJOYSTICK_H
00002 #define DEVICEJOYSTICK_H
00003 
00004 #include "../../devicePlugIn.h"
00005 
00006 #include <string>
00007 
00008 #define MAXAXES    10   // maximum number of axes
00009 #define MAXBUTTONS 20   // maximum number of buttons
00010 
00011 bool    openDevice (void);      // open device
00012 void    closeDevice (void);         // closes device
00013     
00014 bool    update (void);          // get actual state
00015     
00016 string  name (void);            // get joystick name
00017 int axes (void);            // get number of axes
00018 int buttons (void);         // get number of axes
00019     
00020 long    axis (int nr);          // get value of axis <nr>
00021 bool    buttonPressed (int nr);     // get state of button <nr>
00022 
00023     
00024 DevicePlugIn inputPlugIn = {
00025     openDevice,
00026     closeDevice,
00027     update,
00028     name,
00029     axes,
00030     buttons,
00031     axis,
00032     buttonPressed
00033 };
00034 
00035 #endif

Generated at Sat May 13 13:50:19 2000 for 3Dsia by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000