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
int
AXIS_PITCH
int
AXIS_ROLL
int
AXIS_VEL_DOWN
int
AXIS_VEL_UP
int
AXIS_YAW
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 movementint
getAxisPitch()
Returns the code of the axis that produces: Vertical rotation around focus in focus mode Vertical look rotation (pitch) in free modeint
getAxisRoll()
Returns the code of the axis that produces: Roll rotation in focus mode Horizontal lateral movement in free modeint
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.int
getAxisYaw()
Returns the code of the axis that produces: Horizontal rotation around focus in focus mode Horizontal look rotation (yaw) in free modeint
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_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: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
-
-