at.wisch.joystick
Interface AdvancedController

All Superinterfaces:
Controller
All Known Subinterfaces:
AdvancedFFController
All Known Implementing Classes:
AbstractController, FFJoystick, Joystick

public interface AdvancedController
extends Controller

The interface AdvancedController. AdvancedController extends the interface Controller to support more controller capabilities (e.g. allows unlimited amount of axes, buttons, POVs and trackballs).

It also allows checking for force feedback (FF) support.

Author:
Martin Wischenbart

Method Summary
 int[] getBall1Delta()
          Gets the delta for the first trackball (ballIndex 0)
 int[] getBall2Delta()
          Gets the delta for the second trackball (ballIndex 1)
 int[] getBall3Delta()
          Gets the delta for the third trackball (ballIndex 2)
 int[] getBall4Delta()
          Gets the delta for the fourth trackball (ballIndex 3)
 int getBallCount()
          Gets the number of trackballs (balls) a device has.
 int[] getBallDelta(int ballIndex)
          Gets the delta for the trackball specified by ballIndex.
 java.lang.String getBallName(int ballIndex)
          Gets the trackball's name.
 int getPov1X()
          Gets the first POV's X coordinate value.
 int getPov1Y()
          Gets the first POV's Y coordinate value.
 int getPov2X()
          Gets the second POV's X coordinate value.
 int getPov2Y()
          Gets the second POV's Y coordinate value.
 int getPov3X()
          Gets the third POV's X coordinate value.
 int getPov3Y()
          Gets the third POV's Y coordinate value.
 int getPov4X()
          Gets the fourth POV's X coordinate value.
 int getPov4Y()
          Gets the fourth POV's Y coordinate value.
 int getPovCount()
          Gets the device's point-of-view (POV) count.
 int getPovDirection(int povIndex)
          Gets the direction of a POV.
 java.lang.String getPovName(int povIndex)
          Gets the POV's name.
 int getPovX(int povIndex)
          Gets the X coordinate's value of a POV.
 int getPovY(int povIndex)
          Gets the Y coordinate's value of a POV.
 float getUAxisDeadZone()
          Get the dead zone for the U axis.
 float getUAxisValue()
          Get the value from the U axis if there is one.
 float getVAxisDeadZone()
          Get the dead zone for the V axis.
 float getVAxisValue()
          Get the value from the V axis if there is one.
 boolean isFFJoystick()
          Checks if the device supports force feedback (FF).
 void setUAxisDeadZone(float zone)
          Set the dead zone for the U axis.
 void setVAxisDeadZone(float zone)
          Set the dead zone for the V axis.
 
Methods inherited from interface org.lwjgl.input.Controller
getAxisCount, getAxisName, getAxisValue, getButtonCount, getButtonName, getDeadZone, getIndex, getName, getPovX, getPovY, getRXAxisDeadZone, getRXAxisValue, getRYAxisDeadZone, getRYAxisValue, getRZAxisDeadZone, getRZAxisValue, getXAxisDeadZone, getXAxisValue, getYAxisDeadZone, getYAxisValue, getZAxisDeadZone, getZAxisValue, isButtonPressed, poll, setDeadZone, setRXAxisDeadZone, setRYAxisDeadZone, setRZAxisDeadZone, setXAxisDeadZone, setYAxisDeadZone, setZAxisDeadZone
 

Method Detail

isFFJoystick

boolean isFFJoystick()
Checks if the device supports force feedback (FF).

If this method returns true, it is safe to cast the AdvancedController to an AdvancedFFController.

Returns:
true, if the controller was recognized as a FF device. false, if the device does not have FF capabilities.
See Also:
AdvancedFFController

getPovCount

int getPovCount()
Gets the device's point-of-view (POV) count. POV is also known as "hat". POVs are digital sticks, that can be in the center, up, down, left, right or combinations (up-left, up-right, down-left, down-right).

Returns:
the number of POVs on the device
See Also:
Controller.getButtonCount(), Controller.getAxisCount(), getBallCount()

getPovName

java.lang.String getPovName(int povIndex)
Gets the POV's name.

Parameters:
povIndex - the POV index (POV indices start from 0)
Returns:
the POV's name (which is just povIndex+1)
See Also:
getPovCount()

getPovX

int getPovX(int povIndex)
Gets the X coordinate's value of a POV. (X axis of a POV is the left-right-direction)

Parameters:
povIndex - the POV index (POV indices start from 0)
Returns:
the POV's X coordinate: POV_AXIS_NEGATIVE for left, POV_AXIS_NEUTRAL for center, POV_AXIS_POSITIVE for right
See Also:
getPovDirection(int)

getPovY

int getPovY(int povIndex)
Gets the Y coordinate's value of a POV. (Y axis of a POV is the up-down-direction)

Parameters:
povIndex - the POV index (POV indices start from 0)
Returns:
the POV's Y coordinate: POV_AXIS_NEGATIVE for up, POV_AXIS_NEUTRAL for center, POV_AXIS_POSITIVE for down
See Also:
getPovDirection(int)

getPovDirection

int getPovDirection(int povIndex)
Gets the direction of a POV.

Parameters:
povIndex - the POV index (POV indices start from 0)
Returns:
the POVs direction: POV_CENTERED for center, or one of the following: POV_DOWN, POV_DOWN_LEFT, POV_DOWN_RIGHT, POV_LEFT, POV_RIGHT, POV_UP, POV_UP_LEFT, POV_UP_RIGHT
See Also:
getPovX(int), getPovY(int)

getPov1X

int getPov1X()
Gets the first POV's X coordinate value.

Returns:
getPovValueX(0)
See Also:
getPovX(int)

getPov1Y

int getPov1Y()
Gets the first POV's Y coordinate value.

Returns:
getPovValueY(0)
See Also:
getPovY(int)

getPov2X

int getPov2X()
Gets the second POV's X coordinate value.

Returns:
getPovValueX(1)
See Also:
getPovX(int)

getPov2Y

int getPov2Y()
Gets the second POV's Y coordinate value.

Returns:
getPovValueY(1)
See Also:
getPovY(int)

getPov3X

int getPov3X()
Gets the third POV's X coordinate value.

Returns:
getPovValueX(2)
See Also:
getPovX(int)

getPov3Y

int getPov3Y()
Gets the third POV's Y coordinate value.

Returns:
getPovValueY(2)
See Also:
getPovY(int)

getPov4X

int getPov4X()
Gets the fourth POV's X coordinate value.

Returns:
getPovValueX(3)
See Also:
getPovX(int)

getPov4Y

int getPov4Y()
Gets the fourth POV's Y coordinate value.

Returns:
getPovValueY(3) *
See Also:
getPovY(int)

getUAxisValue

float getUAxisValue()
Get the value from the U axis if there is one. If the axis does not exist AXIS_NEUTRAL will be returned.

Returns:
the U axis value: AXIS_NEUTRAL, AXIS_MINIMUM, AXIS_MAXIMUM or anything between AXIS_MINIMUM and AXIS_MAXIMUM
See Also:
Controller.getAxisValue(int)

getVAxisValue

float getVAxisValue()
Get the value from the V axis if there is one. If the axis does not exist AXIS_NEUTRAL will be returned.

Returns:
the V axis value: AXIS_NEUTRAL, AXIS_MINIMUM, AXIS_MAXIMUM or anything between AXIS_MINIMUM and AXIS_MAXIMUM
See Also:
Controller.getAxisValue(int)

getUAxisDeadZone

float getUAxisDeadZone()
Get the dead zone for the U axis.

Returns:
the dead zone for the U axis
See Also:
setUAxisDeadZone(float), Controller.getDeadZone(int)

getVAxisDeadZone

float getVAxisDeadZone()
Get the dead zone for the V axis.

Returns:
the dead zone for the V axis
See Also:
setVAxisDeadZone(float), Controller.getDeadZone(int)

setUAxisDeadZone

void setUAxisDeadZone(float zone)
Set the dead zone for the U axis. Typical values are between 0.01f and 0.2f.

Parameters:
zone - the dead zone to use for the U axis: a value from 0f to AXIS_MAXIMUM
See Also:
getUAxisDeadZone(), Controller.setDeadZone(int, float)

setVAxisDeadZone

void setVAxisDeadZone(float zone)
Set the dead zone for the V axis. Typical values are between 0.01f and 0.2f.

Parameters:
zone - the dead zone to use for the V axis: a value from 0f to AXIS_MAXIMUM
See Also:
getVAxisDeadZone(), Controller.setDeadZone(int, float)

getBallCount

int getBallCount()
Gets the number of trackballs (balls) a device has.

Returns:
the number of trackballs on the device * @see #getButtonCount()
See Also:
getPovCount(), Controller.getAxisCount()

getBallName

java.lang.String getBallName(int ballIndex)
Gets the trackball's name.

Parameters:
ballIndex - the trackball index (ball indices start from 0)
Returns:
the trackball's name (which is just ballIndex+1)
See Also:
getBallCount()

getBallDelta

int[] getBallDelta(int ballIndex)
Gets the delta for the trackball specified by ballIndex. The delta represents the movements in X and Y directions.

Parameters:
ballIndex - the trackball index (ball indices start from 0)
Returns:
the trackball delta: index [0] represents the X movement, index [1] represents the Y movement (the size of the array will always be 2)

getBall1Delta

int[] getBall1Delta()
Gets the delta for the first trackball (ballIndex 0)

Returns:
delta for the first trackball
See Also:
getBallDelta(int)

getBall2Delta

int[] getBall2Delta()
Gets the delta for the second trackball (ballIndex 1)

Returns:
delta for the second trackball
See Also:
getBallDelta(int)

getBall3Delta

int[] getBall3Delta()
Gets the delta for the third trackball (ballIndex 2)

Returns:
delta for the third trackball
See Also:
getBallDelta(int)

getBall4Delta

int[] getBall4Delta()
Gets the delta for the fourth trackball (ballIndex 3)

Returns:
delta for the fourth trackball
See Also:
getBallDelta(int)