org.jagatoo.input.devices.components
Class ControllerAxis

java.lang.Object
  extended by org.jagatoo.input.devices.components.DeviceComponent
      extended by org.jagatoo.input.devices.components.AnalogDeviceComponent
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jagatoo.input.devices.components.DeviceComponent
DeviceComponent.Type
 
Field Summary
 
Fields inherited from class org.jagatoo.input.devices.components.DeviceComponent
nextID
 
Constructor Summary
ControllerAxis(Controller controller, int index, java.lang.String name, float deadZone, float povX, float povY)
           
 
Method Summary
 Controller getController()
           
 float getDeadZone()
           
 int getIndex()
           
 float getMaxValue()
           
 float getMinValue()
           
 float getNormalizedValue()
           
 float getPovX()
           
 float getPovY()
           
 void setDeadZone(float zone)
           
protected abstract  void setDeadZoneImpl(float zone)
           
 void setMaxValue(float maxValue)
          Sets the maximum value, the normalized value can take.
 void setMinValue(float minValue)
          Sets the minimum value, the normalized value can take.
protected  void setValue(int intValue, float floatValue)
          
 java.lang.String toString()
          
 
Methods inherited from class org.jagatoo.input.devices.components.AnalogDeviceComponent
addValue, addValue, getFloatValue, getIntValue, getScale, setScale, setValue, setValue
 
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
 

Constructor Detail

ControllerAxis

public ControllerAxis(Controller controller,
                      int index,
                      java.lang.String name,
                      float deadZone,
                      float povX,
                      float povY)
Method Detail

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