NLMISC::IGameDevice Struct Reference

#include <game_device.h>

Inheritance diagram for NLMISC::IGameDevice:

NLMISC::IInputDevice

Detailed Description

This abstract a joystick or gamepad
Author:
Nicolas Vizerie

Nevrax France

Date:
2002

Definition at line 72 of file game_device.h.

Public Types

enum  TAxis {
  XAxis = 0, YAxis, ZAxis, RXAxis,
  RYAxis, RZAxis, MaxNumAxis
}

Public Member Functions

virtual uint getBufferSize () const=0
 Get the buffer size for this device.

virtual const CGameDeviceDescgetDescription () const=0
 Get a general description of this device.

virtual bool setBufferSize (uint size)=0
Controls names. Must ensure that controls are present before calling these methods.
virtual const char * getAxisName (TAxis axis) const=0
virtual const char * getButtonName (uint index) const=0
virtual const char * getPOVName (uint index) const=0
virtual const char * getSliderName (uint index) const=0
Controls state. Must ensure that controls are present before calling these methods.
virtual float getAxisValue (TAxis axis) const=0
virtual bool getButtonState (uint index) const=0
virtual float getPOVAngle (uint index) const=0
virtual float getSliderPos (uint index) const=0
Controls presence
virtual uint getNumButtons () const=0
virtual uint getNumPOV () const=0
virtual uint getNumSliders () const=0
virtual bool hasAxis (TAxis axis) const=0


Member Enumeration Documentation

enum NLMISC::IGameDevice::TAxis
 

Enumeration values:
XAxis 
YAxis 
ZAxis 
RXAxis 
RYAxis 
RZAxis 
MaxNumAxis 

Definition at line 74 of file game_device.h.

00074                    { XAxis = 0, YAxis, ZAxis, /* translation */
00075                                  RXAxis, RYAxis, RZAxis,   /* rotations */
00076                                  MaxNumAxis
00077                                 };                                                


Member Function Documentation

virtual void NLMISC::IInputDevice::begin CEventServer server  )  [inline, virtual, inherited]
 

For device server usage : Called at the beginning of each events retrieval. If a device doesn't support buffered datas, the state changes can be directly send to the event server. The default does nothing.

Definition at line 64 of file input_device.h.

00064 {}

virtual const char* NLMISC::IGameDevice::getAxisName TAxis  axis  )  const [pure virtual]
 

virtual float NLMISC::IGameDevice::getAxisValue TAxis  axis  )  const [pure virtual]
 

virtual uint NLMISC::IInputDevice::getBufferSize  )  const [pure virtual, inherited]
 

Get the buffer size for this device.

virtual const char* NLMISC::IGameDevice::getButtonName uint  index  )  const [pure virtual]
 

virtual bool NLMISC::IGameDevice::getButtonState uint  index  )  const [pure virtual]
 

virtual const CGameDeviceDesc& NLMISC::IGameDevice::getDescription  )  const [pure virtual]
 

Get a general description of this device.

virtual uint NLMISC::IGameDevice::getNumButtons  )  const [pure virtual]
 

virtual uint NLMISC::IGameDevice::getNumPOV  )  const [pure virtual]
 

virtual uint NLMISC::IGameDevice::getNumSliders  )  const [pure virtual]
 

virtual float NLMISC::IGameDevice::getPOVAngle uint  index  )  const [pure virtual]
 

virtual const char* NLMISC::IGameDevice::getPOVName uint  index  )  const [pure virtual]
 

virtual const char* NLMISC::IGameDevice::getSliderName uint  index  )  const [pure virtual]
 

virtual float NLMISC::IGameDevice::getSliderPos uint  index  )  const [pure virtual]
 

virtual bool NLMISC::IGameDevice::hasAxis TAxis  axis  )  const [pure virtual]
 

Check if the given axe is present on this game device NB : only absolute axis are managed

virtual void NLMISC::IInputDevice::poll CInputDeviceServer dev  )  [pure virtual, inherited]
 

For device server usage : Poll all events from that device, and notify them to the given device server, so that they can be sorted between devices. This retrieves messages, but do not process them.

virtual bool NLMISC::IInputDevice::setBufferSize uint  size  )  [pure virtual, inherited]
 

Set the buffer size for this device (the number of samples it can retains). This return true if the size could be set

virtual void NLMISC::IInputDevice::submit IInputDeviceEvent deviceEvent,
CEventServer server
[pure virtual, inherited]
 

For device server usage : Process an event (eventually update this device state), and translate the message to a IEventServerMessage

virtual void NLMISC::IInputDevice::transitionOccured CEventServer server,
const IInputDeviceEvent nextMessage
[inline, virtual, inherited]
 

For device server usage : Says that the next message is for another device, or that it is the last message that will be received. This allow to pack several messages in one (for example, to sum up mouse moves until a click occurs) The default does nothing. The next message can be used to get a time stamp for example. It may be NULL is no next message is available

Definition at line 81 of file input_device.h.

Referenced by NLMISC::CInputDeviceServer::poll().

00081 {}


The documentation for this struct was generated from the following file:
Generated on Tue Mar 16 13:46:00 2004 for NeL by doxygen 1.3.6