Package com.jme3.input.android
Class AndroidSensorJoyInput.AndroidSensorJoystickAxis
java.lang.Object
com.jme3.input.DefaultJoystickAxis
com.jme3.input.android.AndroidSensorJoyInput.AndroidSensorJoystickAxis
- All Implemented Interfaces:
JoystickAxis,SensorJoystickAxis
- Enclosing class:
- AndroidSensorJoyInput
public class AndroidSensorJoyInput.AndroidSensorJoystickAxis
extends DefaultJoystickAxis
implements SensorJoystickAxis
-
Field Summary
Fields inherited from interface com.jme3.input.JoystickAxis
LEFT_TRIGGER, POV_X, POV_Y, RIGHT_TRIGGER, X_AXIS, Y_AXIS, Z_AXIS, Z_ROTATIONFields inherited from interface com.jme3.input.SensorJoystickAxis
ORIENTATION_X, ORIENTATION_Y, ORIENTATION_Z -
Constructor Summary
ConstructorsConstructorDescriptionAndroidSensorJoystickAxis(InputManager inputManager, Joystick parent, int axisIndex, String name, String logicalId, boolean isAnalog, boolean isRelative, float deadZone, float maxRawValue) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalibrates the axis to the current value.protected floatprotected floatfloatReturns the current maximum raw sensor value that is being used to scale the joystick axis value.protected booleanprotected voidsetCurRawValue(float rawValue) voidsetMaxRawValue(float maxRawValue) Method to allow users to set the raw sensor value that represents the maximum joystick axis value.Methods inherited from class com.jme3.input.DefaultJoystickAxis
assignAxis, getAxisId, getDeadZone, getJoystick, getLogicalId, getName, isAnalog, isRelative, setDeadZone, toString
-
Constructor Details
-
AndroidSensorJoystickAxis
public AndroidSensorJoystickAxis(InputManager inputManager, Joystick parent, int axisIndex, String name, String logicalId, boolean isAnalog, boolean isRelative, float deadZone, float maxRawValue)
-
-
Method Details
-
getMaxRawValue
public float getMaxRawValue()Description copied from interface:SensorJoystickAxisReturns the current maximum raw sensor value that is being used to scale the joystick axis value.- Specified by:
getMaxRawValuein interfaceSensorJoystickAxis- Returns:
- maxRawValue The current maximum raw sensor value used for scaling the joystick axis value
-
setMaxRawValue
public void setMaxRawValue(float maxRawValue) Description copied from interface:SensorJoystickAxisMethod to allow users to set the raw sensor value that represents the maximum joystick axis value. Values sent to InputManager are scaled using the maxRawValue.- Specified by:
setMaxRawValuein interfaceSensorJoystickAxis- Parameters:
maxRawValue- Raw sensor value that will be used to scale joystick axis value
-
getLastRawValue
protected float getLastRawValue() -
setCurRawValue
protected void setCurRawValue(float rawValue) -
getJoystickAxisValue
protected float getJoystickAxisValue() -
isChanged
protected boolean isChanged() -
calibrateCenter
public void calibrateCenter()Description copied from interface:SensorJoystickAxisCalibrates the axis to the current value. Future axis values will be sent as a delta from the calibration value.- Specified by:
calibrateCenterin interfaceSensorJoystickAxis
-