Package com.jme3.input.lwjgl
Class GlfwMouseInput
java.lang.Object
com.jme3.input.lwjgl.GlfwMouseInput
- All Implemented Interfaces:
- Input,- MouseInput
Captures mouse input using GLFW callbacks. It then temporarily stores these
 in event queues which are processed in the 
update() method. Due to
 some of the GLFW button IDs, there is a conversion method in this class which
 will convert the GLFW left, middle and right mouse button to JME3 left,
 middle and right button codes.- Since:
- 3.1
- 
Field SummaryFields inherited from interface com.jme3.input.MouseInputAXIS_WHEEL, AXIS_X, AXIS_Y, BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddestroy()Ceases listening to events from the device.intReturns the number of buttons the mouse has.longvoidInitializes the native side to listen into events from the device.booleanvoidRe-initializes the mouse input context window specific callbacksvoidsetCursorVisible(boolean visible) Set whether the mouse cursor should be visible or not.voidsetInputListener(RawInputListener listener) Sets the input listener to receive events from this device.voidsetNativeCursor(JmeCursor jmeCursor) Sets the cursor to use.voidupdate()Queries the device for input.
- 
Constructor Details- 
GlfwMouseInput
 
- 
- 
Method Details- 
initializepublic void initialize()Description copied from interface:InputInitializes the native side to listen into events from the device.- Specified by:
- initializein interface- Input
 
- 
resetContextpublic void resetContext()Re-initializes the mouse input context window specific callbacks
- 
isInitializedpublic boolean isInitialized()- Specified by:
- isInitializedin interface- Input
- Returns:
- True if the device has been initialized and not destroyed.
- See Also:
 
- 
getButtonCountpublic int getButtonCount()Description copied from interface:MouseInputReturns the number of buttons the mouse has. Typically 3 for most mice.- Specified by:
- getButtonCountin interface- MouseInput
- Returns:
- the number of buttons the mouse has.
 
- 
updatepublic void update()Description copied from interface:InputQueries the device for input. All events should be sent to the RawInputListener set with setInputListener.
- 
destroypublic void destroy()Description copied from interface:InputCeases listening to events from the device.
- 
setCursorVisiblepublic void setCursorVisible(boolean visible) Description copied from interface:MouseInputSet whether the mouse cursor should be visible or not.- Specified by:
- setCursorVisiblein interface- MouseInput
- Parameters:
- visible- Whether the mouse cursor should be visible or not.
 
- 
setInputListenerDescription copied from interface:InputSets the input listener to receive events from this device. The appropriate events should be dispatched through the callbacks in RawInputListener.- Specified by:
- setInputListenerin interface- Input
- Parameters:
- listener- the desired listener
 
- 
getInputTimeNanospublic long getInputTimeNanos()- Specified by:
- getInputTimeNanosin interface- Input
- Returns:
- The current absolute time as nanoseconds. This time is expected to be relative to the time given in InputEvents time property.
 
- 
setNativeCursorDescription copied from interface:MouseInputSets the cursor to use.- Specified by:
- setNativeCursorin interface- MouseInput
- Parameters:
- jmeCursor- The cursor to use.
 
 
-