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

JoystickInput Class Reference

Concrete class that describes a joystick input device. More...

#include <JoystickInput.h>

Inheritance diagram for JoystickInput::

InputObject List of all members.

Public Methods

 JoystickInput (unsigned int id)
 Constructor. More...

 ~JoystickInput ()
 Destructor.

void start ()
 Start polling for input data.

void stop ()
 Stop polling for input data.

unsigned int poll (EventVector *events)
 Poll the joystick for a vector of input events. More...


Private Attributes

Joystick * joystick
 Handle to the current joystick device instance.

bool cherry
 Flag to indicate whether we've already been "polled".

bool buttons [NUM_BUTTONS]
 Array of button states (on or off).

DIJOYSTATE2 last_state
 Structure storing the last polled state of the joystick.


Detailed Description

Concrete class that describes a joystick input device.

Author:
Jon Parise <jparise@cmu.edu>


Constructor & Destructor Documentation

JoystickInput::JoystickInput unsigned int    id
 

Constructor.

Parameters:
id  The ID of the joystick to access


Member Function Documentation

unsigned int JoystickInput::poll EventVector   events [virtual]
 

Poll the joystick for a vector of input events.

Parameters:
events  Vector of InputEvents
Returns:
The number of InputEvents in the vector

Reimplemented from InputObject.


The documentation for this class was generated from the following files:
Generated on Tue Oct 16 14:06:19 2001 for PuppetMaster by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001