Package com.jme3.input.lwjgl
Class JInputJoyInput
java.lang.Object
com.jme3.input.lwjgl.JInputJoyInput
-
Nested Class Summary
-
Field Summary
Fields inherited from interface com.jme3.input.JoyInput
AXIS_POV_X, AXIS_POV_Y
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Ceases listening to events from the device.long
void
Initializes the native side to listen into events from the device.boolean
Joystick[]
loadJoysticks
(InputManager inputManager) Loads a list of joysticks from the system.void
setInputListener
(RawInputListener listener) Sets the input listener to receive events from this device.void
setJoyRumble
(int joyId, float amount) Causes the joystick atjoyId
index to rumble with the given amount.void
update()
Queries the device for input.
-
Constructor Details
-
JInputJoyInput
public JInputJoyInput()
-
-
Method Details
-
setJoyRumble
public void setJoyRumble(int joyId, float amount) Description copied from interface:JoyInput
Causes the joystick atjoyId
index to rumble with the given amount.- Specified by:
setJoyRumble
in interfaceJoyInput
- Parameters:
joyId
- The joystick indexamount
- Rumble amount. Should be between 0 and 1.
-
loadJoysticks
Description copied from interface:JoyInput
Loads a list of joysticks from the system.- Specified by:
loadJoysticks
in interfaceJoyInput
- Parameters:
inputManager
- The input manager requesting to load joysticks- Returns:
- A list of joysticks that are installed.
-
initialize
public void initialize()Description copied from interface:Input
Initializes the native side to listen into events from the device.- Specified by:
initialize
in interfaceInput
-
update
public void update()Description copied from interface:Input
Queries the device for input. All events should be sent to the RawInputListener set with setInputListener. -
destroy
public void destroy()Description copied from interface:Input
Ceases listening to events from the device. -
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceInput
- Returns:
- True if the device has been initialized and not destroyed.
- See Also:
-
setInputListener
Description copied from interface:Input
Sets the input listener to receive events from this device. The appropriate events should be dispatched through the callbacks in RawInputListener.- Specified by:
setInputListener
in interfaceInput
- Parameters:
listener
- the desired listener
-
getInputTimeNanos
public long getInputTimeNanos()- Specified by:
getInputTimeNanos
in interfaceInput
- Returns:
- The current absolute time as nanoseconds. This time is expected to be relative to the time given in InputEvents time property.
-