Interface EngineInputEventReceiver


public interface EngineInputEventReceiver
This class is designed to be the class that implementors of EngineInputBroadcaster use to fire input events to the engine.

This is because there might be different implementations of input libraries, and the engine would still need to have a consistent way to hear input events.

Basically, if a EngineElement is supposed to hear input events, it should fire all of its main input events through this object so that it is broadcast to all listening components.

The Engine uses something called input codes to define actions taken so that the component that is supposed to listen for device actions can broadcast filtered events, or automate them.

Input codes should be defined by the layer that reads device input. A good strategy for handling heterogeneous input systems like GUIs are to have those handle system input, and then if the input wasn't handled, pass it along to the Engine.

Author:
Matthew Tropiano
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fireInputFlag(String code, boolean set)
    Should be called to fire an input set/release change event happens to the engine.
    void
    fireInputValue(String code, double value)
    Should be called to fire an input value change event to the engine.
  • Method Details

    • fireInputFlag

      void fireInputFlag(String code, boolean set)
      Should be called to fire an input set/release change event happens to the engine.
      Parameters:
      code - the input code.
      set - true if active, false if inactive.
    • fireInputValue

      void fireInputValue(String code, double value)
      Should be called to fire an input value change event to the engine. This is best used for things like axis changes, throttles, and whatever has a variable input value.

      This method is called if the previous input listeners did not handle this.

      Parameters:
      code - the input code.
      value - the value of the input.