Package com.ardor3d.input
Class PhysicalLayer
java.lang.Object
com.ardor3d.input.PhysicalLayer
Provides access to the physical layer of the input system. This is done via one method that polls the input system,
causing it to track which states it has been in
readState()
, and one method that fetches the list of states
that are new drainAvailableStates()
.-
Constructor Summary
ConstructorDescriptionPhysicalLayer
(KeyboardWrapper keyboardWrapper, MouseWrapper mouseWrapper) PhysicalLayer
(KeyboardWrapper keyboardWrapper, MouseWrapper mouseWrapper, ControllerWrapper controllerWrapper) PhysicalLayer
(KeyboardWrapper keyboardWrapper, MouseWrapper mouseWrapper, ControllerWrapper controllerWrapper, FocusWrapper focusWrapper) PhysicalLayer
(KeyboardWrapper keyboardWrapper, MouseWrapper mouseWrapper, FocusWrapper focusWrapper) -
Method Summary
Modifier and TypeMethodDescriptionFetches any newInputState
s since the last call to this method.void
Causes a poll of the input devices to happen, making any updates to input states available via thedrainAvailableStates()
method.
-
Constructor Details
-
PhysicalLayer
public PhysicalLayer() -
PhysicalLayer
-
PhysicalLayer
public PhysicalLayer(KeyboardWrapper keyboardWrapper, MouseWrapper mouseWrapper, FocusWrapper focusWrapper) -
PhysicalLayer
public PhysicalLayer(KeyboardWrapper keyboardWrapper, MouseWrapper mouseWrapper, ControllerWrapper controllerWrapper) -
PhysicalLayer
public PhysicalLayer(KeyboardWrapper keyboardWrapper, MouseWrapper mouseWrapper, ControllerWrapper controllerWrapper, FocusWrapper focusWrapper)
-
-
Method Details
-
readState
public void readState()Causes a poll of the input devices to happen, making any updates to input states available via thedrainAvailableStates()
method.- Throws:
IllegalStateException
- if too many state changes have happened since the last call to this method
-
drainAvailableStates
Fetches any newInputState
s since the last call to this method. If no input system changes have been made since the last call (no mouse movements, no keys pressed or released), an empty list is returned.- Returns:
- the list of new
InputState
, or an empty list if there have been no changes in input
-
getControllerWrapper
-
getKeyboardWrapper
-
getMouseWrapper
-