Class PhysicalLayer

java.lang.Object
com.ardor3d.input.PhysicalLayer

public class PhysicalLayer extends Object
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 Details

  • Method Details

    • readState

      public void readState()
      Causes a poll of the input devices to happen, making any updates to input states available via the drainAvailableStates() method.
      Throws:
      IllegalStateException - if too many state changes have happened since the last call to this method
    • drainAvailableStates

      public List<InputState> drainAvailableStates()
      Fetches any new InputStates 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

      public ControllerWrapper getControllerWrapper()
    • getKeyboardWrapper

      public KeyboardWrapper getKeyboardWrapper()
    • getMouseWrapper

      public MouseWrapper getMouseWrapper()