org.jagatoo.input.devices.components
Class ControllerAxis
java.lang.Object
org.jagatoo.input.devices.components.DeviceComponent
org.jagatoo.input.devices.components.AnalogDeviceComponent
org.jagatoo.input.devices.components.ControllerAxis
- Direct Known Subclasses:
- JInputControllerAxis, LWJGLControllerAxis
public abstract class ControllerAxis
- extends AnalogDeviceComponent
This is a simple abstraction of a Controller's axis.
|
Constructor Summary |
ControllerAxis(Controller controller,
int index,
java.lang.String name,
float deadZone,
float povX,
float povY)
|
| Methods inherited from class org.jagatoo.input.devices.components.DeviceComponent |
bindAction, bindAction, getDeviceComponentID, getLocalizedName, getName, getType, isAnalog, isDigital, notifyBoundActions, unbindAction, unbindAction |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ControllerAxis
public ControllerAxis(Controller controller,
int index,
java.lang.String name,
float deadZone,
float povX,
float povY)
getController
public final Controller getController()
- Returns:
- the
Controller, this axis belongs to.
getIndex
public final int getIndex()
- Returns:
- the Axis' index.
setMinValue
public void setMinValue(float minValue)
- Sets the minimum value, the normalized value can take.
- Parameters:
minValue -
getMinValue
public final float getMinValue()
- Returns:
- the minimum value, the normalized value can take.
setMaxValue
public void setMaxValue(float maxValue)
- Sets the maximum value, the normalized value can take.
- Parameters:
minValue -
getMaxValue
public final float getMaxValue()
- Returns:
- the maximum value, the normalized value can take.
setValue
protected void setValue(int intValue,
float floatValue)
-
- Overrides:
setValue in class AnalogDeviceComponent
getNormalizedValue
public final float getNormalizedValue()
- Returns:
- the current value normalized on the interval [-1, +1].
setDeadZoneImpl
protected abstract void setDeadZoneImpl(float zone)
setDeadZone
public final void setDeadZone(float zone)
getDeadZone
public final float getDeadZone()
getPovX
public final float getPovX()
getPovY
public final float getPovY()
toString
public java.lang.String toString()
-
- Overrides:
toString in class java.lang.Object