|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Controller
A game controller of some sort that will provide input. The controller presents buttons and axes. Buttons are either pressed or not pressed. Axis provide analogue values.
Method Summary | |
---|---|
int |
getAxisCount()
Retrieve the number of axes available on this controller. |
java.lang.String |
getAxisName(int axisIndex)
Get the name that's given to the specified axis |
float |
getAxisValue(int axisIndex)
Retrieve the value thats currently available on a specified axis. |
int |
getButtonCount()
Retrieve the number of buttons available on this controller. |
java.lang.String |
getButtonName(int buttonIndex)
Get the name of the specified button. |
float |
getDeadZone(int axisIndex)
Get the dead zone for a specified axis. |
int |
getIndex()
Gets the index of this controller in the collection. |
java.lang.String |
getName()
Gets the name assigned to this controller. |
float |
getPovX()
Gets the X-Axis value of the first POV on this controller as a float. |
float |
getPovY()
Gets the Y-Axis value of the first POV on this controller as a float. |
float |
getRXAxisDeadZone()
Get the dead zone for the RX axis. |
float |
getRXAxisValue()
Get the value from the RX axis if there is one. |
float |
getRYAxisDeadZone()
Get the dead zone for the RY axis. |
float |
getRYAxisValue()
Get the value from the RY axis if there is one. |
float |
getRZAxisDeadZone()
Get the dead zone for the RZ axis. |
float |
getRZAxisValue()
Get the value from the RZ axis if there is one. |
float |
getXAxisDeadZone()
Get the dead zone for the X axis. |
float |
getXAxisValue()
Get the value from the X axis if there is one. |
float |
getYAxisDeadZone()
Get the dead zone for the Y axis. |
float |
getYAxisValue()
Get the value from the Y axis if there is one. |
float |
getZAxisDeadZone()
Get the dead zone for the Z axis. |
float |
getZAxisValue()
Get the value from the Z axis if there is one. |
boolean |
isButtonPressed(int buttonIndex)
Check if a button is currently pressed |
void |
poll()
Poll the controller for new data. |
void |
setDeadZone(int axisIndex,
float zone)
Set the dead zone for the specified axis. |
void |
setRXAxisDeadZone(float zone)
Set the dead zone for the RX axis. |
void |
setRYAxisDeadZone(float zone)
Set the dead zone for the RY axis. |
void |
setRZAxisDeadZone(float zone)
Set the dead zone for the RZ axis. |
void |
setXAxisDeadZone(float zone)
Set the dead zone for the X axis. |
void |
setYAxisDeadZone(float zone)
Set the dead zone for the Y axis. |
void |
setZAxisDeadZone(float zone)
Set the dead zone for the Z axis. |
Method Detail |
---|
java.lang.String getName()
int getIndex()
int getButtonCount()
AdvancedController.getPovCount()
,
getAxisCount()
,
AdvancedController.getBallCount()
java.lang.String getButtonName(int buttonIndex)
buttonIndex
- the index of the button whose name should be retrieved (button indices start at 0)
getButtonCount()
boolean isButtonPressed(int buttonIndex)
buttonIndex
- the index of the button to check
void poll()
float getPovX()
float getPovY()
float getDeadZone(int axisIndex)
axisIndex
- the index of the axis for which to retrieve the dead zone (axis indices start with 0)
setDeadZone(int, float)
void setDeadZone(int axisIndex, float zone)
axisIndex
- the index of the axis for which to set the dead zone (axis indices start with 0)zone
- the dead zone to use for the specified axis: a value from 0 to AXIS_MAXIMUM (1f)getDeadZone(int)
int getAxisCount()
getButtonCount()
,
AdvancedController.getPovCount()
,
AdvancedController.getBallCount()
java.lang.String getAxisName(int axisIndex)
axisIndex
- The index of the axis whose name should be retrieved (axis indices start with 0)
getAxisCount()
float getAxisValue(int axisIndex)
axisIndex
- the index of axis to be read (axis indices start with 0)
float getXAxisValue()
getAxisValue(int)
float getXAxisDeadZone()
setXAxisDeadZone(float)
,
getDeadZone(int)
void setXAxisDeadZone(float zone)
zone
- the dead zone to use for the X axis: a value from 0f to AXIS_MAXIMUM (1f)getXAxisDeadZone()
,
setDeadZone(int, float)
float getYAxisValue()
getAxisValue(int)
float getYAxisDeadZone()
setYAxisDeadZone(float)
,
getDeadZone(int)
void setYAxisDeadZone(float zone)
zone
- the dead zone to use for the Y axis: a value from 0f to AXIS_MAXIMUM (1f)getYAxisDeadZone()
,
setDeadZone(int, float)
float getZAxisValue()
getAxisValue(int)
float getZAxisDeadZone()
setZAxisDeadZone(float)
,
getDeadZone(int)
void setZAxisDeadZone(float zone)
zone
- the dead zone to use for the Z axis: a value from 0f to AXIS_MAXIMUM (1f)getZAxisDeadZone()
,
setDeadZone(int, float)
float getRXAxisValue()
getAxisValue(int)
float getRXAxisDeadZone()
setRXAxisDeadZone(float)
,
getDeadZone(int)
void setRXAxisDeadZone(float zone)
zone
- the dead zone to use for the RX axis: a value from 0f to AXIS_MAXIMUM (1f)getRXAxisDeadZone()
,
setDeadZone(int, float)
float getRYAxisValue()
getAxisValue(int)
float getRYAxisDeadZone()
setRYAxisDeadZone(float)
,
getDeadZone(int)
void setRYAxisDeadZone(float zone)
zone
- the dead zone to use for the RY axis: a value from 0f to AXIS_MAXIMUM (1f)getRYAxisDeadZone()
,
setDeadZone(int, float)
float getRZAxisValue()
getAxisValue(int)
float getRZAxisDeadZone()
setRZAxisDeadZone(float)
,
getDeadZone(int)
void setRZAxisDeadZone(float zone)
zone
- the dead zone to use for the RZ axis: a value from 0f to AXIS_MAXIMUM (1f)getRZAxisDeadZone()
,
setDeadZone(int, float)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |