Package gaiasky.interafce
Class AbstractControllerMappings
- java.lang.Object
-
- gaiasky.interafce.AbstractControllerMappings
-
- All Implemented Interfaces:
IControllerMappings
- Direct Known Subclasses:
ControllerMappings
public abstract class AbstractControllerMappings extends java.lang.Object implements IControllerMappings
Defines all controller inputs
-
-
Field Summary
Fields Modifier and Type Field Description int
AXIS_DPAD_H
int
AXIS_DPAD_V
int
AXIS_LSTICK_H
double
AXIS_LSTICK_H_SENS
int
AXIS_LSTICK_V
double
AXIS_LSTICK_V_SENS
int
AXIS_LT
double
AXIS_LT_SENS
int
AXIS_RSTICK_H
double
AXIS_RSTICK_H_SENS
int
AXIS_RSTICK_V
double
AXIS_RSTICK_V_SENS
int
AXIS_RT
double
AXIS_RT_SENS
double
AXIS_VALUE_POW
int
BUTTON_A
int
BUTTON_B
int
BUTTON_DPAD_DOWN
int
BUTTON_DPAD_LEFT
int
BUTTON_DPAD_RIGHT
int
BUTTON_DPAD_UP
int
BUTTON_LB
int
BUTTON_LSTICK
int
BUTTON_LT
int
BUTTON_RB
int
BUTTON_RSTICK
int
BUTTON_RT
int
BUTTON_SELECT
int
BUTTON_START
int
BUTTON_X
int
BUTTON_Y
protected static Logger.Log
logger
-
Constructor Summary
Constructors Constructor Description AbstractControllerMappings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAxisDpadH()
Returns the code of the horizontal dpad axis, if existsint
getAxisDpadV()
Returns the code of the vertical dpad axis, if existsint
getAxisLstickH()
Returns the code of the left stick horizontal axis, that produces: Roll rotation in focus mode Horizontal lateral movement in free modedouble
getAxisLstickHSensitivity()
Sensitivity of left stick axisint
getAxisLstickV()
Returns the code of the left stick vertical axis, that controls the forward and backward movementdouble
getAxisLstickVSensitivity()
Sensitivity of left stick vertical axisint
getAxisLT()
Returns the code of the left trigger axis, used to decrease the velocity.double
getAxisLTSensitivity()
Sensitivity of left trigger axisint
getAxisRstickH()
Returns the code of the Right stick horizontal axis, that produces: Vertical rotation around focus in focus mode Vertical look rotation (pitch) in free modedouble
getAxisRstickHSensitivity()
Sensitivity of pitch axisint
getAxisRstickV()
Returns the code of the right stick vertical axis, that produces: Horizontal rotation around focus in focus mode Horizontal look rotation (yaw) in free modedouble
getAxisRstickVSensitivity()
Sensitivity of right stick vertical axisint
getAxisRT()
Returns the code of the right trigger axis, used to increase the velocity.double
getAxisRTSensitivity()
Sensitivity of right trigger axisdouble
getAxisValuePower()
Power to apply to the linear value: val = val^powint
getButtonA()
Returns the code of the A buttonint
getButtonB()
Returns the code of the B buttonint
getButtonDpadDown()
Returns the code of the dpad-down buttonint
getButtonDpadLeft()
Returns the code of the dpad-left buttonint
getButtonDpadRight()
Returns the code of the dpad-right buttonint
getButtonDpadUp()
Returns the code of the dpad-up buttonint
getButtonLB()
Returns the code of the LB buttonint
getButtonLstick()
Returns the code of the left stick buttonint
getButtonLT()
Returns the code of the LT buttonint
getButtonRB()
Returns the code of the RB buttonint
getButtonRstick()
Returns the code of the right stick buttonint
getButtonRT()
Returns the code of the RT buttonint
getButtonSelect()
Returns the code of the select buttonint
getButtonStart()
Returns the code of the start buttonint
getButtonX()
Returns the code of the X buttonint
getButtonY()
Returns the code of the Y button
-
-
-
Field Detail
-
logger
protected static final Logger.Log logger
-
AXIS_VALUE_POW
public double AXIS_VALUE_POW
-
AXIS_LSTICK_H
public int AXIS_LSTICK_H
-
AXIS_LSTICK_H_SENS
public double AXIS_LSTICK_H_SENS
-
AXIS_RSTICK_H
public int AXIS_RSTICK_H
-
AXIS_RSTICK_H_SENS
public double AXIS_RSTICK_H_SENS
-
AXIS_RSTICK_V
public int AXIS_RSTICK_V
-
AXIS_RSTICK_V_SENS
public double AXIS_RSTICK_V_SENS
-
AXIS_LSTICK_V
public int AXIS_LSTICK_V
-
AXIS_LSTICK_V_SENS
public double AXIS_LSTICK_V_SENS
-
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
-
-
Method Detail
-
getAxisValuePower
public double getAxisValuePower()
Description copied from interface:IControllerMappings
Power to apply to the linear value: val = val^pow- Specified by:
getAxisValuePower
in interfaceIControllerMappings
- Returns:
- The configured value power.
-
getAxisLstickH
public int getAxisLstickH()
Description copied from interface:IControllerMappings
Returns the code of the left stick horizontal axis, that produces:- Roll rotation in focus mode
- Horizontal lateral movement in free mode
- Specified by:
getAxisLstickH
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisRstickH
public int getAxisRstickH()
Description copied from interface:IControllerMappings
Returns 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:
getAxisRstickH
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisRstickV
public int getAxisRstickV()
Description copied from interface:IControllerMappings
Returns 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:
getAxisRstickV
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisLstickV
public int getAxisLstickV()
Description copied from interface:IControllerMappings
Returns the code of the left stick vertical axis, that controls the forward and backward movement- Specified by:
getAxisLstickV
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisRT
public int getAxisRT()
Description copied from interface:IControllerMappings
Returns 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:
getAxisRT
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisLT
public int getAxisLT()
Description copied from interface:IControllerMappings
Returns 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:
getAxisLT
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisDpadH
public int getAxisDpadH()
Description copied from interface:IControllerMappings
Returns the code of the horizontal dpad axis, if exists- Specified by:
getAxisDpadH
in interfaceIControllerMappings
- Returns:
- Horizontal dpad axis code
-
getAxisDpadV
public int getAxisDpadV()
Description copied from interface:IControllerMappings
Returns the code of the vertical dpad axis, if exists- Specified by:
getAxisDpadV
in interfaceIControllerMappings
- Returns:
- Vertical dpad axis code
-
getButtonY
public int getButtonY()
Description copied from interface:IControllerMappings
Returns the code of the Y button- Specified by:
getButtonY
in interfaceIControllerMappings
- Returns:
- The Y button code, negative if not mapped.
-
getButtonX
public int getButtonX()
Description copied from interface:IControllerMappings
Returns the code of the X button- Specified by:
getButtonX
in interfaceIControllerMappings
- Returns:
- The X button code, negative if not mapped.
-
getButtonA
public int getButtonA()
Description copied from interface:IControllerMappings
Returns the code of the A button- Specified by:
getButtonA
in interfaceIControllerMappings
- Returns:
- The A button code, negative if not mapped.
-
getButtonB
public int getButtonB()
Description copied from interface:IControllerMappings
Returns the code of the B button- Specified by:
getButtonB
in interfaceIControllerMappings
- Returns:
- The B button code, negative if not mapped.
-
getButtonDpadUp
public int getButtonDpadUp()
Description copied from interface:IControllerMappings
Returns the code of the dpad-up button- Specified by:
getButtonDpadUp
in interfaceIControllerMappings
- Returns:
- The dpad-up button code, negative if not mapped.
-
getButtonDpadDown
public int getButtonDpadDown()
Description copied from interface:IControllerMappings
Returns the code of the dpad-down button- Specified by:
getButtonDpadDown
in interfaceIControllerMappings
- Returns:
- The dpad-down button code, negative if not mapped.
-
getButtonDpadLeft
public int getButtonDpadLeft()
Description copied from interface:IControllerMappings
Returns the code of the dpad-left button- Specified by:
getButtonDpadLeft
in interfaceIControllerMappings
- Returns:
- The dpad-left button code, negative if not mapped.
-
getButtonDpadRight
public int getButtonDpadRight()
Description copied from interface:IControllerMappings
Returns the code of the dpad-right button- Specified by:
getButtonDpadRight
in interfaceIControllerMappings
- Returns:
- The dpad-right button code, negative if not mapped.
-
getButtonLstick
public int getButtonLstick()
Description copied from interface:IControllerMappings
Returns the code of the left stick button- Specified by:
getButtonLstick
in interfaceIControllerMappings
- Returns:
- The left stick button code, negative if not mapped.
-
getButtonRstick
public int getButtonRstick()
Description copied from interface:IControllerMappings
Returns the code of the right stick button- Specified by:
getButtonRstick
in interfaceIControllerMappings
- Returns:
- The right stick button code, negative if not mapped.
-
getButtonStart
public int getButtonStart()
Description copied from interface:IControllerMappings
Returns the code of the start button- Specified by:
getButtonStart
in interfaceIControllerMappings
- Returns:
- The start button code, negative if not mapped.
-
getButtonSelect
public int getButtonSelect()
Description copied from interface:IControllerMappings
Returns the code of the select button- Specified by:
getButtonSelect
in interfaceIControllerMappings
- Returns:
- The select button code, negative if not mapped.
-
getButtonRT
public int getButtonRT()
Description copied from interface:IControllerMappings
Returns the code of the RT button- Specified by:
getButtonRT
in interfaceIControllerMappings
- Returns:
- The RT button code, negative if not mapped.
-
getButtonRB
public int getButtonRB()
Description copied from interface:IControllerMappings
Returns the code of the RB button- Specified by:
getButtonRB
in interfaceIControllerMappings
- Returns:
- The RB button code, negative if not mapped.
-
getButtonLT
public int getButtonLT()
Description copied from interface:IControllerMappings
Returns the code of the LT button- Specified by:
getButtonLT
in interfaceIControllerMappings
- Returns:
- The LT button code, negative if not mapped.
-
getButtonLB
public int getButtonLB()
Description copied from interface:IControllerMappings
Returns the code of the LB button- Specified by:
getButtonLB
in interfaceIControllerMappings
- Returns:
- The LB button code, negative if not mapped.
-
getAxisLstickHSensitivity
public double getAxisLstickHSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of left stick axis- Specified by:
getAxisLstickHSensitivity
in interfaceIControllerMappings
-
getAxisRstickHSensitivity
public double getAxisRstickHSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of pitch axis- Specified by:
getAxisRstickHSensitivity
in interfaceIControllerMappings
-
getAxisRstickVSensitivity
public double getAxisRstickVSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of right stick vertical axis- Specified by:
getAxisRstickVSensitivity
in interfaceIControllerMappings
-
getAxisLstickVSensitivity
public double getAxisLstickVSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of left stick vertical axis- Specified by:
getAxisLstickVSensitivity
in interfaceIControllerMappings
-
getAxisRTSensitivity
public double getAxisRTSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of right trigger axis- Specified by:
getAxisRTSensitivity
in interfaceIControllerMappings
-
getAxisLTSensitivity
public double getAxisLTSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of left trigger axis- Specified by:
getAxisLTSensitivity
in interfaceIControllerMappings
-
-