Package gaiasky.interfce
Class AbstractControllerMappings
- java.lang.Object
-
- gaiasky.interfce.AbstractControllerMappings
-
- All Implemented Interfaces:
IControllerMappings
- Direct Known Subclasses:
ControllerMappings
,XBox360Mappings
public abstract class AbstractControllerMappings extends java.lang.Object implements IControllerMappings
-
-
Field Summary
Fields Modifier and Type Field Description int
AXIS_MOVE
double
AXIS_MOVE_SENS
int
AXIS_PITCH
double
AXIS_PITCH_SENS
int
AXIS_ROLL
double
AXIS_ROLL_SENS
double
AXIS_VALUE_POW
int
AXIS_VEL_DOWN
double
AXIS_VEL_DOWN_SENS
int
AXIS_VEL_UP
double
AXIS_VEL_UP_SENS
int
AXIS_YAW
double
AXIS_YAW_SENS
int
BUTTON_DOWN
int
BUTTON_MODE_TOGGLE
int
BUTTON_UP
int
BUTTON_VEL_DOWN
int
BUTTON_VEL_MULT_HALF
int
BUTTON_VEL_MULT_TENTH
int
BUTTON_VEL_UP
-
Constructor Summary
Constructors Constructor Description AbstractControllerMappings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAxisMove()
Returns the code of the axis that controls the forward and backward movementdouble
getAxisMoveSensitivity()
Sensitivity of move axisint
getAxisPitch()
Returns the code of the axis that produces: Vertical rotation around focus in focus mode Vertical look rotation (pitch) in free modedouble
getAxisPitchSensitivity()
Sensitivity of pitch axisint
getAxisRoll()
Returns the code of the axis that produces: Roll rotation in focus mode Horizontal lateral movement in free modedouble
getAxisRollSensitivity()
Sensitivity of roll axisdouble
getAxisValuePower()
Power to apply to the linear value: val = val^powdouble
getAxisVelDownSensitivity()
Sensitivity of velocity down axisint
getAxisVelocityDown()
Returns the code of the axis used to decrease the velocity.int
getAxisVelocityUp()
Returns the code of the axis used to increase the velocity.double
getAxisVelUpSensitivity()
Sensitivity of velocity up axisint
getAxisYaw()
Returns the code of the axis that produces: Horizontal rotation around focus in focus mode Horizontal look rotation (yaw) in free modedouble
getAxisYawSensitivity()
Sensitivity of yaw axisint
getButtonDown()
Returns the code of the button used to go down.int
getButtonModeToggle()
Returns the code of the button used to toggle between free and focus mode.int
getButtonUp()
Returns the code of the button used to go up.int
getButtonVelocityDown()
Returns the code of the button used to decrease the velocity.int
getButtonVelocityMultiplierHalf()
Returns the code of the button that, when pressed, multiplies the velocity vector by 0.5.int
getButtonVelocityMultiplierTenth()
Returns the code of the button that, when pressed, multiplies the velocity vector by 0.1.int
getButtonVelocityUp()
Returns the code of the button used to increase the velocity.
-
-
-
Field Detail
-
AXIS_VALUE_POW
public double AXIS_VALUE_POW
-
AXIS_ROLL
public int AXIS_ROLL
-
AXIS_ROLL_SENS
public double AXIS_ROLL_SENS
-
AXIS_PITCH
public int AXIS_PITCH
-
AXIS_PITCH_SENS
public double AXIS_PITCH_SENS
-
AXIS_YAW
public int AXIS_YAW
-
AXIS_YAW_SENS
public double AXIS_YAW_SENS
-
AXIS_MOVE
public int AXIS_MOVE
-
AXIS_MOVE_SENS
public double AXIS_MOVE_SENS
-
AXIS_VEL_UP
public int AXIS_VEL_UP
-
AXIS_VEL_UP_SENS
public double AXIS_VEL_UP_SENS
-
AXIS_VEL_DOWN
public int AXIS_VEL_DOWN
-
AXIS_VEL_DOWN_SENS
public double AXIS_VEL_DOWN_SENS
-
BUTTON_VEL_UP
public int BUTTON_VEL_UP
-
BUTTON_VEL_DOWN
public int BUTTON_VEL_DOWN
-
BUTTON_VEL_MULT_TENTH
public int BUTTON_VEL_MULT_TENTH
-
BUTTON_VEL_MULT_HALF
public int BUTTON_VEL_MULT_HALF
-
BUTTON_UP
public int BUTTON_UP
-
BUTTON_DOWN
public int BUTTON_DOWN
-
BUTTON_MODE_TOGGLE
public int BUTTON_MODE_TOGGLE
-
-
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.
-
getAxisRoll
public int getAxisRoll()
Description copied from interface:IControllerMappings
Returns the code of the axis that produces:- Roll rotation in focus mode
- Horizontal lateral movement in free mode
- Specified by:
getAxisRoll
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisPitch
public int getAxisPitch()
Description copied from interface:IControllerMappings
Returns the code of the axis that produces:- Vertical rotation around focus in focus mode
- Vertical look rotation (pitch) in free mode
- Specified by:
getAxisPitch
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisYaw
public int getAxisYaw()
Description copied from interface:IControllerMappings
Returns the code of the axis that produces:- Horizontal rotation around focus in focus mode
- Horizontal look rotation (yaw) in free mode
- Specified by:
getAxisYaw
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisMove
public int getAxisMove()
Description copied from interface:IControllerMappings
Returns the code of the axis that controls the forward and backward movement- Specified by:
getAxisMove
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisVelocityUp
public int getAxisVelocityUp()
Description copied from interface:IControllerMappings
Returns the code of the axis used to increase the velocity. All the range of the axis is used. Usually mapped to a trigger button.- Specified by:
getAxisVelocityUp
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getAxisVelocityDown
public int getAxisVelocityDown()
Description copied from interface:IControllerMappings
Returns the code of the axis used to decrease the velocity. All the range of the axis is used. Usually mapped to a trigger button.- Specified by:
getAxisVelocityDown
in interfaceIControllerMappings
- Returns:
- The axis code, negative if not mapped.
-
getButtonVelocityMultiplierTenth
public int getButtonVelocityMultiplierTenth()
Description copied from interface:IControllerMappings
Returns the code of the button that, when pressed, multiplies the velocity vector by 0.1.- Specified by:
getButtonVelocityMultiplierTenth
in interfaceIControllerMappings
- Returns:
- The button code, negative if not mapped.
-
getButtonVelocityMultiplierHalf
public int getButtonVelocityMultiplierHalf()
Description copied from interface:IControllerMappings
Returns the code of the button that, when pressed, multiplies the velocity vector by 0.5.- Specified by:
getButtonVelocityMultiplierHalf
in interfaceIControllerMappings
- Returns:
- The button code, negative if not mapped.
-
getButtonVelocityUp
public int getButtonVelocityUp()
Description copied from interface:IControllerMappings
Returns the code of the button used to increase the velocity.- Specified by:
getButtonVelocityUp
in interfaceIControllerMappings
- Returns:
- The button code, negative if not mapped.
-
getButtonVelocityDown
public int getButtonVelocityDown()
Description copied from interface:IControllerMappings
Returns the code of the button used to decrease the velocity.- Specified by:
getButtonVelocityDown
in interfaceIControllerMappings
- Returns:
- The button code, negative if not mapped.
-
getButtonUp
public int getButtonUp()
Description copied from interface:IControllerMappings
Returns the code of the button used to go up.- Specified by:
getButtonUp
in interfaceIControllerMappings
- Returns:
- The button code, negative if not mapped.
-
getButtonDown
public int getButtonDown()
Description copied from interface:IControllerMappings
Returns the code of the button used to go down.- Specified by:
getButtonDown
in interfaceIControllerMappings
- Returns:
- The button code, negative if not mapped.
-
getButtonModeToggle
public int getButtonModeToggle()
Description copied from interface:IControllerMappings
Returns the code of the button used to toggle between free and focus mode.- Specified by:
getButtonModeToggle
in interfaceIControllerMappings
- Returns:
- The button code, negative if not mapped.
-
getAxisRollSensitivity
public double getAxisRollSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of roll axis- Specified by:
getAxisRollSensitivity
in interfaceIControllerMappings
-
getAxisPitchSensitivity
public double getAxisPitchSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of pitch axis- Specified by:
getAxisPitchSensitivity
in interfaceIControllerMappings
-
getAxisYawSensitivity
public double getAxisYawSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of yaw axis- Specified by:
getAxisYawSensitivity
in interfaceIControllerMappings
-
getAxisMoveSensitivity
public double getAxisMoveSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of move axis- Specified by:
getAxisMoveSensitivity
in interfaceIControllerMappings
-
getAxisVelUpSensitivity
public double getAxisVelUpSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of velocity up axis- Specified by:
getAxisVelUpSensitivity
in interfaceIControllerMappings
-
getAxisVelDownSensitivity
public double getAxisVelDownSensitivity()
Description copied from interface:IControllerMappings
Sensitivity of velocity down axis- Specified by:
getAxisVelDownSensitivity
in interfaceIControllerMappings
-
-