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_MOVEintAXIS_PITCHintAXIS_ROLLintAXIS_VEL_DOWNintAXIS_VEL_UPintAXIS_YAWintBUTTON_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 movementintgetAxisPitch()Returns the code of the axis that produces: Vertical rotation around focus in focus mode Vertical look rotation (pitch) in free modeintgetAxisRoll()Returns the code of the axis that produces: Roll rotation in focus mode Horizontal lateral movement in free modeintgetAxisVelocityDown()Returns the code of the axis used to decrease the velocity.intgetAxisVelocityUp()Returns the code of the axis used to increase the velocity.intgetAxisYaw()Returns the code of the axis that produces: Horizontal rotation around focus in focus mode Horizontal look rotation (yaw) in free modeintgetButtonDown()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_ROLL
public int AXIS_ROLL
-
AXIS_PITCH
public int AXIS_PITCH
-
AXIS_YAW
public int AXIS_YAW
-
AXIS_MOVE
public int AXIS_MOVE
-
AXIS_VEL_UP
public int AXIS_VEL_UP
-
AXIS_VEL_DOWN
public int AXIS_VEL_DOWN
-
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
-
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
-
-