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_ROTATION
Fields inherited from interface com.jme3.input.SensorJoystickAxis
ORIENTATION_X, ORIENTATION_Y, ORIENTATION_Z
-
Constructor Summary
ConstructorDescriptionAndroidSensorJoystickAxis
(InputManager inputManager, Joystick parent, int axisIndex, String name, String logicalId, boolean isAnalog, boolean isRelative, float deadZone, float maxRawValue) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Calibrates the axis to the current value.protected float
protected float
float
Returns the current maximum raw sensor value that is being used to scale the joystick axis value.protected boolean
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.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:SensorJoystickAxis
Returns the current maximum raw sensor value that is being used to scale the joystick axis value.- Specified by:
getMaxRawValue
in 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:SensorJoystickAxis
Method 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:
setMaxRawValue
in 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:SensorJoystickAxis
Calibrates the axis to the current value. Future axis values will be sent as a delta from the calibration value.- Specified by:
calibrateCenter
in interfaceSensorJoystickAxis
-