Class AndroidSensorJoyInput.AndroidSensorJoystickAxis

java.lang.Object
com.jme3.input.DefaultJoystickAxis
com.jme3.input.android.AndroidSensorJoyInput.AndroidSensorJoystickAxis
All Implemented Interfaces:
JoystickAxis, SensorJoystickAxis
Enclosing class:
AndroidSensorJoyInput

public class AndroidSensorJoyInput.AndroidSensorJoystickAxis extends DefaultJoystickAxis implements SensorJoystickAxis
  • Constructor Details

    • AndroidSensorJoystickAxis

      public AndroidSensorJoystickAxis(InputManager inputManager, Joystick parent, int axisIndex, String name, String logicalId, boolean isAnalog, boolean isRelative, float deadZone, float maxRawValue)
  • Method Details

    • getMaxRawValue

      public float getMaxRawValue()
      Description copied from interface: SensorJoystickAxis
      Returns the current maximum raw sensor value that is being used to scale the joystick axis value.
      Specified by:
      getMaxRawValue in interface SensorJoystickAxis
      Returns:
      maxRawValue The current maximum raw sensor value used for scaling the joystick axis value
    • setMaxRawValue

      public void setMaxRawValue(float maxRawValue)
      Description copied from interface: SensorJoystickAxis
      Method to allow users to set the raw sensor value that represents the maximum joystick axis value. Values sent to InputManager are scaled using the maxRawValue.
      Specified by:
      setMaxRawValue in interface SensorJoystickAxis
      Parameters:
      maxRawValue - Raw sensor value that will be used to scale joystick axis value
    • getLastRawValue

      protected float getLastRawValue()
    • setCurRawValue

      protected void setCurRawValue(float rawValue)
    • getJoystickAxisValue

      protected float getJoystickAxisValue()
    • isChanged

      protected boolean isChanged()
    • calibrateCenter

      public void calibrateCenter()
      Description copied from interface: SensorJoystickAxis
      Calibrates the axis to the current value. Future axis values will be sent as a delta from the calibration value.
      Specified by:
      calibrateCenter in interface SensorJoystickAxis