Package com.jme3.input
Interface JoystickAxis
- All Known Implementing Classes:
AndroidSensorJoyInput.AndroidSensorJoystickAxis
,DefaultJoystickAxis
public interface JoystickAxis
Represents a single axis of a Joystick.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assignAxis
(String positiveMapping, String negativeMapping) Assign the mappings to receive events from the given joystick axis.int
Returns the unique axisId of this joystick axis within a given InputManager context.float
Returns the suggested dead zone for this axis.Returns the joystick to which this axis object belongs.Returns the logical identifier of this joystick axis.getName()
Returns the name of this joystick.boolean
isAnalog()
Returns true if this is an analog axis, meaning the values are a continuous range instead of 1, 0, and -1.boolean
Returns true if this axis presents relative values.
-
Field Details
-
X_AXIS
- See Also:
-
Y_AXIS
- See Also:
-
Z_AXIS
- See Also:
-
Z_ROTATION
- See Also:
-
LEFT_TRIGGER
- See Also:
-
RIGHT_TRIGGER
- See Also:
-
POV_X
- See Also:
-
POV_Y
- See Also:
-
-
Method Details
-
assignAxis
Assign the mappings to receive events from the given joystick axis.- Parameters:
positiveMapping
- The mapping to receive events when the axis is negativenegativeMapping
- The mapping to receive events when the axis is positive
-
getJoystick
Joystick getJoystick()Returns the joystick to which this axis object belongs.- Returns:
- the pre-existing instance
-
getName
String getName()Returns the name of this joystick.- Returns:
- the name of this joystick.
-
getLogicalId
String getLogicalId()Returns the logical identifier of this joystick axis.- Returns:
- the logical identifier of this joystick.
-
getAxisId
int getAxisId()Returns the unique axisId of this joystick axis within a given InputManager context.- Returns:
- the axisId of this joystick axis.
-
isAnalog
boolean isAnalog()Returns true if this is an analog axis, meaning the values are a continuous range instead of 1, 0, and -1.- Returns:
- true if analog, otherwise false
-
isRelative
boolean isRelative()Returns true if this axis presents relative values.- Returns:
- true if relative, otherwise false
-
getDeadZone
float getDeadZone()Returns the suggested dead zone for this axis. Values less than this can be safely ignored.- Returns:
- the radius of the dead zone
-