Package com.jme3.input.event
Class JoyAxisEvent
java.lang.Object
com.jme3.input.event.InputEvent
com.jme3.input.event.JoyAxisEvent
Joystick axis event.
-
Field Summary
Fields inherited from class com.jme3.input.event.InputEvent
consumed, time
-
Constructor Summary
ConstructorDescriptionJoyAxisEvent
(JoystickAxis axis, float value) Creates a new event for a joystick axis.JoyAxisEvent
(JoystickAxis axis, float value, float rawValue) Creates a new event for a joystick axis. -
Method Summary
Methods inherited from class com.jme3.input.event.InputEvent
getTime, isConsumed, setConsumed, setTime
-
Constructor Details
-
JoyAxisEvent
Creates a new event for a joystick axis.- Parameters:
axis
- - The axis that generated this event.value
- - The value of the axis.
-
JoyAxisEvent
Creates a new event for a joystick axis.- Parameters:
axis
- - The axis that generated this event.value
- - The value of the axis, after rescaling took place.rawValue
- - The original axis value before it was rescaled byJoystickCompatibilityMappings
.
-
-
Method Details
-
getAxis
Returns the JoystickAxis that triggered this event.- Returns:
- the pre-existing instance
- See Also:
-
getAxisIndex
public int getAxisIndex()Returns the joystick axis index.- Returns:
- joystick axis index.
- See Also:
-
getJoyIndex
public int getJoyIndex()The joystick index.- Returns:
- joystick index.
- See Also:
-
getValue
public float getValue()The value of the axis.- Returns:
- value of the axis.
-
getRawValue
public float getRawValue()The value of the axis before it was remapped.- Returns:
- value of the axis.
-