fi.hut.tml.xsmiles.mlfc.io.directdevice
Class DirectDeviceWin

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.io.directdevice.DirectDevice
      extended byfi.hut.tml.xsmiles.mlfc.io.directdevice.DirectDeviceWin
All Implemented Interfaces:
java.lang.Runnable

public class DirectDeviceWin
extends DirectDevice

Win32 platform DirectDevice class to read joystick, mouse and keyboard. Uses native methods (DirectInput) to read the values.


Field Summary
 
Fields inherited from class fi.hut.tml.xsmiles.mlfc.io.directdevice.DirectDevice
button, key, oldbutton, oldkey, oldrx, oldry, oldrz, oldx, oldy, oldz, rx, ry, rz, x, y, z
 
Constructor Summary
DirectDeviceWin()
           
 
Method Summary
static boolean getJoystickValues(int[] joystickValues)
          Get device values in a big array of integers.
static boolean getKeyboardValues(int[] keyboardValues)
          Get device values in a big array of integers.
static int getTest()
          Test
static boolean isTest(int id)
          Test
protected  void sample()
          Sample joystick values in Win32 dependent way - use DirectInput.
 
Methods inherited from class fi.hut.tml.xsmiles.mlfc.io.directdevice.DirectDevice
addJoystickListener, addKeyboardListener, createInstance, getButton, getKeyboard, getRX, getRY, getRZ, getSamplingRate, getX, getY, getZ, notifyJoystickListeners, notifyKeyboardListeners, removeJoystickListener, removeKeyboardListener, run, setSamplingRate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectDeviceWin

public DirectDeviceWin()
Method Detail

getJoystickValues

public static final boolean getJoystickValues(int[] joystickValues)
Get device values in a big array of integers.

Returns:
true if successful

getKeyboardValues

public static final boolean getKeyboardValues(int[] keyboardValues)
Get device values in a big array of integers.

Returns:
true if successful

getTest

public static final int getTest()
Test


isTest

public static boolean isTest(int id)
Test


sample

protected void sample()
Sample joystick values in Win32 dependent way - use DirectInput. This method updates protected x,y,z,rx,ry,rz... values in DirectDevice class.

Overrides:
sample in class DirectDevice


X-Smiles 1.2