at.wisch.joystick.event
Class ControllerAxisEvent
java.lang.Object
org.lwjgl.input.ControllerEvent
at.wisch.joystick.event.AdvancedControllerEvent
at.wisch.joystick.event.ControllerAxisEvent
public class ControllerAxisEvent
- extends AdvancedControllerEvent
The Class ControllerAxisEvent. If this event occurs, it means that an axis was moved. Movements within the dead zone are filtered and do not cause such an event.
- Author:
- Martin Wischenbart
- See Also:
ControllerEventManager
Constructor Summary |
ControllerAxisEvent(Controller source,
long timeStamp,
int axisIndex,
float axisValue)
Instantiates a new ControllerAxisEvent. |
Method Summary |
float |
getAxisValue()
Gets the new axis value. |
java.lang.String |
toString()
Returns a String describing the AxisControllerEvent. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ControllerAxisEvent
public ControllerAxisEvent(Controller source,
long timeStamp,
int axisIndex,
float axisValue)
- Instantiates a new ControllerAxisEvent.
- Parameters:
source
- the Controller that generated the eventtimeStamp
- the timestamp given for this eventaxisIndex
- the index of the axis that has changed its valueaxisValue
- the new axis value
getAxisValue
public float getAxisValue()
- Gets the new axis value. Use getControlIndex() to get the axis index.
- Returns:
- the axis value (from -1f to +1f)
- See Also:
ControllerEvent.getControlIndex()
toString
public java.lang.String toString()
- Returns a String describing the AxisControllerEvent. This String contains the Joystick index, the axis index and the new axis value.
- Specified by:
toString
in class AdvancedControllerEvent
- Returns:
- a String describing the AxisControllerEvent