public class AndroidSensorJoyInput.AndroidSensorJoystickAxis extends DefaultJoystickAxis implements SensorJoystickAxis
ORIENTATION_X, ORIENTATION_Y, ORIENTATION_ZLEFT_TRIGGER, POV_X, POV_Y, RIGHT_TRIGGER, X_AXIS, Y_AXIS, Z_AXIS, Z_ROTATION| Constructor and Description |
|---|
AndroidSensorJoystickAxis(InputManager inputManager,
Joystick parent,
int axisIndex,
java.lang.String name,
java.lang.String logicalId,
boolean isAnalog,
boolean isRelative,
float deadZone,
float maxRawValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
calibrateCenter()
Calibrates the axis to the current value.
|
protected float |
getJoystickAxisValue() |
protected float |
getLastRawValue() |
float |
getMaxRawValue()
Returns the current maximum raw sensor value that is being used to scale
the joystick axis value.
|
protected boolean |
isChanged() |
protected void |
setCurRawValue(float rawValue) |
void |
setMaxRawValue(float maxRawValue)
Method to allow users to set the raw sensor value that represents
the maximum joystick axis value.
|
assignAxis, getAxisId, getDeadZone, getJoystick, getLogicalId, getName, isAnalog, isRelative, setDeadZone, toStringpublic AndroidSensorJoystickAxis(InputManager inputManager, Joystick parent, int axisIndex, java.lang.String name, java.lang.String logicalId, boolean isAnalog, boolean isRelative, float deadZone, float maxRawValue)
public float getMaxRawValue()
SensorJoystickAxisgetMaxRawValue in interface SensorJoystickAxispublic void setMaxRawValue(float maxRawValue)
SensorJoystickAxissetMaxRawValue in interface SensorJoystickAxismaxRawValue - Raw sensor value that will be used to scale joystick axis valueprotected float getLastRawValue()
protected void setCurRawValue(float rawValue)
protected float getJoystickAxisValue()
protected boolean isChanged()
public void calibrateCenter()
SensorJoystickAxiscalibrateCenter in interface SensorJoystickAxis