| Modifier and Type | Field and Description |
|---|---|
| private ArrayList | axes
The Axes that have been detected on the JInput controller |
| private float[] | axesMax
The maximum values read for each axis |
| private float[] | axesValue
The values that were read from the axes last check |
| private ArrayList | buttons
The Buttons that have been detected on the JInput controller |
| private boolean[] | buttonState
The state of the buttons last check |
| private float[] | deadZones
The dead zones for each axis |
| private int | index
The index that has been assigned to this controller |
| private ArrayList | pov
The POVs that have been detected on the JInput controller |
| private float[] | povValues
The values that were read from the pov last check |
| private Rumbler[] | rumblers
The rumblers exposed by the controller |
| private int | rxaxis
The index of the RX axis or -1 if no RX axis is defined |
| private int | ryaxis
The index of the RY axis or -1 if no RY axis is defined |
| private int | rzaxis
The index of the RZ axis or -1 if no RZ axis is defined |
| private Controller | target
The JInput controller this class is wrapping |
| private int | xaxis
The index of the X axis or -1 if no X axis is defined |
| private int | yaxis
The index of the Y axis or -1 if no Y axis is defined |
| private int | zaxis
The index of the X axis or -1 if no Z axis is defined |
| Access | Constructor and Description |
|---|---|
| pack-priv | JInputController(int
The index this controller has been assigned to index, Controller The target JInput controller this class is wrapping target)Create a new controller that wraps round a JInput controller and hopefully makes it easier to use. |
| Modifier and Type | Method and Description |
|---|---|
| public int | getAxisCount()
Implements org. |
| public String | getAxisName(int
The index of the axis whose name should be retrieved index)Implements org. |
| public float | getAxisValue(int
The index of axis to be read index)Implements org. |
| public int | getButtonCount()
Implements org. |
| public String | getButtonName(int
The index of the button whose name should be retrieved index)Implements org. |
| public float | getDeadZone(int
The index of the axis for which to retrieve the dead zone index)Implements org. |
| public int | getIndex()
Implements org. |
| public String | |
| public float | getPovX()
Implements org. |
| public float | getPovY()
Implements org. |
| public int | getRumblerCount()
Implements org. |
| public String | getRumblerName(int
The rumbler index index)Implements org. |
| public float | getRXAxisDeadZone()
Implements org. |
| public float | getRXAxisValue()
Implements org. |
| public float | getRYAxisDeadZone()
Implements org. |
| public float | getRYAxisValue()
Implements org. |
| public float | getRZAxisDeadZone()
Implements org. |
| public float | getRZAxisValue()
Implements org. |
| public float | getXAxisDeadZone()
Implements org. |
| public float | getXAxisValue()
Implements org. |
| public float | getYAxisDeadZone()
Implements org. |
| public float | getYAxisValue()
Implements org. |
| public float | getZAxisDeadZone()
Implements org. |
| public float | getZAxisValue()
Implements org. |
| public boolean | isButtonPressed(int
The button to check index)Implements org. |
| public void | |
| public void | setDeadZone(int
The index of hte axis for which to set the dead zone index, float The dead zone to use for the specified axis zone)Implements org. |
| public void | setRumblerStrength(int
The index of the rumbler index, float The strength to vibrate at strength)Implements org. |
| public void | setRXAxisDeadZone(float
The dead zone to use for the RX axis zone)Implements org. |
| public void | setRYAxisDeadZone(float
The dead zone to use for the RY axis zone)Implements org. |
| public void | setRZAxisDeadZone(float
The dead zone to use for the RZ axis zone)Implements org. |
| public void | setXAxisDeadZone(float
The dead zone to use for the X axis zone)Implements org. |
| public void | setYAxisDeadZone(float
The dead zone to use for the Y axis zone)Implements org. |
| public void | setZAxisDeadZone(float
The dead zone to use for the Z axis zone)Implements org. |
| axes | back to summary |
|---|---|
| private ArrayList<Component> axes The Axes that have been detected on the JInput controller | |
| axesMax | back to summary |
|---|---|
| private float[] axesMax The maximum values read for each axis | |
| axesValue | back to summary |
|---|---|
| private float[] axesValue The values that were read from the axes last check | |
| buttons | back to summary |
|---|---|
| private ArrayList<Component> buttons The Buttons that have been detected on the JInput controller | |
| buttonState | back to summary |
|---|---|
| private boolean[] buttonState The state of the buttons last check | |
| deadZones | back to summary |
|---|---|
| private float[] deadZones The dead zones for each axis | |
| index | back to summary |
|---|---|
| private int index The index that has been assigned to this controller | |
| pov | back to summary |
|---|---|
| private ArrayList<Component> pov The POVs that have been detected on the JInput controller | |
| povValues | back to summary |
|---|---|
| private float[] povValues The values that were read from the pov last check | |
| rumblers | back to summary |
|---|---|
| private Rumbler[] rumblers The rumblers exposed by the controller | |
| rxaxis | back to summary |
|---|---|
| private int rxaxis The index of the RX axis or -1 if no RX axis is defined | |
| ryaxis | back to summary |
|---|---|
| private int ryaxis The index of the RY axis or -1 if no RY axis is defined | |
| rzaxis | back to summary |
|---|---|
| private int rzaxis The index of the RZ axis or -1 if no RZ axis is defined | |
| target | back to summary |
|---|---|
| private Controller target The JInput controller this class is wrapping | |
| xaxis | back to summary |
|---|---|
| private int xaxis The index of the X axis or -1 if no X axis is defined | |
| yaxis | back to summary |
|---|---|
| private int yaxis The index of the Y axis or -1 if no Y axis is defined | |
| zaxis | back to summary |
|---|---|
| private int zaxis The index of the X axis or -1 if no Z axis is defined | |
| JInputController | back to summary |
|---|---|
| pack-priv JInputController(int index, Controller target) Create a new controller that wraps round a JInput controller and hopefully makes it easier to use.
| |
| getAxisCount | back to summary |
|---|---|
| public int getAxisCount() Implements org. Doc from org. Retrieve the number of axes available on this controller.
| |
| getAxisName | back to summary |
|---|---|
| public String getAxisName(int index) Implements org. Doc from org. Get the name that's given to the specified axis
| |
| getAxisValue | back to summary |
|---|---|
| public float getAxisValue(int index) Implements org. Doc from org. Retrieve the value thats currently available on a specified axis. The value will always be between 1.0 and -1.0 and will calibrate as values are passed read. It may be useful to get the player to wiggle the joystick from side to side to get the calibration right.
| |
| getButtonCount | back to summary |
|---|---|
| public int getButtonCount() Implements org. Doc from org. Retrieve the number of buttons available on this controller
| |
| getButtonName | back to summary |
|---|---|
| public String getButtonName(int index) Implements org. Doc from org. Get the name of the specified button. Be warned, often this is as exciting as "Button X"
| |
| getDeadZone | back to summary |
|---|---|
| public float getDeadZone(int index) Implements org. Doc from org. Get the dead zone for a specified axis
| |
| getIndex | back to summary |
|---|---|
| public int getIndex() Implements org. Doc from org. Get the index of this controller in the collection
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. Get the name assigned to this controller.
| |
| getPovX | back to summary |
|---|---|
| public float getPovX() Implements org. Doc from org. Get the X-Axis value of the POV on this controller
| |
| getPovY | back to summary |
|---|---|
| public float getPovY() Implements org. Doc from org. Get the Y-Axis value of the POV on this controller
| |
| getRumblerCount | back to summary |
|---|---|
| public int getRumblerCount() Implements org. Doc from org. Returns the number of rumblers this controller supports | |
| getRumblerName | back to summary |
|---|---|
| public String getRumblerName(int index) Implements org. Doc from org. Returns the name of the specified rumbler
| |
| getRXAxisDeadZone | back to summary |
|---|---|
| public float getRXAxisDeadZone() Implements org. Doc from org. Get the dead zone for the RX axis.
| |
| getRXAxisValue | back to summary |
|---|---|
| public float getRXAxisValue() Implements org. Doc from org. Get the value from the RX axis if there is one. If no RX axis is defined a zero value will be returned.
| |
| getRYAxisDeadZone | back to summary |
|---|---|
| public float getRYAxisDeadZone() Implements org. Doc from org. Get the dead zone for the RY axis.
| |
| getRYAxisValue | back to summary |
|---|---|
| public float getRYAxisValue() Implements org. Doc from org. Get the value from the RY axis if there is one. If no RY axis is defined a zero value will be returned.
| |
| getRZAxisDeadZone | back to summary |
|---|---|
| public float getRZAxisDeadZone() Implements org. Doc from org. Get the dead zone for the RZ axis.
| |
| getRZAxisValue | back to summary |
|---|---|
| public float getRZAxisValue() Implements org. Doc from org. Get the value from the RZ axis if there is one. If no RZ axis is defined a zero value will be returned.
| |
| getXAxisDeadZone | back to summary |
|---|---|
| public float getXAxisDeadZone() Implements org. Doc from org. Get the dead zone for the X axis.
| |
| getXAxisValue | back to summary |
|---|---|
| public float getXAxisValue() Implements org. Doc from org. Get the value from the X axis if there is one. If no X axis is defined a zero value will be returned.
| |
| getYAxisDeadZone | back to summary |
|---|---|
| public float getYAxisDeadZone() Implements org. Doc from org. Get the dead zone for the Y axis.
| |
| getYAxisValue | back to summary |
|---|---|
| public float getYAxisValue() Implements org. Doc from org. Get the value from the Y axis if there is one. If no Y axis is defined a zero value will be returned.
| |
| getZAxisDeadZone | back to summary |
|---|---|
| public float getZAxisDeadZone() Implements org. Doc from org. Get the dead zone for the Z axis.
| |
| getZAxisValue | back to summary |
|---|---|
| public float getZAxisValue() Implements org. Doc from org. Get the value from the Z axis if there is one. If no Z axis is defined a zero value will be returned.
| |
| isButtonPressed | back to summary |
|---|---|
| public boolean isButtonPressed(int index) Implements org. Doc from org. Check if a button is currently pressed
| |
| poll | back to summary |
|---|---|
| public void poll() Implements org. Doc from org. Poll the controller for new data. This will also update events | |
| setDeadZone | back to summary |
|---|---|
| public void setDeadZone(int index, float zone) Implements org. Doc from org. Set the dead zone for the specified axis
| |
| setRumblerStrength | back to summary |
|---|---|
| public void setRumblerStrength(int index, float strength) Implements org. Doc from org. Sets the vibration strength of the specified rumbler
| |
| setRXAxisDeadZone | back to summary |
|---|---|
| public void setRXAxisDeadZone(float zone) Implements org. Doc from org. Set the dead zone for the RX axis
| |
| setRYAxisDeadZone | back to summary |
|---|---|
| public void setRYAxisDeadZone(float zone) Implements org. Doc from org. Set the dead zone for the RY axis
| |
| setRZAxisDeadZone | back to summary |
|---|---|
| public void setRZAxisDeadZone(float zone) Implements org. Doc from org. Set the dead zone for the RZ axis
| |
| setXAxisDeadZone | back to summary |
|---|---|
| public void setXAxisDeadZone(float zone) Implements org. Doc from org. Set the dead zone for the X axis
| |
| setYAxisDeadZone | back to summary |
|---|---|
| public void setYAxisDeadZone(float zone) Implements org. Doc from org. Set the dead zone for the Y axis
| |
| setZAxisDeadZone | back to summary |
|---|---|
| public void setZAxisDeadZone(float zone) Implements org. Doc from org. Set the dead zone for the Z axis
| |