Class AbstractGamepadMappings
java.lang.Object
gaiasky.gui.main.AbstractGamepadMappings
- All Implemented Interfaces:
IGamepadMappings
- Direct Known Subclasses:
GamepadMappings
Base abstract implementation for gamepad mappings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintintintintLeft stick horizontal code.doubleintLeft stick vertical code.doubleintdoubleintintRight stick horizontal code.doubleintRight stick vertical code.doubleintdoubledoubleintintintintintintintintintintintintintintintintprotected static final Logger.Logdouble -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the code of the horizontal dpad axis, if existsintReturns the code of the vertical dpad axis, if existsintReturns the code of the left bumper axis, used to increase the velocity.intReturns the code of the left stick horizontal axis, that produces: Roll rotation in focus mode Horizontal lateral movement in free modedoubleSensitivity of left stick axis.intReturns the code of the left stick vertical axis, that controls the forward and backward movementdoubleSensitivity of left stick vertical axisintReturns the code of the left trigger axis, used to decrease the velocity.doubleGets the sensitivity of the left trigger.intReturns the code of the right bumper axis, used to increase the velocity.intReturns the code of the Right stick horizontal axis, that produces: Vertical rotation around focus in focus mode Vertical look rotation (pitch) in free modedoubleSensitivity of pitch axis.intReturns the code of the right stick vertical axis, that produces: Horizontal rotation around focus in focus mode Horizontal look rotation (yaw) in free modedoubleSensitivity of right stick vertical axis.intReturns the code of the right trigger axis, used to increase the velocity.doubleGets the sensitivity of the right trigger.doublePower to apply to the linear value: val = val^powintReturns the code of the A buttonintReturns the code of the B buttonintReturns the code of the dpad-down buttonintReturns the code of the dpad-left buttonintReturns the code of the dpad-right buttonintReturns the code of the dpad-up buttonintReturns the code of the LB buttonintReturns the code of the left stick buttonintReturns the code of the LT buttonintReturns the code of the RB buttonintReturns the code of the right stick buttonintReturns the code of the RT buttonintReturns the code of the select buttonintReturns the code of the start buttonintReturns the code of the X buttonintReturns the code of the Y buttondoubleThe configured axis zero point.static IGamepadMappingsreadGamepadMappings(String mappingsFile)
-
Field Details
-
logger
-
AXIS_VALUE_POW
public double AXIS_VALUE_POW -
ZERO_POINT
public double ZERO_POINT -
AXIS_LSTICK_H
public int AXIS_LSTICK_HLeft stick horizontal code. -
AXIS_LSTICK_H_SENS
public double AXIS_LSTICK_H_SENS -
AXIS_RSTICK_H
public int AXIS_RSTICK_HRight stick horizontal code. -
AXIS_RSTICK_H_SENS
public double AXIS_RSTICK_H_SENS -
AXIS_RSTICK_V
public int AXIS_RSTICK_VRight stick vertical code. -
AXIS_RSTICK_V_SENS
public double AXIS_RSTICK_V_SENS -
AXIS_LSTICK_V
public int AXIS_LSTICK_VLeft stick vertical code. -
AXIS_LSTICK_V_SENS
public double AXIS_LSTICK_V_SENS -
AXIS_RB
public int AXIS_RB -
AXIS_LB
public int AXIS_LB -
AXIS_RT
public int AXIS_RT -
AXIS_RT_SENS
public double AXIS_RT_SENS -
AXIS_LT
public int AXIS_LT -
AXIS_LT_SENS
public double AXIS_LT_SENS -
AXIS_DPAD_H
public int AXIS_DPAD_H -
AXIS_DPAD_V
public int AXIS_DPAD_V -
BUTTON_DPAD_UP
public int BUTTON_DPAD_UP -
BUTTON_DPAD_DOWN
public int BUTTON_DPAD_DOWN -
BUTTON_DPAD_LEFT
public int BUTTON_DPAD_LEFT -
BUTTON_DPAD_RIGHT
public int BUTTON_DPAD_RIGHT -
BUTTON_A
public int BUTTON_A -
BUTTON_B
public int BUTTON_B -
BUTTON_X
public int BUTTON_X -
BUTTON_Y
public int BUTTON_Y -
BUTTON_START
public int BUTTON_START -
BUTTON_SELECT
public int BUTTON_SELECT -
BUTTON_RT
public int BUTTON_RT -
BUTTON_RB
public int BUTTON_RB -
BUTTON_LT
public int BUTTON_LT -
BUTTON_LB
public int BUTTON_LB -
BUTTON_LSTICK
public int BUTTON_LSTICK -
BUTTON_RSTICK
public int BUTTON_RSTICK
-
-
Constructor Details
-
AbstractGamepadMappings
public AbstractGamepadMappings()
-
-
Method Details
-
readGamepadMappings
-
getZeroPoint
public double getZeroPoint()Description copied from interface:IGamepadMappingsThe configured axis zero point. Axis values below this value are considered zero.- Specified by:
getZeroPointin interfaceIGamepadMappings- Returns:
- The zero point.
-
getAxisValuePower
public double getAxisValuePower()Description copied from interface:IGamepadMappingsPower to apply to the linear value: val = val^pow- Specified by:
getAxisValuePowerin interfaceIGamepadMappings- Returns:
- The configured value power.
-
getAxisLstickH
public int getAxisLstickH()Description copied from interface:IGamepadMappingsReturns the code of the left stick horizontal axis, that produces:- Roll rotation in focus mode
- Horizontal lateral movement in free mode
- Specified by:
getAxisLstickHin interfaceIGamepadMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisRstickH
public int getAxisRstickH()Description copied from interface:IGamepadMappingsReturns the code of the Right stick horizontal axis, that produces:- Vertical rotation around focus in focus mode
- Vertical look rotation (pitch) in free mode
- Specified by:
getAxisRstickHin interfaceIGamepadMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisRstickV
public int getAxisRstickV()Description copied from interface:IGamepadMappingsReturns the code of the right stick vertical axis, that produces:- Horizontal rotation around focus in focus mode
- Horizontal look rotation (yaw) in free mode
- Specified by:
getAxisRstickVin interfaceIGamepadMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisLstickV
public int getAxisLstickV()Description copied from interface:IGamepadMappingsReturns the code of the left stick vertical axis, that controls the forward and backward movement- Specified by:
getAxisLstickVin interfaceIGamepadMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisRB
public int getAxisRB()Description copied from interface:IGamepadMappingsReturns the code of the right bumper axis, used to increase the velocity. All the range of the axis is used.- Specified by:
getAxisRBin interfaceIGamepadMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisLB
public int getAxisLB()Description copied from interface:IGamepadMappingsReturns the code of the left bumper axis, used to increase the velocity. All the range of the axis is used.- Specified by:
getAxisLBin interfaceIGamepadMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisRT
public int getAxisRT()Description copied from interface:IGamepadMappingsReturns the code of the right trigger axis, used to increase the velocity. All the range of the axis is used. Usually mapped to a trigger button.- Specified by:
getAxisRTin interfaceIGamepadMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisLT
public int getAxisLT()Description copied from interface:IGamepadMappingsReturns the code of the left trigger axis, used to decrease the velocity. All the range of the axis is used. Usually mapped to a trigger button.- Specified by:
getAxisLTin interfaceIGamepadMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisDpadH
public int getAxisDpadH()Description copied from interface:IGamepadMappingsReturns the code of the horizontal dpad axis, if exists- Specified by:
getAxisDpadHin interfaceIGamepadMappings- Returns:
- Horizontal dpad axis code
-
getAxisDpadV
public int getAxisDpadV()Description copied from interface:IGamepadMappingsReturns the code of the vertical dpad axis, if exists- Specified by:
getAxisDpadVin interfaceIGamepadMappings- Returns:
- Vertical dpad axis code
-
getButtonY
public int getButtonY()Description copied from interface:IGamepadMappingsReturns the code of the Y button- Specified by:
getButtonYin interfaceIGamepadMappings- Returns:
- The Y button code, negative if not mapped.
-
getButtonX
public int getButtonX()Description copied from interface:IGamepadMappingsReturns the code of the X button- Specified by:
getButtonXin interfaceIGamepadMappings- Returns:
- The X button code, negative if not mapped.
-
getButtonA
public int getButtonA()Description copied from interface:IGamepadMappingsReturns the code of the A button- Specified by:
getButtonAin interfaceIGamepadMappings- Returns:
- The A button code, negative if not mapped.
-
getButtonB
public int getButtonB()Description copied from interface:IGamepadMappingsReturns the code of the B button- Specified by:
getButtonBin interfaceIGamepadMappings- Returns:
- The B button code, negative if not mapped.
-
getButtonDpadUp
public int getButtonDpadUp()Description copied from interface:IGamepadMappingsReturns the code of the dpad-up button- Specified by:
getButtonDpadUpin interfaceIGamepadMappings- Returns:
- The dpad-up button code, negative if not mapped.
-
getButtonDpadDown
public int getButtonDpadDown()Description copied from interface:IGamepadMappingsReturns the code of the dpad-down button- Specified by:
getButtonDpadDownin interfaceIGamepadMappings- Returns:
- The dpad-down button code, negative if not mapped.
-
getButtonDpadLeft
public int getButtonDpadLeft()Description copied from interface:IGamepadMappingsReturns the code of the dpad-left button- Specified by:
getButtonDpadLeftin interfaceIGamepadMappings- Returns:
- The dpad-left button code, negative if not mapped.
-
getButtonDpadRight
public int getButtonDpadRight()Description copied from interface:IGamepadMappingsReturns the code of the dpad-right button- Specified by:
getButtonDpadRightin interfaceIGamepadMappings- Returns:
- The dpad-right button code, negative if not mapped.
-
getButtonLstick
public int getButtonLstick()Description copied from interface:IGamepadMappingsReturns the code of the left stick button- Specified by:
getButtonLstickin interfaceIGamepadMappings- Returns:
- The left stick button code, negative if not mapped.
-
getButtonRstick
public int getButtonRstick()Description copied from interface:IGamepadMappingsReturns the code of the right stick button- Specified by:
getButtonRstickin interfaceIGamepadMappings- Returns:
- The right stick button code, negative if not mapped.
-
getButtonStart
public int getButtonStart()Description copied from interface:IGamepadMappingsReturns the code of the start button- Specified by:
getButtonStartin interfaceIGamepadMappings- Returns:
- The start button code, negative if not mapped.
-
getButtonSelect
public int getButtonSelect()Description copied from interface:IGamepadMappingsReturns the code of the select button- Specified by:
getButtonSelectin interfaceIGamepadMappings- Returns:
- The select button code, negative if not mapped.
-
getButtonRT
public int getButtonRT()Description copied from interface:IGamepadMappingsReturns the code of the RT button- Specified by:
getButtonRTin interfaceIGamepadMappings- Returns:
- The RT button code, negative if not mapped.
-
getButtonRB
public int getButtonRB()Description copied from interface:IGamepadMappingsReturns the code of the RB button- Specified by:
getButtonRBin interfaceIGamepadMappings- Returns:
- The RB button code, negative if not mapped.
-
getButtonLT
public int getButtonLT()Description copied from interface:IGamepadMappingsReturns the code of the LT button- Specified by:
getButtonLTin interfaceIGamepadMappings- Returns:
- The LT button code, negative if not mapped.
-
getButtonLB
public int getButtonLB()Description copied from interface:IGamepadMappingsReturns the code of the LB button- Specified by:
getButtonLBin interfaceIGamepadMappings- Returns:
- The LB button code, negative if not mapped.
-
getAxisLstickHSensitivity
public double getAxisLstickHSensitivity()Description copied from interface:IGamepadMappingsSensitivity of left stick axis.- Specified by:
getAxisLstickHSensitivityin interfaceIGamepadMappings- Returns:
- The sensitivity.
-
getAxisRstickHSensitivity
public double getAxisRstickHSensitivity()Description copied from interface:IGamepadMappingsSensitivity of pitch axis.- Specified by:
getAxisRstickHSensitivityin interfaceIGamepadMappings- Returns:
- The sensitivity.
-
getAxisRstickVSensitivity
public double getAxisRstickVSensitivity()Description copied from interface:IGamepadMappingsSensitivity of right stick vertical axis.- Specified by:
getAxisRstickVSensitivityin interfaceIGamepadMappings- Returns:
- The sensitivity of the right stick.
-
getAxisLstickVSensitivity
public double getAxisLstickVSensitivity()Description copied from interface:IGamepadMappingsSensitivity of left stick vertical axis- Specified by:
getAxisLstickVSensitivityin interfaceIGamepadMappings
-
getAxisRTSensitivity
public double getAxisRTSensitivity()Description copied from interface:IGamepadMappingsGets the sensitivity of the right trigger.- Specified by:
getAxisRTSensitivityin interfaceIGamepadMappings- Returns:
- The sensitivity of the right trigger (RT) axis.
-
getAxisLTSensitivity
public double getAxisLTSensitivity()Description copied from interface:IGamepadMappingsGets the sensitivity of the left trigger.- Specified by:
getAxisLTSensitivityin interfaceIGamepadMappings- Returns:
- The sensitivity of the left trigger (LT) axis.
-