com.jme.input.joystick
Class DummyJoystickInput.DummyJoystick

java.lang.Object
  extended by com.jme.input.joystick.DummyJoystickInput.DummyJoystick
All Implemented Interfaces:
Joystick
Enclosing class:
DummyJoystickInput

public static class DummyJoystickInput.DummyJoystick
extends java.lang.Object
implements Joystick


Constructor Summary
DummyJoystickInput.DummyJoystick()
           
 
Method Summary
 int findAxis(java.lang.String name)
          Look through the axis for a given name.
 int getAxisCount()
           
 java.lang.String[] getAxisNames()
          Query the names of the joysticks axes.
 float getAxisValue(int axis)
          Query the current position of a single axis.
 int getButtonCount()
           
 java.lang.String getName()
           
 boolean isButtonPressed(int button)
          Query state of a button.
 void rumble(int axis, float intensity)
          Cause the rumbler (if existent) for specified axis to change force.
 void setDeadZone(int axis, float value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyJoystickInput.DummyJoystick

public DummyJoystickInput.DummyJoystick()
Method Detail

rumble

public void rumble(int axis,
                   float intensity)
Description copied from interface: Joystick
Cause the rumbler (if existent) for specified axis to change force.

Specified by:
rumble in interface Joystick
Parameters:
axis - index of the axis to be rumbled
intensity - new force intensity

getAxisNames

public java.lang.String[] getAxisNames()
Description copied from interface: Joystick
Query the names of the joysticks axes. Indices correspond with Joystick.getAxisValue(int).

Specified by:
getAxisNames in interface Joystick
Returns:
an array of axis names

getAxisCount

public int getAxisCount()
Specified by:
getAxisCount in interface Joystick
Returns:
number of axes this joystick has

getAxisValue

public float getAxisValue(int axis)
Description copied from interface: Joystick
Query the current position of a single axis. Remember to call Input.update() prior to using these method.

Specified by:
getAxisValue in interface Joystick
Parameters:
axis - index of the axis of interest
Returns:
the current position of the axis between -1 and 1

getButtonCount

public int getButtonCount()
Specified by:
getButtonCount in interface Joystick
Returns:
number of buttons this joystick has

isButtonPressed

public boolean isButtonPressed(int button)
Description copied from interface: Joystick
Query state of a button. Remember to call Input.update() prior to using these method.

Specified by:
isButtonPressed in interface Joystick
Parameters:
button - index of a button (0 <= index < Joystick.getButtonCount())
Returns:
true if button is currently pressed

getName

public java.lang.String getName()
Specified by:
getName in interface Joystick
Returns:
name of this joystick

setDeadZone

public void setDeadZone(int axis,
                        float value)

findAxis

public int findAxis(java.lang.String name)
Description copied from interface: Joystick
Look through the axis for a given name.

Specified by:
findAxis in interface Joystick
Parameters:
name - the name of the axis we are looking for
Returns:
the index of the matching axis or -1 if none.