Interface JoystickAxis

All Known Implementing Classes:
AndroidSensorJoyInput.AndroidSensorJoystickAxis, DefaultJoystickAxis

public interface JoystickAxis
Represents a single axis of a Joystick.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    assignAxis(String positiveMapping, String negativeMapping)
    Assign the mappings to receive events from the given joystick axis.
    int
    Returns the unique axisId of this joystick axis within a given InputManager context.
    float
    Returns the suggested dead zone for this axis.
    Returns the joystick to which this axis object belongs.
    Returns the logical identifier of this joystick axis.
    Returns the name of this joystick.
    boolean
    Returns true if this is an analog axis, meaning the values are a continuous range instead of 1, 0, and -1.
    boolean
    Returns true if this axis presents relative values.
  • Field Details

  • Method Details

    • assignAxis

      void assignAxis(String positiveMapping, String negativeMapping)
      Assign the mappings to receive events from the given joystick axis.
      Parameters:
      positiveMapping - The mapping to receive events when the axis is negative
      negativeMapping - The mapping to receive events when the axis is positive
    • getJoystick

      Joystick getJoystick()
      Returns the joystick to which this axis object belongs.
      Returns:
      the pre-existing instance
    • getName

      String getName()
      Returns the name of this joystick.
      Returns:
      the name of this joystick.
    • getLogicalId

      String getLogicalId()
      Returns the logical identifier of this joystick axis.
      Returns:
      the logical identifier of this joystick.
    • getAxisId

      int getAxisId()
      Returns the unique axisId of this joystick axis within a given InputManager context.
      Returns:
      the axisId of this joystick axis.
    • isAnalog

      boolean isAnalog()
      Returns true if this is an analog axis, meaning the values are a continuous range instead of 1, 0, and -1.
      Returns:
      true if analog, otherwise false
    • isRelative

      boolean isRelative()
      Returns true if this axis presents relative values.
      Returns:
      true if relative, otherwise false
    • getDeadZone

      float getDeadZone()
      Returns the suggested dead zone for this axis. Values less than this can be safely ignored.
      Returns:
      the radius of the dead zone