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 intAXIS_MOVEdoubleAXIS_MOVE_SENSintAXIS_PITCHdoubleAXIS_PITCH_SENSintAXIS_ROLLdoubleAXIS_ROLL_SENSdoubleAXIS_VALUE_POWintAXIS_VEL_DOWNdoubleAXIS_VEL_DOWN_SENSintAXIS_VEL_UPdoubleAXIS_VEL_UP_SENSintAXIS_YAWdoubleAXIS_YAW_SENSintBUTTON_DOWNintBUTTON_MODE_TOGGLEintBUTTON_UPintBUTTON_VEL_DOWNintBUTTON_VEL_MULT_HALFintBUTTON_VEL_MULT_TENTHintBUTTON_VEL_UP
-
Constructor Summary
Constructors Constructor Description AbstractControllerMappings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAxisMove()Returns the code of the axis that controls the forward and backward movementdoublegetAxisMoveSensitivity()Sensitivity of move axisintgetAxisPitch()Returns the code of the axis that produces: Vertical rotation around focus in focus mode Vertical look rotation (pitch) in free modedoublegetAxisPitchSensitivity()Sensitivity of pitch axisintgetAxisRoll()Returns the code of the axis that produces: Roll rotation in focus mode Horizontal lateral movement in free modedoublegetAxisRollSensitivity()Sensitivity of roll axisdoublegetAxisValuePower()Power to apply to the linear value: val = val^powdoublegetAxisVelDownSensitivity()Sensitivity of velocity down axisintgetAxisVelocityDown()Returns the code of the axis used to decrease the velocity.intgetAxisVelocityUp()Returns the code of the axis used to increase the velocity.doublegetAxisVelUpSensitivity()Sensitivity of velocity up axisintgetAxisYaw()Returns the code of the axis that produces: Horizontal rotation around focus in focus mode Horizontal look rotation (yaw) in free modedoublegetAxisYawSensitivity()Sensitivity of yaw axisintgetButtonDown()Returns the code of the button used to go down.intgetButtonModeToggle()Returns the code of the button used to toggle between free and focus mode.intgetButtonUp()Returns the code of the button used to go up.intgetButtonVelocityDown()Returns the code of the button used to decrease the velocity.intgetButtonVelocityMultiplierHalf()Returns the code of the button that, when pressed, multiplies the velocity vector by 0.5.intgetButtonVelocityMultiplierTenth()Returns the code of the button that, when pressed, multiplies the velocity vector by 0.1.intgetButtonVelocityUp()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:IControllerMappingsPower to apply to the linear value: val = val^pow- Specified by:
getAxisValuePowerin interfaceIControllerMappings- Returns:
- The configured value power.
-
getAxisRoll
public int getAxisRoll()
Description copied from interface:IControllerMappingsReturns the code of the axis that produces:- Roll rotation in focus mode
- Horizontal lateral movement in free mode
- Specified by:
getAxisRollin interfaceIControllerMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisPitch
public int getAxisPitch()
Description copied from interface:IControllerMappingsReturns the code of the axis that produces:- Vertical rotation around focus in focus mode
- Vertical look rotation (pitch) in free mode
- Specified by:
getAxisPitchin interfaceIControllerMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisYaw
public int getAxisYaw()
Description copied from interface:IControllerMappingsReturns the code of the axis that produces:- Horizontal rotation around focus in focus mode
- Horizontal look rotation (yaw) in free mode
- Specified by:
getAxisYawin interfaceIControllerMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisMove
public int getAxisMove()
Description copied from interface:IControllerMappingsReturns the code of the axis that controls the forward and backward movement- Specified by:
getAxisMovein interfaceIControllerMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisVelocityUp
public int getAxisVelocityUp()
Description copied from interface:IControllerMappingsReturns 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:
getAxisVelocityUpin interfaceIControllerMappings- Returns:
- The axis code, negative if not mapped.
-
getAxisVelocityDown
public int getAxisVelocityDown()
Description copied from interface:IControllerMappingsReturns 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:
getAxisVelocityDownin interfaceIControllerMappings- Returns:
- The axis code, negative if not mapped.
-
getButtonVelocityMultiplierTenth
public int getButtonVelocityMultiplierTenth()
Description copied from interface:IControllerMappingsReturns the code of the button that, when pressed, multiplies the velocity vector by 0.1.- Specified by:
getButtonVelocityMultiplierTenthin interfaceIControllerMappings- Returns:
- The button code, negative if not mapped.
-
getButtonVelocityMultiplierHalf
public int getButtonVelocityMultiplierHalf()
Description copied from interface:IControllerMappingsReturns the code of the button that, when pressed, multiplies the velocity vector by 0.5.- Specified by:
getButtonVelocityMultiplierHalfin interfaceIControllerMappings- Returns:
- The button code, negative if not mapped.
-
getButtonVelocityUp
public int getButtonVelocityUp()
Description copied from interface:IControllerMappingsReturns the code of the button used to increase the velocity.- Specified by:
getButtonVelocityUpin interfaceIControllerMappings- Returns:
- The button code, negative if not mapped.
-
getButtonVelocityDown
public int getButtonVelocityDown()
Description copied from interface:IControllerMappingsReturns the code of the button used to decrease the velocity.- Specified by:
getButtonVelocityDownin interfaceIControllerMappings- Returns:
- The button code, negative if not mapped.
-
getButtonUp
public int getButtonUp()
Description copied from interface:IControllerMappingsReturns the code of the button used to go up.- Specified by:
getButtonUpin interfaceIControllerMappings- Returns:
- The button code, negative if not mapped.
-
getButtonDown
public int getButtonDown()
Description copied from interface:IControllerMappingsReturns the code of the button used to go down.- Specified by:
getButtonDownin interfaceIControllerMappings- Returns:
- The button code, negative if not mapped.
-
getButtonModeToggle
public int getButtonModeToggle()
Description copied from interface:IControllerMappingsReturns the code of the button used to toggle between free and focus mode.- Specified by:
getButtonModeTogglein interfaceIControllerMappings- Returns:
- The button code, negative if not mapped.
-
getAxisRollSensitivity
public double getAxisRollSensitivity()
Description copied from interface:IControllerMappingsSensitivity of roll axis- Specified by:
getAxisRollSensitivityin interfaceIControllerMappings
-
getAxisPitchSensitivity
public double getAxisPitchSensitivity()
Description copied from interface:IControllerMappingsSensitivity of pitch axis- Specified by:
getAxisPitchSensitivityin interfaceIControllerMappings
-
getAxisYawSensitivity
public double getAxisYawSensitivity()
Description copied from interface:IControllerMappingsSensitivity of yaw axis- Specified by:
getAxisYawSensitivityin interfaceIControllerMappings
-
getAxisMoveSensitivity
public double getAxisMoveSensitivity()
Description copied from interface:IControllerMappingsSensitivity of move axis- Specified by:
getAxisMoveSensitivityin interfaceIControllerMappings
-
getAxisVelUpSensitivity
public double getAxisVelUpSensitivity()
Description copied from interface:IControllerMappingsSensitivity of velocity up axis- Specified by:
getAxisVelUpSensitivityin interfaceIControllerMappings
-
getAxisVelDownSensitivity
public double getAxisVelDownSensitivity()
Description copied from interface:IControllerMappingsSensitivity of velocity down axis- Specified by:
getAxisVelDownSensitivityin interfaceIControllerMappings
-
-